var __defProp = Object.defineProperty;
var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true });
// framework/unify/document.js
var documentTool = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object2 = new documentTool();
var document_default = object2.getDocument();
// framework/client/cssRules.js
var cssRules = class {
static {
__name(this, "cssRules");
}
style = "";
styleTypes = new Array();
addStyleListener(propertyTerm, cssSuffix) {
var styleType = new Object();
styleType.propertyTerm = propertyTerm;
styleType.cssSuffix = cssSuffix;
styleType.css = "";
this.styleTypes.push(styleType);
}
};
// framework/client/cssManager.js
var cssManager = class {
static {
__name(this, "cssManager");
}
rules = new Array();
addRule(selector, body61) {
var rule = new Object();
rule.selector = selector;
rule.body = body61;
this.rules[selector] = body61;
}
composeCss(selector, body61) {
if (body61 == "") {
return "";
}
return "\n" + selector + "{ \n" + body61 + "\n } \n";
}
getRule(selector, body61) {
selector = tools_default.cleanRollup(selector);
if (this.rules[selector]) {
return "";
} else {
this.addRule(selector, body61);
return this.composeCss(selector, body61);
}
}
};
// framework/unify/definitions.js
var definitions = class {
static {
__name(this, "definitions");
}
css = JSON.parse('{"accentColor":"","additiveSymbols":"","alignContent":"","alignItems":"","alignSelf":"","alignmentBaseline":"","all":"","animation":"","animationDelay":"","animationDirection":"","animationDuration":"","animationFillMode":"","animationIterationCount":"","animationName":"","animationPlayState":"","animationTimingFunction":"","appRegion":"","appearance":"","ascentOverride":"","aspectRatio":"","backdropFilter":"","backfaceVisibility":"","background":"","backgroundAttachment":"","backgroundBlendMode":"","backgroundClip":"","backgroundColor":"","backgroundImage":"","backgroundOrigin":"","backgroundPosition":"","backgroundPositionX":"","backgroundPositionY":"","backgroundRepeat":"","backgroundRepeatX":"","backgroundRepeatY":"","backgroundSize":"","baselineShift":"","blockSize":"","border":"","borderBlock":"","borderBlockColor":"","borderBlockEnd":"","borderBlockEndColor":"","borderBlockEndStyle":"","borderBlockEndWidth":"","borderBlockStart":"","borderBlockStartColor":"","borderBlockStartStyle":"","borderBlockStartWidth":"","borderBlockStyle":"","borderBlockWidth":"","borderBottom":"","borderBottomColor":"","borderBottomLeftRadius":"","borderBottomRightRadius":"","borderBottomStyle":"","borderBottomWidth":"","borderCollapse":"","borderColor":"","borderEndEndRadius":"","borderEndStartRadius":"","borderImage":"","borderImageOutset":"","borderImageRepeat":"","borderImageSlice":"","borderImageSource":"","borderImageWidth":"","borderInline":"","borderInlineColor":"","borderInlineEnd":"","borderInlineEndColor":"","borderInlineEndStyle":"","borderInlineEndWidth":"","borderInlineStart":"","borderInlineStartColor":"","borderInlineStartStyle":"","borderInlineStartWidth":"","borderInlineStyle":"","borderInlineWidth":"","borderLeft":"","borderLeftColor":"","borderLeftStyle":"","borderLeftWidth":"","borderRadius":"","borderRight":"","borderRightColor":"","borderRightStyle":"","borderRightWidth":"","borderSpacing":"","borderStartEndRadius":"","borderStartStartRadius":"","borderStyle":"","borderTop":"","borderTopColor":"","borderTopLeftRadius":"","borderTopRightRadius":"","borderTopStyle":"","borderTopWidth":"","borderWidth":"","bottom":"","boxShadow":"","boxSizing":"","breakAfter":"","breakBefore":"","breakInside":"","bufferedRendering":"","captionSide":"","caretColor":"","clear":"","clip":"","clipPath":"","clipRule":"","color":"","colorInterpolation":"","colorInterpolationFilters":"","colorRendering":"","colorScheme":"","columnCount":"","columnFill":"","columnGap":"","columnRule":"","columnRuleColor":"","columnRuleStyle":"","columnRuleWidth":"","columnSpan":"","columnWidth":"","columns":"","contain":"","containIntrinsicBlockSize":"","containIntrinsicHeight":"","containIntrinsicInlineSize":"","containIntrinsicSize":"","containIntrinsicWidth":"","content":"","contentVisibility":"","counterIncrement":"","counterReset":"","counterSet":"","cursor":"","cx":"","cy":"","d":"","descentOverride":"","direction":"","display":"","dominantBaseline":"","emptyCells":"","fallback":"","fill":"","fillOpacity":"","fillRule":"","filter":"","flex":"","flexBasis":"","flexDirection":"","flexFlow":"","flexGrow":"","flexShrink":"","flexWrap":"","float":"","floodColor":"","floodOpacity":"","font":"","fontDisplay":"","fontFamily":"","fontFeatureSettings":"","fontKerning":"","fontOpticalSizing":"","fontSize":"","fontStretch":"","fontStyle":"","fontSynthesis":"","fontSynthesisSmallCaps":"","fontSynthesisStyle":"","fontSynthesisWeight":"","fontVariant":"","fontVariantCaps":"","fontVariantEastAsian":"","fontVariantLigatures":"","fontVariantNumeric":"","fontVariationSettings":"","fontWeight":"","forcedColorAdjust":"","gap":"","grid":"","gridArea":"","gridAutoColumns":"","gridAutoFlow":"","gridAutoRows":"","gridColumn":"","gridColumnEnd":"","gridColumnGap":"","gridColumnStart":"","gridGap":"","gridRow":"","gridRowEnd":"","gridRowGap":"","gridRowStart":"","gridTemplate":"","gridTemplateAreas":"","gridTemplateColumns":"","gridTemplateRows":"","height":"","hyphens":"","imageOrientation":"","imageRendering":"","inherits":"","initialValue":"","inlineSize":"","inset":"","insetBlock":"","insetBlockEnd":"","insetBlockStart":"","insetInline":"","insetInlineEnd":"","insetInlineStart":"","isolation":"","justifyContent":"","justifyItems":"","justifySelf":"","left":"","letterSpacing":"","lightingColor":"","lineBreak":"","lineGapOverride":"","lineHeight":"","listStyle":"","listStyleImage":"","listStylePosition":"","listStyleType":"","margin":"","marginBlock":"","marginBlockEnd":"","marginBlockStart":"","marginBottom":"","marginInline":"","marginInlineEnd":"","marginInlineStart":"","marginLeft":"","marginRight":"","marginTop":"","marker":"","markerEnd":"","markerMid":"","markerStart":"","mask":"","maskType":"","maxBlockSize":"","maxHeight":"","maxInlineSize":"","maxWidth":"","maxZoom":"","minBlockSize":"","minHeight":"","minInlineSize":"","minWidth":"","minZoom":"","mixBlendMode":"","negative":"","objectFit":"","objectPosition":"","offset":"","offsetDistance":"","offsetPath":"","offsetRotate":"","opacity":"","order":"","orientation":"","orphans":"","outline":"","outlineColor":"","outlineOffset":"","outlineStyle":"","outlineWidth":"","overflow":"","overflowAnchor":"","overflowClipMargin":"","overflowWrap":"","overflowX":"","overflowY":"","overscrollBehavior":"","overscrollBehaviorBlock":"","overscrollBehaviorInline":"","overscrollBehaviorX":"","overscrollBehaviorY":"","pad":"","padding":"","paddingBlock":"","paddingBlockEnd":"","paddingBlockStart":"","paddingBottom":"","paddingInline":"","paddingInlineEnd":"","paddingInlineStart":"","paddingLeft":"","paddingRight":"","paddingTop":"","page":"","pageBreakAfter":"","pageBreakBefore":"","pageBreakInside":"","pageOrientation":"","paintOrder":"","perspective":"","perspectiveOrigin":"","placeContent":"","placeItems":"","placeSelf":"","pointerEvents":"","position":"","prefix":"","quotes":"","r":"","range":"","resize":"","right":"","rowGap":"","rubyPosition":"","rx":"","ry":"","scrollBehavior":"","scrollMargin":"","scrollMarginBlock":"","scrollMarginBlockEnd":"","scrollMarginBlockStart":"","scrollMarginBottom":"","scrollMarginInline":"","scrollMarginInlineEnd":"","scrollMarginInlineStart":"","scrollMarginLeft":"","scrollMarginRight":"","scrollMarginTop":"","scrollPadding":"","scrollPaddingBlock":"","scrollPaddingBlockEnd":"","scrollPaddingBlockStart":"","scrollPaddingBottom":"","scrollPaddingInline":"","scrollPaddingInlineEnd":"","scrollPaddingInlineStart":"","scrollPaddingLeft":"","scrollPaddingRight":"","scrollPaddingTop":"","scrollSnapAlign":"","scrollSnapStop":"","scrollSnapType":"","scrollbarGutter":"","shapeImageThreshold":"","shapeMargin":"","shapeOutside":"","shapeRendering":"","size":"","sizeAdjust":"","speak":"","speakAs":"","src":"","stopColor":"","stopOpacity":"","stroke":"","strokeDasharray":"","strokeDashoffset":"","strokeLinecap":"","strokeLinejoin":"","strokeMiterlimit":"","strokeOpacity":"","strokeWidth":"","suffix":"","symbols":"","syntax":"","system":"","tabSize":"","tableLayout":"","textAlign":"","textAlignLast":"","textAnchor":"","textCombineUpright":"","textDecoration":"","textDecorationColor":"","textDecorationLine":"","textDecorationSkipInk":"","textDecorationStyle":"","textDecorationThickness":"","textIndent":"","textOrientation":"","textOverflow":"","textRendering":"","textShadow":"","textSizeAdjust":"","textTransform":"","textUnderlineOffset":"","textUnderlinePosition":"","top":"","touchAction":"","transform":"","transformBox":"","transformOrigin":"","transformStyle":"","transition":"","transitionDelay":"","transitionDuration":"","transitionProperty":"","transitionTimingFunction":"","unicodeBidi":"","unicodeRange":"","userSelect":"","userZoom":"","vectorEffect":"","verticalAlign":"","visibility":"","webkitAlignContent":"","webkitAlignItems":"","webkitAlignSelf":"","webkitAnimation":"","webkitAnimationDelay":"","webkitAnimationDirection":"","webkitAnimationDuration":"","webkitAnimationFillMode":"","webkitAnimationIterationCount":"","webkitAnimationName":"","webkitAnimationPlayState":"","webkitAnimationTimingFunction":"","webkitAppRegion":"","webkitAppearance":"","webkitBackfaceVisibility":"","webkitBackgroundClip":"","webkitBackgroundOrigin":"","webkitBackgroundSize":"","webkitBorderAfter":"","webkitBorderAfterColor":"","webkitBorderAfterStyle":"","webkitBorderAfterWidth":"","webkitBorderBefore":"","webkitBorderBeforeColor":"","webkitBorderBeforeStyle":"","webkitBorderBeforeWidth":"","webkitBorderBottomLeftRadius":"","webkitBorderBottomRightRadius":"","webkitBorderEnd":"","webkitBorderEndColor":"","webkitBorderEndStyle":"","webkitBorderEndWidth":"","webkitBorderHorizontalSpacing":"","webkitBorderImage":"","webkitBorderRadius":"","webkitBorderStart":"","webkitBorderStartColor":"","webkitBorderStartStyle":"","webkitBorderStartWidth":"","webkitBorderTopLeftRadius":"","webkitBorderTopRightRadius":"","webkitBorderVerticalSpacing":"","webkitBoxAlign":"","webkitBoxDecorationBreak":"","webkitBoxDirection":"","webkitBoxFlex":"","webkitBoxOrdinalGroup":"","webkitBoxOrient":"","webkitBoxPack":"","webkitBoxReflect":"","webkitBoxShadow":"","webkitBoxSizing":"","webkitClipPath":"","webkitColumnBreakAfter":"","webkitColumnBreakBefore":"","webkitColumnBreakInside":"","webkitColumnCount":"","webkitColumnGap":"","webkitColumnRule":"","webkitColumnRuleColor":"","webkitColumnRuleStyle":"","webkitColumnRuleWidth":"","webkitColumnSpan":"","webkitColumnWidth":"","webkitColumns":"","webkitFilter":"","webkitFlex":"","webkitFlexBasis":"","webkitFlexDirection":"","webkitFlexFlow":"","webkitFlexGrow":"","webkitFlexShrink":"","webkitFlexWrap":"","webkitFontFeatureSettings":"","webkitFontSmoothing":"","webkitHighlight":"","webkitHyphenateCharacter":"","webkitJustifyContent":"","webkitLineBreak":"","webkitLineClamp":"","webkitLocale":"","webkitLogicalHeight":"","webkitLogicalWidth":"","webkitMarginAfter":"","webkitMarginBefore":"","webkitMarginEnd":"","webkitMarginStart":"","webkitMask":"","webkitMaskBoxImage":"","webkitMaskBoxImageOutset":"","webkitMaskBoxImageRepeat":"","webkitMaskBoxImageSlice":"","webkitMaskBoxImageSource":"","webkitMaskBoxImageWidth":"","webkitMaskClip":"","webkitMaskComposite":"","webkitMaskImage":"","webkitMaskOrigin":"","webkitMaskPosition":"","webkitMaskPositionX":"","webkitMaskPositionY":"","webkitMaskRepeat":"","webkitMaskRepeatX":"","webkitMaskRepeatY":"","webkitMaskSize":"","webkitMaxLogicalHeight":"","webkitMaxLogicalWidth":"","webkitMinLogicalHeight":"","webkitMinLogicalWidth":"","webkitOpacity":"","webkitOrder":"","webkitPaddingAfter":"","webkitPaddingBefore":"","webkitPaddingEnd":"","webkitPaddingStart":"","webkitPerspective":"","webkitPerspectiveOrigin":"","webkitPerspectiveOriginX":"","webkitPerspectiveOriginY":"","webkitPrintColorAdjust":"","webkitRtlOrdering":"","webkitRubyPosition":"","webkitShapeImageThreshold":"","webkitShapeMargin":"","webkitShapeOutside":"","webkitTapHighlightColor":"","webkitTextCombine":"","webkitTextDecorationsInEffect":"","webkitTextEmphasis":"","webkitTextEmphasisColor":"","webkitTextEmphasisPosition":"","webkitTextEmphasisStyle":"","webkitTextFillColor":"","webkitTextOrientation":"","webkitTextSecurity":"","webkitTextSizeAdjust":"","webkitTextStroke":"","webkitTextStrokeColor":"","webkitTextStrokeWidth":"","webkitTransform":"","webkitTransformOrigin":"","webkitTransformOriginX":"","webkitTransformOriginY":"","webkitTransformOriginZ":"","webkitTransformStyle":"","webkitTransition":"","webkitTransitionDelay":"","webkitTransitionDuration":"","webkitTransitionProperty":"","webkitTransitionTimingFunction":"","webkitUserDrag":"","webkitUserModify":"","webkitUserSelect":"","webkitWritingMode":"","whiteSpace":"","widows":"","width":"","willChange":"","wordBreak":"","wordSpacing":"","wordWrap":"","writingMode":"","x":"","y":"","zIndex":"","zoom":""}');
alphabet = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
browserEvents = new Array("screenchange", "fullscreenerror", "webkitfullscreenchange", "webkitfullscreenerror", "beforexrselect", "abort", "blur", "cancel", "canplay", "canplaythrough", "change", "click", "close", "contextmenu", "cuechange", "dblclick", "drag", "dragend", "dragenter", "dragleave", "dragover", "dragstart", "drop", "durationchange", "emptied", "ended", "error", "focus", "formdata", "input", "invalid", "keydown", "keypress", "keyup", "load", "loadeddata", "loadedmetadata", "loadstart", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "mousewheel", "pause", "play", "playing", "progress", "ratechange", "reset", "resize", "scroll", "securitypolicyviolation", "seeked", "seeking", "select", "slotchange", "stalled", "submit", "suspend", "timeupdate", "toggle", "volumechange", "waiting", "webkitanimationend", "webkitanimationiteration", "webkitanimationstart", "webkittransitionend", "wheel", "auxclick", "gotpointercapture", "lostpointercapture", "pointerdown", "pointermove", "pointerup", "pointercancel", "pointerover", "pointerout", "pointerenter", "pointerleave", "selectstart", "selectionchange", "animationend", "animationiteration", "animationstart", "transitionrun", "transitionstart", "transitionend", "transitioncancel", "copy", "cut", "paste", "contextlost", "contextrestored", "pointerrawupdate");
invalid = new Array("display", "__display", "propertyName", "__text", "text", "__sourcePath", "os", "tint", "device", "__os", "__device", "__tint");
};
var definitions_default = new definitions();
// framework/client/css.js
var css = class {
static {
__name(this, "css");
}
cssCache = new cssManager();
global_css = "";
skipBoxTerms = new Array("box-sizing", "box-shadow", "box-reflect", "box-decoration-break");
constructor() {
this.boxTermWithoutPrefix = new Array();
for (var i = 0; i < this.skipBoxTerms.length; i++) {
var boxTerm = this.skipBoxTerms[i];
this.boxTermWithoutPrefix[i] = boxTerm.replace("box-");
}
}
PerformPropertyGridCorrection(property2) {
for (var i = 0; i < this.skipBoxTerms.length; i++) {
if (this.boxTermWithoutPrefix[i].includes(property2)) {
property2 = this.skipBoxTerms[i];
}
}
return property2;
}
parseObject(object93) {
var objectName = object93.propertyName;
object93.css = new cssRules();
object93.boxRules = new cssRules();
object93.cssRules = new cssRules();
object93.cssRules.addStyleListener("hover", ":hover");
object93.cssRules.addStyleListener("visited", ":visited");
object93.cssRules.addStyleListener("link", ":link");
object93.cssRules.addStyleListener("active", ":active");
object93.cssRules.addStyleListener("placeholder", "::placeholder");
object93.cssRules.addStyleListener("scrollbar", "::-webkit-scrollbar");
object93.cssRules.addStyleListener("scrollbarTrack", "::-webkit-scrollbar-track");
object93.cssRules.addStyleListener("scrollbarThumb", "::-webkit-scrollbar-thumb");
object93.cssRules.addStyleListener("scrollbarThumbHover", "::-webkit-scrollbar-thumb:hover");
}
parseCSSValue(value2) {
if (typeof value2 == "number") {
value2 += "px";
}
return value2;
}
createStyleRule(normalizedProperty, value2) {
if (!value2) {
return "";
}
value2 = this.parseCSSValue(value2);
normalizedProperty = this.PerformPropertyGridCorrection(normalizedProperty);
return " " + normalizedProperty + ":" + value2 + "; \n";
}
compareUpperCase(term) {
const compare = /* @__PURE__ */ __name(function(current) {
if (term.indexOf(current) != -1) {
return true;
}
}, "compare");
const n = definitions_default.alphabet;
var map = n.map(compare);
return map;
}
hasUpperCase(a32) {
let regExp = /[A-Z]/;
return regExp.test(a32);
}
replaceUpperCase(word) {
var map = this.compareUpperCase(word);
var letter = definitions_default.alphabet[map.indexOf(true)];
return word.replace(letter, "-" + letter.toLowerCase());
}
normalizePropertyName(name) {
return tools_default.firstLowerCase(name.replace("__", "").replace("box", ""));
}
// needs caching
normalizeProperty(name) {
if (name.slice(0, 6) == "webkit") {
name = "-" + name;
}
for (var i = 0; i < 6; i++) {
if (this.hasUpperCase(name)) {
name = this.replaceUpperCase(name);
}
}
return name;
}
setter(object93, domStyleObject, propertyName2, property2, value2) {
object93["__" + propertyName2] = value2;
value2 = this.parseCSSValue(value2);
property2 = this.PerformPropertyGridCorrection(property2);
var NSTabNames = new Array("svg", "circle");
domStyleObject.setProperty(property2, value2);
}
createSetter(property2, objectProperty, object93, domStyleObject) {
var css2 = this;
object93["__" + objectProperty] = object93[objectProperty];
object93.__defineSetter__(objectProperty, this.setter.bind(this, object93, domStyleObject, objectProperty, property2));
}
getter(object93, objectProperty, value2) {
var newValue = object93["__" + objectProperty];
if (typeof newValue == "string") {
var chars = newValue.split();
if (chars[chars.length - 2] == "p" && chars[chars.length - 1] == "x") {
chars = chars.slice(0, -2);
newValue = chars.join();
}
}
if (tools_default.isCustomNumber(newValue)) {
return parseFloat(newValue);
} else {
return newValue;
}
}
createGetter(property2, objectProperty, object93, domStyleObject) {
object93.__defineGetter__(objectProperty, this.getter.bind(this, object93, objectProperty));
}
parseProperty(property2, object93) {
var propertyName2 = property2.name;
var propertyValue = property2.value;
var normalizedProperty = this.normalizeProperty(propertyName2);
var slicedProperty = propertyName2.toLowerCase().slice(0, 3);
if (slicedProperty == "box") {
object93.boxRules.style += this.parseCssTerm(object93, propertyName2, propertyValue, object93.elements[0], "box");
} else {
object93.css.style += this.parseCssTerm(object93, propertyName2, propertyValue, object93.element);
}
this.parseExtraStyleSuffixes(object93, propertyName2, propertyValue);
}
parseExtraStyleSuffixes(object93, propertyName2, propertyValue) {
var styleTypes = object93.cssRules.styleTypes;
for (var i = 0; i < styleTypes.length; i++) {
var cssType = styleTypes[i];
var propertyTerm = cssType.propertyTerm;
var slicedProperty = propertyName2.slice(0, propertyTerm.length);
if (slicedProperty == propertyTerm && propertyName2.length > slicedProperty.length) {
cssType.css += this.parseCssTerm(object93, propertyName2, propertyValue, object93.elements[0], propertyTerm);
}
}
}
parseCssTerm(object93, propertyName2, propertyValue, element2, term = "") {
var cssPropertyName = tools_default.firstLowerCase(propertyName2.replace(term, ""));
var normalizedProperty = this.normalizeProperty(cssPropertyName);
if (this.propertyIsStyle(normalizedProperty)) {
if (!term || term == "box") {
this.createSetter(normalizedProperty, propertyName2, object93, element2.style);
this.createGetter(normalizedProperty, propertyName2, object93, element2.style);
}
return this.createStyleRule(normalizedProperty, propertyValue);
} else {
return "";
}
}
clearCache() {
this.cssCache.rules = new Array();
}
parseCssRule(object93, objectPropertyName, propertyName2, propertyValue) {
var normalizedProperty = this.normalizeProperty(objectPropertyName);
object93.boxRules.style += this.createStyleRule(normalizedProperty, propertyValue);
this.createSetter(objectPropertyName, propertyName2, object93, object93.elements[0].style);
this.createGetter(objectPropertyName, propertyName2, object93, object93.elements[0].style);
}
createSelector(className2, afterTerm) {
var selector = "." + className2;
selector += "." + this.device;
selector += "." + this.os;
selector += "." + this.tint;
if (afterTerm) {
selector += afterTerm;
}
return selector;
}
createStyleSheet(object93) {
var objectName = tools_default.createCSSClassName(object93);
var body61 = object93.css.style;
if (object93.customElement) {
var selector = this.createSelector(objectName + "Element");
this.global_css += this.cssCache.getRule(selector, body61);
var selector = this.createSelector(objectName + "Grid");
this.global_css += this.cssCache.getRule(selector, body61);
} else {
var selector = this.createSelector(objectName + "Grid");
this.global_css += this.cssCache.getRule(selector, body61);
}
if (object93.boxRules) {
var selector = this.createSelector(objectName + "Box");
var body61 = object93.boxRules.style;
this.global_css += this.cssCache.getRule(selector, body61);
}
var styleTypes = object93.cssRules.styleTypes;
for (var i = 0; i < styleTypes.length; i++) {
var cssType = styleTypes[i];
if (object93.useCustomElement) {
var selector = this.createSelector(objectName + "Element", cssType.cssSuffix);
} else {
var selector = this.createSelector(objectName + "Grid", cssType.cssSuffix);
}
var body61 = cssType.css;
if (body61 != "") {
this.global_css += this.cssCache.getRule(selector, body61);
}
}
if (!object93.parent) {
this.writeCssToPage(this.global_css);
this.global_css = "";
}
if (object93.dynamic) {
this.writeCssToPage(this.global_css);
this.global_css = "";
}
}
writeCssToPage(css2) {
if (css2 == "") {
return false;
}
var style = document_default.createElement("style");
style.innerHTML = css2;
document_default.head.appendChild(style);
}
removeStripe(name) {
var splitName = name.split("-");
if (splitName.length > 1) {
return splitName[1].toLowerCase();
} else {
return name;
}
}
getStyleSheetObject() {
if (!document_default.body) {
return definitions_default.css;
return object;
}
if (document_default.body.style) {
var bodyStyle = document_default.body.style;
bodyStyle.webkitBoxShadow = "";
return bodyStyle;
}
if (document_default.body.styleSheets) {
return document_default.styleSheets[1].cssRules[0].style;
} else {
return document_default.customStyleTerms;
}
}
camelCaseToDash(name) {
for (var i = 0; i < 4; i++) {
if (this.hasUpperCase(name)) {
name = this.replaceUpperCase(name);
}
}
return name;
}
removeBoxPrefix(name) {
if (!name.includes("webkit-box")) {
name = name.replace("box", "").toLowerCase();
}
return name;
}
checkBoxSpecialCase(name) {
for (var i = 0; i < this.boxTermWithoutPrefix.length; i++) {
if (this.boxTermWithoutPrefix[i].includes(name)) {
return true;
}
}
}
propertyIsStyle(name) {
name = this.camelCaseToDash(name);
name = this.removeBoxPrefix(name);
if (this.checkBoxSpecialCase(name)) {
return true;
}
var styleTerms = this.getStyleSheetObject();
if (typeof styleTerms[name] == "string") {
return true;
} else {
return false;
}
}
propertyHasStyle(name) {
var styleTerms = Object.keys(definitions_default.css);
if (styleTerms.includes(name.toLowerCase())) {
return true;
} else {
return false;
}
}
};
// framework/unify/math/vector2.js
var vector2 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/unify/consoleColors.js
var consoleColors = class {
static {
__name(this, "consoleColors");
}
colors = new Array();
backgroundColors = new Array();
addColor(colorName, colorCode) {
var color = new Object();
color.name = colorName;
color.code = colorCode;
this.colors.push(color);
}
addBackgroundColor(colorName, colorCode) {
var color = new Object();
color.name = colorName;
color.code = colorCode;
this.backgroundColors.push(color);
}
constructor() {
this.createTextColors();
this.createBackgroundColors();
return this.createMethods();
}
createTextColors() {
this.addColor("white", 37);
this.addColor("black", 30);
this.addColor("blue", 34);
this.addColor("cyan", 36);
this.addColor("green", 32);
this.addColor("magenta", 35);
this.addColor("red", 31);
this.addColor("yellow", 33);
this.addColor("brightBlack", 90);
this.addColor("brightRed", 91);
this.addColor("brightGreen", 92);
this.addColor("brightYellow", 93);
this.addColor("brightBlue", 94);
this.addColor("brightMagenta", 95);
this.addColor("brightCyan", 96);
this.addColor("brightWhite", 97);
}
createBackgroundColors() {
this.addBackgroundColor("bgBlack", 40);
this.addBackgroundColor("bgRed", 41);
this.addBackgroundColor("bgGreen", 42);
this.addBackgroundColor("bgYellow", 43);
this.addBackgroundColor("bgBlue", 44);
this.addBackgroundColor("bgMagenta", 45);
this.addBackgroundColor("bgCyan", 46);
this.addBackgroundColor("bgWhite", 47);
this.addBackgroundColor("bgBrightBlack", 100);
this.addBackgroundColor("bgBrightRed", 101);
this.addBackgroundColor("bgBrightGreen", 102);
this.addBackgroundColor("bgBrightYellow", 103);
this.addBackgroundColor("bgBrightBlue", 104);
this.addBackgroundColor("bgBrightMagenta", 105);
this.addBackgroundColor("bgBrightCyan", 106);
this.addBackgroundColor("bgBrightWhite", 107);
}
createMethodsForTextColor(color, colorMethods) {
var name = color.name;
var code = color.code;
var open = "\x1B[" + code + "m";
var close = "\x1B[39m";
colorMethods[name] = function(value2) {
return open + value2 + close;
};
}
createMethodsForBackgroundColor(color, colorMethods) {
var name = color.name;
var code = color.code;
var open = "\x1B[" + code + "m";
var close = "\x1B[49m";
colorMethods[name] = function(value2) {
return open + value2 + close;
};
}
createMethods() {
var colors = this.colors;
var colorMethods = new Array();
for (var i = 0; i < colors.length; i++) {
var textColor = colors[i];
this.createMethodsForTextColor(textColor, colorMethods);
}
var backgroundColors = this.backgroundColors;
for (var i = 0; i < backgroundColors.length; i++) {
var backgroundColor = backgroundColors[i];
this.createMethodsForBackgroundColor(backgroundColor, colorMethods);
}
return colorMethods;
}
};
var consoleColors_default = new consoleColors();
// framework/unify/tools.js
var tools2 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default = new tools2();
// framework/client/dom.js
var dom = class {
static {
__name(this, "dom");
}
addDOMToSelector = true;
setElement() {
var objectName = tools_default.createCSSClassName(object);
element.className = this.getClassName(object.editable, objectName);
}
getClassName(editable, objectName) {
if (editable) {
return objectName + "Element";
} else {
return objectName + "Grid grid";
}
}
createSetter(object93) {
object93.__defineSetter__("text", function(value2) {
if (typeof value2 == "number") {
value2 = value2.toString();
}
object93.__text = value2;
object93.updateElementContent();
});
}
createGetter(object93) {
object93.__defineGetter__("text", function() {
return object93.__text;
});
}
createSetterAndGetters(object93) {
object93.__text = object93.text;
this.createSetter(object93);
this.createGetter(object93);
}
createDOMElements(object93, objectName) {
object93.elements = [];
if (object93.layers == 2) {
object93.boxElement = this.createDiv(objectName, "box", object93.id);
object93.elements.push(object93.boxElement);
}
object93.defaultElement = this.createDiv(objectName, "grid", object93.id);
if (object93.useCustomElement) {
object93.element = object93.customElement;
} else {
object93.element = object93.defaultElement;
}
object93.elements.push(object93.element);
}
addClasses(object93, objectName) {
var type = "Element";
var mainClassName = objectName;
object93.customElement.classList.add(mainClassName + type);
object93.customElement.classList.add(type);
object93.customElement.classList.add(this.device);
object93.customElement.classList.add(this.tint);
object93.customElement.classList.add(this.os);
}
updateZIndex(object93) {
if (!object93.zIndex && object93.setZIndex) {
object93.element.style["z-index"] = tools_default.getApplicationDepth(object93);
if (object93.inverseZIndex) {
object93.element.style["z-index"] = 1e3 - tools_default.getApplicationDepth(object93);
}
}
}
attachUnifyObjectToElements(object93) {
for (var c31 = 0; c31 < object93.elements.length; c31++) {
object93.elements[c31].object = object93;
}
}
parseObject(object93) {
var objectName = tools_default.createCSSClassName(object93);
this.createDOMElements(object93, objectName);
if (object93.customElement) {
this.addClasses(object93, objectName);
} else {
object93.customElement = object93.defaultElement;
}
this.createSetterAndGetters(object93);
object93.updateElementContent();
this.updateZIndex(object93);
this.attachUnifyObjectToElements(object93);
if (!object93.selector && object93.parent && object93.addToDom) {
this.parseProperty(objectName, object93, object93.parent);
}
}
addElementToDOMParent(object93, propertyValue) {
if (propertyValue.propertyName[0] == "_") {
object93.elements[object93.elements.length - 1].prepend(propertyValue.elements[0]);
} else {
if (object93.elements) {
object93.elements[object93.elements.length - 1].appendChild(propertyValue.elements[0]);
}
}
}
addElementToBody(propertyValue) {
document_default.body.appendChild(propertyValue.elements[0]);
}
parseProperty(propertyName2, propertyValue, object93) {
if (tools_default.isUnifyObject(propertyName2, propertyValue)) {
if (propertyValue.absolute) {
this.addElementToBody(propertyValue);
return true;
}
this.addElementToDOMParent(object93, propertyValue);
}
}
parseInnerElements(object93) {
var elements = object93.elements;
for (var c31 = elements.length - 1; c31 > 0; c31--) {
elements[c31 - 1].appendChild(elements[c31]);
}
if (object93.selector && this.addDOMToSelector) {
this.appendToSelector(object93, elements);
}
}
appendToSelector(object93, elements) {
var selector = object93.selector;
var element2 = document_default.querySelector(selector);
if (element2) {
element2.appendChild(elements[0]);
}
}
createDiv(divName, type, id2) {
var div = document_default.createElement("div");
var mainClassName = divName + tools_default.CamelCase(type.toUpperCase());
div.classList.add(mainClassName);
if (id2) {
div.classList.add(mainClassName.replace("_" + id2, "").replace(id2, ""));
}
div.classList.add(type);
div.classList.add(this.device);
div.classList.add(this.tint);
div.classList.add(this.os);
return div;
}
};
// framework/client/event.js
var event = class {
static {
__name(this, "event");
}
name;
className;
callback;
};
// framework/client/eventManager.js
var eventManager = class {
static {
__name(this, "eventManager");
}
events = new Array();
eventTerms = new Array();
constructor() {
var prototype = Object.getPrototypeOf(document.body);
var innerPrototype = Object.getPrototypeOf(prototype);
var objectProperties = Object.getOwnPropertyNames(innerPrototype);
var eventProperties = objectProperties.filter(this.filterEvent);
var properEventTerms = eventProperties.map(this.removeOn);
this.eventTerms = properEventTerms;
}
filterEvent(name) {
if (name[0] == "o" && name[1] == "n") {
return true;
} else {
return false;
}
}
removeOn(name) {
return name.substr(2, name.length);
}
addClientEvent(className2, eventName, callback) {
var newEvent = new event();
newEvent.className = className2;
newEvent.name = eventName;
newEvent.callback = callback;
this.events.push(newEvent);
}
getClientEvents(classname, eventName) {
var events = [];
for (var c31 = 0; c31 < this.events.length; c31++) {
var event2 = this.events[c31];
if (event2.className == classname && event2.name == eventName) {
events.push(event2);
}
}
return events;
}
parentHasEvent(object93, eventTerm) {
if (!object93) {
return false;
}
if (object93[eventTerm]) {
return true;
}
if (object93.parent) {
return this.parentHasEvent(object93.parent, eventTerm);
} else {
return false;
}
}
update_value(object93) {
if (object93.value && object93.value != "undefined") {
object93._value = object93.value;
}
}
createInputSetter(object93, element2) {
object93.__defineSetter__("value", function(value2) {
if (object93.datatype == "BOOLEAN") {
object93._value = value2;
element2.value = object93._value;
}
if (value2 && value2 != void 0 && value2 != "undefined") {
object93._value = value2;
element2.value = object93._value;
}
if (value2 == "") {
object93._value = false;
element2.value = "";
}
if (typeof value2 == "number") {
object93._value = value2;
element2.value = object93._value;
}
});
}
createUploadSetter(object93, element2) {
object93.__defineSetter__("value", function(value2) {
if (value2 != "undefined") {
object93._value = value2;
}
if (element2.value) {
}
});
}
createSetter(object93, element2) {
this.update_value(object93);
if (object93.inputType != "file") {
this.createInputSetter(object93, element2);
} else {
this.createUploadSetter(object93, element2);
}
}
createGetter(object93) {
object93.__defineGetter__("value", function(value2) {
if (typeof object93._value == "undefined") {
return "";
} else {
return object93._value;
}
});
}
parseEvents(object93) {
if (object93.defaultElement) {
this.createSetter(object93, object93.defaultElement);
this.createGetter(object93);
}
if (object93.customElement) {
this.createSetter(object93, object93.customElement);
this.createGetter(object93);
}
var eventTerms = this.eventTerms;
for (var c31 = 0; c31 < eventTerms.length; c31++) {
var eventTerm = eventTerms[c31];
this.parseEvent(object93, eventTerm);
}
}
defineEventCallback(object93, element2, eventTerm) {
var eventManager2 = this;
if (!this.parentHasEvent(object93.parent, eventTerm) || object93.selector) {
var eventNormalized = eventTerm.replace("box", "");
if (object93.getClassName() != "fileChooserSelectButton") {
element2["on" + eventNormalized] = function(event2) {
eventManager2.createEventCallback(event2, eventManager2);
};
}
}
}
createWindowResizeEventListener(object93) {
}
parseElement(object93, element2, eventTerm, box = false) {
element2.object = object93;
element2.eventTerm = eventTerm;
this.defineEventCallback(object93, element2, eventTerm);
}
parseDefaultElement(object93, eventTerm) {
if (object93[eventTerm]) {
this.parseElement(object93, object93.defaultElement, eventTerm);
if (object93.customElement) {
this.parseElement(object93, object93.customElement, eventTerm);
}
}
}
parseBoxElement(object93, eventTerm) {
if (object93["box" + tools_default.CamelCase(eventTerm)]) {
if (object93.boxElement) {
var element2 = object93.boxElement;
} else {
var element2 = object93.defaultElement;
}
this.parseElement(object93, element2, "box" + tools_default.CamelCase(eventTerm), true);
}
}
parseEvent(object93, eventTerm) {
this.parseDefaultElement(object93, eventTerm);
this.parseBoxElement(object93, eventTerm);
}
callMethod(object93, event2, eventTerm) {
if (object93[eventTerm]) {
object93.lastEvent = eventTerm;
object93[eventTerm](event2, object93);
}
}
createEventListener(event2, object93, box = false) {
var eventTerm = event2.type.replace("on", "");
if (box) {
eventTerm = "box" + tools_default.CamelCase(eventTerm);
}
this.callMethod(object93, event2, eventTerm);
if (!object93.isRoot && object93.parent) {
if (object93.propegateEvent) {
this.createEventListener(event2, object93.parent);
}
}
}
createEventListeners(event2, target, eventManager2, object93) {
if (object93.boxElement && target.className == object93.boxElement.className) {
eventManager2.createEventListener(event2, object93, true);
} else if (target.className == object93.defaultElement.className) {
eventManager2.createEventListener(event2, object93);
} else if (target.className == object93.customElement.className) {
eventManager2.createEventListener(event2, object93);
}
}
logEvent(event2, target) {
}
createEventCallback(event2, eventManager2) {
var target = event2.target;
var object93 = target.object;
if (!object93) {
console.error("This element does not have an object", target);
return false;
}
this.logEvent(event2, target);
this.createEventListeners(event2, target, eventManager2, object93);
}
};
// framework/unify/socketMessage.js
var socketMessage = class {
static {
__name(this, "socketMessage");
}
id = 0;
type = "promise";
data = false;
};
// framework/client/promiseManager.js
var promiseManager = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found:", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromiseFunction(messageID, object93 = false) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = {};
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
promiseObject.object = object93;
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/clonedeep.js
var LARGE_ARRAY_SIZE = 200;
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var MAX_SAFE_INTEGER = 9007199254740991;
var argsTag = "[object Arguments]";
var arrayTag = "[object Array]";
var boolTag = "[object Boolean]";
var dateTag = "[object Date]";
var errorTag = "[object Error]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var mapTag = "[object Map]";
var numberTag = "[object Number]";
var objectTag = "[object Object]";
var promiseTag = "[object Promise]";
var regexpTag = "[object RegExp]";
var setTag = "[object Set]";
var stringTag = "[object String]";
var symbolTag = "[object Symbol]";
var weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]";
var dataViewTag = "[object DataView]";
var float32Tag = "[object Float32Array]";
var float64Tag = "[object Float64Array]";
var int8Tag = "[object Int8Array]";
var int16Tag = "[object Int16Array]";
var int32Tag = "[object Int32Array]";
var uint8Tag = "[object Uint8Array]";
var uint8ClampedTag = "[object Uint8ClampedArray]";
var uint16Tag = "[object Uint16Array]";
var uint32Tag = "[object Uint32Array]";
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reFlags = /\w*$/;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
var moduleExports = freeModule && freeModule.exports === freeExports;
function addMapEntry(map, pair) {
map.set(pair[0], pair[1]);
return map;
}
__name(addMapEntry, "addMapEntry");
function addSetEntry(set, value2) {
set.add(value2);
return set;
}
__name(addSetEntry, "addSetEntry");
function arrayEach(array, iteratee) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
__name(arrayEach, "arrayEach");
function arrayPush(array, values) {
var index = -1, length = values.length, offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
__name(arrayPush, "arrayPush");
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1, length = array ? array.length : 0;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
__name(arrayReduce, "arrayReduce");
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
__name(baseTimes, "baseTimes");
function getValue(object93, key) {
return object93 == null ? void 0 : object93[key];
}
__name(getValue, "getValue");
function isHostObject(value2) {
var result = false;
if (value2 != null && typeof value2.toString != "function") {
try {
result = !!(value2 + "");
} catch (e) {
}
}
return result;
}
__name(isHostObject, "isHostObject");
function mapToArray(map) {
var index = -1, result = Array(map.size);
map.forEach(function(value2, key) {
result[++index] = [key, value2];
});
return result;
}
__name(mapToArray, "mapToArray");
function overArg(func, transform) {
return function(arg2) {
return func(transform(arg2));
};
}
__name(overArg, "overArg");
function setToArray(set) {
var index = -1, result = Array(set.size);
set.forEach(function(value2) {
result[++index] = value2;
});
return result;
}
__name(setToArray, "setToArray");
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
var Buffer2 = moduleExports ? root.Buffer : void 0;
var Symbol2 = root.Symbol;
var Uint8Array2 = root.Uint8Array;
var getPrototype = overArg(Object.getPrototypeOf, Object);
var objectCreate = Object.create;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var splice = arrayProto.splice;
var nativeGetSymbols = Object.getOwnPropertySymbols;
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
var nativeKeys = overArg(Object.keys, Object);
var DataView = getNative(root, "DataView");
var Map = getNative(root, "Map");
var Promise2 = getNative(root, "Promise");
var Set = getNative(root, "Set");
var WeakMap = getNative(root, "WeakMap");
var nativeCreate = getNative(Object, "create");
var dataViewCtorString = toSource(DataView);
var mapCtorString = toSource(Map);
var promiseCtorString = toSource(Promise2);
var setCtorString = toSource(Set);
var weakMapCtorString = toSource(WeakMap);
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
__name(Hash, "Hash");
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
__name(hashClear, "hashClear");
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
__name(hashDelete, "hashDelete");
function hashGet(key) {
var data2 = this.__data__;
if (nativeCreate) {
var result = data2[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data2, key) ? data2[key] : void 0;
}
__name(hashGet, "hashGet");
function hashHas(key) {
var data2 = this.__data__;
return nativeCreate ? data2[key] !== void 0 : hasOwnProperty.call(data2, key);
}
__name(hashHas, "hashHas");
function hashSet(key, value2) {
var data2 = this.__data__;
data2[key] = nativeCreate && value2 === void 0 ? HASH_UNDEFINED : value2;
return this;
}
__name(hashSet, "hashSet");
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
__name(ListCache, "ListCache");
function listCacheClear() {
this.__data__ = [];
}
__name(listCacheClear, "listCacheClear");
function listCacheDelete(key) {
var data2 = this.__data__, index = assocIndexOf(data2, key);
if (index < 0) {
return false;
}
var lastIndex = data2.length - 1;
if (index == lastIndex) {
data2.pop();
} else {
splice.call(data2, index, 1);
}
return true;
}
__name(listCacheDelete, "listCacheDelete");
function listCacheGet(key) {
var data2 = this.__data__, index = assocIndexOf(data2, key);
return index < 0 ? void 0 : data2[index][1];
}
__name(listCacheGet, "listCacheGet");
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
__name(listCacheHas, "listCacheHas");
function listCacheSet(key, value2) {
var data2 = this.__data__, index = assocIndexOf(data2, key);
if (index < 0) {
data2.push([key, value2]);
} else {
data2[index][1] = value2;
}
return this;
}
__name(listCacheSet, "listCacheSet");
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
__name(MapCache, "MapCache");
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map || ListCache)(),
"string": new Hash()
};
}
__name(mapCacheClear, "mapCacheClear");
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
__name(mapCacheDelete, "mapCacheDelete");
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
__name(mapCacheGet, "mapCacheGet");
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
__name(mapCacheHas, "mapCacheHas");
function mapCacheSet(key, value2) {
getMapData(this, key).set(key, value2);
return this;
}
__name(mapCacheSet, "mapCacheSet");
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function Stack(entries) {
this.__data__ = new ListCache(entries);
}
__name(Stack, "Stack");
function stackClear() {
this.__data__ = new ListCache();
}
__name(stackClear, "stackClear");
function stackDelete(key) {
return this.__data__["delete"](key);
}
__name(stackDelete, "stackDelete");
function stackGet(key) {
return this.__data__.get(key);
}
__name(stackGet, "stackGet");
function stackHas(key) {
return this.__data__.has(key);
}
__name(stackHas, "stackHas");
function stackSet(key, value2) {
var cache = this.__data__;
if (cache instanceof ListCache) {
var pairs = cache.__data__;
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value2]);
return this;
}
cache = this.__data__ = new MapCache(pairs);
}
cache.set(key, value2);
return this;
}
__name(stackSet, "stackSet");
Stack.prototype.clear = stackClear;
Stack.prototype["delete"] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value2, inherited) {
var result = isArray(value2) || isArguments(value2) ? baseTimes(value2.length, String) : [];
var length = result.length, skipIndexes = !!length;
for (var key in value2) {
if ((inherited || hasOwnProperty.call(value2, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
__name(arrayLikeKeys, "arrayLikeKeys");
function assignValue(object93, key, value2) {
var objValue = object93[key];
if (!(hasOwnProperty.call(object93, key) && eq(objValue, value2)) || value2 === void 0 && !(key in object93)) {
object93[key] = value2;
}
}
__name(assignValue, "assignValue");
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
__name(assocIndexOf, "assocIndexOf");
function baseAssign(object93, source) {
return object93 && copyObject(source, keys(source), object93);
}
__name(baseAssign, "baseAssign");
function baseClone(value2, isDeep, isFull, customizer, key, object93, stack) {
var result;
if (customizer) {
result = object93 ? customizer(value2, key, object93, stack) : customizer(value2);
}
if (result !== void 0) {
return result;
}
if (!isObject(value2)) {
return value2;
}
var isArr = isArray(value2);
if (isArr) {
result = initCloneArray(value2);
if (!isDeep) {
return copyArray(value2, result);
}
} else {
var tag = getTag(value2), isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value2)) {
return cloneBuffer(value2, isDeep);
}
if (tag == objectTag || tag == argsTag || isFunc && !object93) {
if (isHostObject(value2)) {
return object93 ? value2 : {};
}
result = initCloneObject(isFunc ? {} : value2);
if (!isDeep) {
return copySymbols(value2, baseAssign(result, value2));
}
} else {
if (!cloneableTags[tag]) {
return object93 ? value2 : {};
}
result = initCloneByTag(value2, tag, baseClone, isDeep);
}
}
stack || (stack = new Stack());
var stacked = stack.get(value2);
if (stacked) {
return stacked;
}
stack.set(value2, result);
if (!isArr) {
var props = isFull ? getAllKeys(value2) : keys(value2);
}
arrayEach(props || value2, function(subValue, key2) {
if (props) {
key2 = subValue;
subValue = value2[key2];
}
assignValue(result, key2, baseClone(subValue, isDeep, isFull, customizer, key2, value2, stack));
});
return result;
}
__name(baseClone, "baseClone");
function baseCreate(proto) {
return isObject(proto) ? objectCreate(proto) : {};
}
__name(baseCreate, "baseCreate");
function baseGetAllKeys(object93, keysFunc, symbolsFunc) {
var result = keysFunc(object93);
return isArray(object93) ? result : arrayPush(result, symbolsFunc(object93));
}
__name(baseGetAllKeys, "baseGetAllKeys");
function baseGetTag(value2) {
return objectToString.call(value2);
}
__name(baseGetTag, "baseGetTag");
function baseIsNative(value2) {
if (!isObject(value2) || isMasked(value2)) {
return false;
}
var pattern = isFunction(value2) || isHostObject(value2) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value2));
}
__name(baseIsNative, "baseIsNative");
function baseKeys(object93) {
if (!isPrototype(object93)) {
return nativeKeys(object93);
}
var result = [];
for (var key in Object(object93)) {
if (hasOwnProperty.call(object93, key) && key != "constructor") {
result.push(key);
}
}
return result;
}
__name(baseKeys, "baseKeys");
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var result = new buffer.constructor(buffer.length);
buffer.copy(result);
return result;
}
__name(cloneBuffer, "cloneBuffer");
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
return result;
}
__name(cloneArrayBuffer, "cloneArrayBuffer");
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
__name(cloneDataView, "cloneDataView");
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor());
}
__name(cloneMap, "cloneMap");
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
__name(cloneRegExp, "cloneRegExp");
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor());
}
__name(cloneSet, "cloneSet");
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
__name(cloneSymbol, "cloneSymbol");
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
__name(cloneTypedArray, "cloneTypedArray");
function copyArray(source, array) {
var index = -1, length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
__name(copyArray, "copyArray");
function copyObject(source, props, object93, customizer) {
object93 || (object93 = {});
var index = -1, length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object93[key], source[key], key, object93, source) : void 0;
assignValue(object93, key, newValue === void 0 ? source[key] : newValue);
}
return object93;
}
__name(copyObject, "copyObject");
function copySymbols(source, object93) {
return copyObject(source, getSymbols(source), object93);
}
__name(copySymbols, "copySymbols");
function getAllKeys(object93) {
return baseGetAllKeys(object93, keys, getSymbols);
}
__name(getAllKeys, "getAllKeys");
function getMapData(map, key) {
var data2 = map.__data__;
return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
}
__name(getMapData, "getMapData");
function getNative(object93, key) {
var value2 = getValue(object93, key);
return baseIsNative(value2) ? value2 : void 0;
}
__name(getNative, "getNative");
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = /* @__PURE__ */ __name(function(value2) {
var result = objectToString.call(value2), Ctor = result == objectTag ? value2.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
}, "getTag");
}
function initCloneArray(array) {
var length = array.length, result = array.constructor(length);
if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
result.index = array.index;
result.input = array.input;
}
return result;
}
__name(initCloneArray, "initCloneArray");
function initCloneObject(object93) {
return typeof object93.constructor == "function" && !isPrototype(object93) ? baseCreate(getPrototype(object93)) : {};
}
__name(initCloneObject, "initCloneObject");
function initCloneByTag(object93, tag, cloneFunc, isDeep) {
var Ctor = object93.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object93);
case boolTag:
case dateTag:
return new Ctor(+object93);
case dataViewTag:
return cloneDataView(object93, isDeep);
case float32Tag:
case float64Tag:
case int8Tag:
case int16Tag:
case int32Tag:
case uint8Tag:
case uint8ClampedTag:
case uint16Tag:
case uint32Tag:
return cloneTypedArray(object93, isDeep);
case mapTag:
return cloneMap(object93, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object93);
case regexpTag:
return cloneRegExp(object93);
case setTag:
return cloneSet(object93, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object93);
}
}
__name(initCloneByTag, "initCloneByTag");
function isIndex(value2, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value2 == "number" || reIsUint.test(value2)) && (value2 > -1 && value2 % 1 == 0 && value2 < length);
}
__name(isIndex, "isIndex");
function isKeyable(value2) {
var type = typeof value2;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value2 !== "__proto__" : value2 === null;
}
__name(isKeyable, "isKeyable");
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
__name(isMasked, "isMasked");
function isPrototype(value2) {
var Ctor = value2 && value2.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value2 === proto;
}
__name(isPrototype, "isPrototype");
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
__name(toSource, "toSource");
function cloneDeep(value2) {
return baseClone(value2, true, true);
}
__name(cloneDeep, "cloneDeep");
function eq(value2, other) {
return value2 === other || value2 !== value2 && other !== other;
}
__name(eq, "eq");
function isArguments(value2) {
return isArrayLikeObject(value2) && hasOwnProperty.call(value2, "callee") && (!propertyIsEnumerable.call(value2, "callee") || objectToString.call(value2) == argsTag);
}
__name(isArguments, "isArguments");
var isArray = Array.isArray;
function isArrayLike(value2) {
return value2 != null && isLength(value2.length) && !isFunction(value2);
}
__name(isArrayLike, "isArrayLike");
function isArrayLikeObject(value2) {
return isObjectLike(value2) && isArrayLike(value2);
}
__name(isArrayLikeObject, "isArrayLikeObject");
var isBuffer = nativeIsBuffer || stubFalse;
function isFunction(value2) {
var tag = isObject(value2) ? objectToString.call(value2) : "";
return tag == funcTag || tag == genTag;
}
__name(isFunction, "isFunction");
function isLength(value2) {
return typeof value2 == "number" && value2 > -1 && value2 % 1 == 0 && value2 <= MAX_SAFE_INTEGER;
}
__name(isLength, "isLength");
function isObject(value2) {
var type = typeof value2;
return !!value2 && (type == "object" || type == "function");
}
__name(isObject, "isObject");
function isObjectLike(value2) {
return !!value2 && typeof value2 == "object";
}
__name(isObjectLike, "isObjectLike");
function keys(object93) {
return isArrayLike(object93) ? arrayLikeKeys(object93) : baseKeys(object93);
}
__name(keys, "keys");
function stubArray() {
return [];
}
__name(stubArray, "stubArray");
function stubFalse() {
return false;
}
__name(stubFalse, "stubFalse");
var clonedeep_default = cloneDeep;
// framework/server/console.js
var Console = class {
static {
__name(this, "Console");
}
objects = new Array();
currentObject = false;
filename = false;
enabled = false;
enabledPaths = new Array();
rows = new Array();
tableName = false;
maxChars = new Array(0, 0, 0, 0, 0, 0);
padding = 4;
setFilename(filename) {
this.filename = filename;
}
createNameObject(parameter) {
if (!parameter) {
return false;
}
if (typeof parameter == "string") {
return parameter;
}
var object93 = {};
object93[tools_default.getClassName(parameter)] = parameter;
return object93;
}
getObjectByPath(objectA) {
var objects = this.objects;
for (var c31 = 0; c31 < objects.length; c31++) {
var objectB = objects[c31];
if (objectA.applicationPathString == objectB.applicationPathString) {
return objectB;
}
}
return false;
}
enableLog(path2) {
this.enabledPaths.push(path2);
}
register(object93) {
this.log("--------------------------", object93.getClassName());
}
sendObjectToDebugger(object93) {
var parameters = {};
parameters.action = "addObject";
parameters.object = cycle.decycle(object93);
var socketManager2 = global.socketManager;
var clients = socketManager2.clients;
for (var c31 = 0; c31 < clients.length; c31++) {
var client2 = clients[c31];
if (this.enabled) {
client2.debugMessage(parameters);
}
}
}
table(parameter1) {
if (global.clusterID == 1) {
console.table(parameter1);
}
}
warning(parameter1, parameter2, parameter3) {
if (global.clusterID == 1) {
if (parameter3) {
console.log(parameter1, parameter2, parameter3);
} else if (parameter2) {
console.log(parameter1, parameter2);
} else if (parameter1) {
console.log(tools_default.consoleColors().green(parameter1));
}
}
}
valid(parameter1, parameter2, parameter3) {
if (global.clusterID == 1) {
if (parameter3) {
console.log(parameter1, parameter2, parameter3);
} else if (parameter2) {
console.log(tools_default.consoleColors().cyan(parameter1), tools_default.consoleColors().cyan(parameter2));
} else if (parameter1) {
console.log(tools_default.consoleColors().green(parameter1));
}
}
}
log(parameter1, parameter2, parameter3) {
if (parameter3) {
console.log(parameter1, parameter2, parameter3);
} else if (parameter2) {
console.log(parameter1, parameter2);
} else if (parameter1) {
var parameter1 = clonedeep_default(parameter1);
tools_default.cleanObject(parameter1);
console.log(parameter1);
}
}
setWidth(width) {
this.maxChars = width;
}
addColumn(a32, b32, c31, d31) {
var row181 = new Array();
if (a32) {
row181.push(a32);
this.maxChars[0] = Math.max(this.maxChars[0], a32.length);
if (b32) {
row181.push(b32);
this.maxChars[1] = Math.max(this.maxChars[1], b32.length);
}
if (c31) {
row181.push(c31);
this.maxChars[2] = Math.max(this.maxChars[2], c31.length);
}
if (d31) {
row181.push(d31);
this.maxChars[3] = Math.max(this.maxChars[3], d31.length);
}
}
this.rows.push(row181);
}
logTable() {
for (var i = 0; i < this.rows.length; i++) {
var row181 = this.rows[i];
if (row181[0]) {
console.log(" ", row181[0].padEnd(this.maxChars[0] + this.padding), row181[1]);
} else if (row181[0]) {
}
}
console.log("\n");
this.rows = new Array();
}
};
var console_default = new Console();
// framework/unify/querySQL.js
var querySQL = class {
static {
__name(this, "querySQL");
}
__className = "querySQL";
type = "select";
columns = new Array();
table;
sync = true;
values = new Array();
objects = new Array();
where = new Array();
groups = new Array();
union = new Array();
order = new Array();
direction;
limit;
count;
from;
to;
joins = new Array();
filter = false;
filterAddress = "";
constructor(query) {
if (query) {
var items = Object.entries(query);
var queryString = "";
for (var c31 = 0; c31 < items.length; c31++) {
var currentQuery = items[c31];
var name = tools_default.getClassNameByEntry(currentQuery);
var value2 = tools_default.getObjectByEntry(currentQuery);
this[name] = value2;
}
}
}
orderBy(order) {
this.order.push(order);
}
addUnion(unionQuery) {
this.union.push(unionQuery);
}
setFilterAddress(filter) {
this.filterAddress = filter;
}
setFilter(filterAddress) {
this.filter = filterAddress;
}
addJoin(join) {
if (!join.name) {
console.error("join requires name", this, join);
}
this.joins.push(join);
}
addColumn(columnName) {
this.columns.push(columnName);
}
addGroup(columnName) {
var group = new Object();
group.columnName = columnName;
this.groups.push(group);
}
getWhereByColumnName(name) {
for (var i = 0; i < this.where.length; i++) {
var where = this.where[i];
if (where.columnName == name) {
return where.value;
}
}
return false;
}
find(columnName, value2, type = "=", quotation = true, or = false) {
var where = {};
where.columnName = columnName;
where.value = value2;
where.type = type;
where.quotation = quotation;
where.or = or;
this.where.push(where);
}
getColumnByName(name) {
for (var i = 0; i < this.values.length; i++) {
var column31 = this.values[i];
if (column31.name == name) {
return column31;
}
}
return false;
}
setColumn(columnName, value2) {
if (typeof value2 == "boolean") {
if (value2) {
value2 = "true";
} else {
value2 = "false";
}
}
var column31 = {};
column31.name = columnName;
column31.value = value2;
this.values.push(column31);
}
setValue(columnName, value2) {
var column31 = {};
if (typeof value2 == "boolean") {
if (value2) {
value2 = "true";
} else {
value2 = "false";
}
}
column31.name = columnName;
column31.value = value2;
this.values.push(column31);
}
set(columnName, value2) {
var column31 = {};
column31.name = columnName;
column31.value = value2;
this.values.push(column31);
}
getColumnNames() {
var columnNames = new Array();
for (var c31 = 0; c31 < this.values.length; c31++) {
columnNames.push(this.values[c31].name);
}
return columnNames.join(", ");
}
getValues() {
var values = new Array();
for (var c31 = 0; c31 < this.values.length; c31++) {
values.push(this.values[c31].value);
}
return values;
}
extractColumns(object93, queryName) {
var children = object93.getChildren();
this.addColumn(queryName + ".id");
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.datatype) {
this.addColumn(queryName + "." + child.propertyName);
}
if (child.type == "table") {
var name = child.propertyName;
var columnName = name + "_id";
this.addColumn(queryName + "." + columnName);
}
}
}
/* doesnt make sense
addRows( rows ) {
for (var i = 0; i < rows.length; i++) {
this.addRow( rows[i] );
}
}
*/
addRow(row181) {
const entries = Object.entries(row181);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.addColumn(entry[0]);
this.setColumn(entry[0], entry[1]);
}
}
addObject(object93) {
if (this.objects.length == 0) {
this.table = tools_default.getTableName(object93);
if (!this.table) {
this.table = tools_default.getTableName(object93.parent);
this.setColumn(object93.propertyName, object93.value);
} else {
if (object93.user && object93.user.id) {
var properties = object93.getProperties();
for (var c31 = 0; c31 < properties.length; c31++) {
var property2 = properties[c31];
if (property2.value == "userplaceholder" && property2.name != "user") {
this.setColumn(property2.name + "_id", object93.user.id);
}
}
}
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.datatype) {
if (typeof child.constraints == "object") {
if (child.constraints.includes("AUTOINCREMENT")) {
continue;
}
}
this.setColumn(child.propertyName, child.value, child.extendsClass("table"));
}
if (child.type == "table" && child.extendsTable()) {
var name = child.propertyName;
var columnName = name + "_id";
var id2 = child.id;
if (id2) {
this.setColumn(columnName, id2);
}
}
}
}
if (this.type.toLowerCase() == "update") {
this.find("id", object93.id);
}
}
this.objects.push(object93);
}
queryUpdateChildren() {
var objects = this.objects;
var id2 = 0;
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var values = new Array();
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.datatype) {
values.push(child.value);
}
}
values.push(object93.id);
}
}
};
// framework/unify/joinSQL.js
var joinSide = class {
static {
__name(this, "joinSide");
}
table;
column;
};
var joinSQL = class extends querySQL {
static {
__name(this, "joinSQL");
}
__className = "joinSQL";
type = "join";
left = new joinSide();
right = new joinSide();
joins = new Array();
querys = new Array();
addJoin(join) {
this.joins.push(join);
}
addQuery(query) {
this.querys.push(query);
}
};
// framework/server/collection/collection.queryChildren.js
var queryChildren = class {
static {
__name(this, "queryChildren");
}
createQuery(joinTableName, joinQuery, id2) {
var query = new querySQL();
query.table = joinTableName;
query.debug = joinQuery.debug;
query.find(this.collection.getLeft() + "_id", id2);
return query;
}
createJoin(joinQuery) {
var join = new joinSQL(joinQuery);
join.table = this.collection.tableName;
join.name = "children";
join.left.table = join.name;
join.right.column = this.collection.getRight() + "_id";
join.find("signed", "true");
return join;
}
query(joinQuery, filterObject) {
var object93 = this.collection.getObject();
var leftTable = this.collection.getParentName();
var rightTable = object93.propertyName;
var id2 = this.collection.getID(object93);
var joinTableName = leftTable + "_" + rightTable;
var query = this.createQuery(joinTableName, joinQuery, id2);
var join = this.createJoin(joinQuery, join);
if (filterObject) {
this.collection.filterQuery(join, filterObject);
if (filterObject.search) {
this.collection.searchQuery(join, filterObject);
}
}
query.addJoin(join);
var result = global.database.query(query);
return result;
}
};
// framework/server/collection/collection.queryRoot.js
var queryRoot = class {
static {
__name(this, "queryRoot");
}
prepareSelectQuery(query, object93, userQuery) {
query.table = this.collection.getTableName();
query.type = "select";
query.setFilterAddress("./");
query.extractColumns(object93, query.table);
query.find("signed", "true");
query.find("joined", "false");
query.debug = userQuery.debug;
return query;
}
createChildrenJoin(joinTableName, collectionObject, object93) {
var childObject = new collectionObject.object();
var childObjectName = tools_default.getClassName(childObject);
var childrenJoin = new joinSQL();
childrenJoin.table = childObjectName;
childrenJoin.joinType = "INNER";
childrenJoin.name = "childrenJoin";
childrenJoin.left.table = joinTableName;
childrenJoin.left.column = collectionObject.getRight() + "_id";
childrenJoin.right.table = childrenJoin.name;
childrenJoin.right.column = "id";
childrenJoin.find("signed", "true");
childrenJoin.find("joined", "true");
return childrenJoin;
}
createParentJoin(joinTableName, collectionObject) {
var parentJoin = new joinSQL();
parentJoin.table = this.collection.getTableName();
parentJoin.joinType = "INNER";
parentJoin.name = "parentJoin";
parentJoin.left.table = joinTableName;
parentJoin.left.column = collectionObject.getLeft() + "_id";
parentJoin.right.table = parentJoin.name;
parentJoin.right.column = "id";
return parentJoin;
}
createJoinQuery(joinTableName, object93) {
var query = new querySQL();
query.table = joinTableName;
query.type = "select";
query.extractColumns(object93, "parentJoin");
return query;
}
searchChildrenJoin(child, childrenJoin, filterObject) {
if (filterObject.search) {
var searchables = filterObject.search.findPath("./" + child.propertyName);
for (var i = 0; i < searchables.length; i++) {
var currentSearchable = searchables[i];
var columnName = currentSearchable.getColumnName();
var searchValue = currentSearchable.getValue();
var operator = currentSearchable.getOperator();
if (!searchValue) {
var searchValue = "";
}
childrenJoin.find(columnName, searchValue, operator, true, true);
}
}
}
composeJoinQuery(query, collectionObject, childrenJoin, parentJoin) {
query.addGroup(collectionObject.getLeft() + "_id");
query.addJoin(childrenJoin);
query.addJoin(parentJoin);
}
createJoinTableName(collectionObject) {
var leftTable = this.collection.getTableName();
var rightTable = collectionObject.propertyName;
var joinTableName = leftTable + "_" + rightTable;
return joinTableName;
}
queryFilterChild(unionQuery, object93, child, filterObject) {
var collectionObject = object93[child.propertyName];
var tableName = collectionObject.tableName;
var joinTableName = this.createJoinTableName(collectionObject);
var joinQuery = this.createJoinQuery(joinTableName, object93);
var childrenJoin = this.createChildrenJoin(joinTableName, collectionObject, object93);
var parentJoin = this.createParentJoin(joinTableName, collectionObject);
this.composeJoinQuery(joinQuery, collectionObject, childrenJoin, parentJoin);
this.searchChildrenJoin(child, childrenJoin, filterObject);
unionQuery.addUnion(joinQuery);
}
queryChildren(filterObject, unionQuery, client2) {
var children = filterObject.getChildren();
var joined = false;
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "collection") {
var object93 = new this.collection.object();
core.parse(object93, client2);
if (filterObject.search && filterObject.search.findPath("./" + child.propertyName)) {
this.queryFilterChild(unionQuery, object93, child, filterObject);
}
}
}
}
query(userQuery, filterObject, client2) {
var core3 = this.collection.getCore();
var object93 = new this.collection.object();
var query = new querySQL();
this.prepareSelectQuery(query, object93, userQuery);
this.collection.searchQuery(query, filterObject);
var unionQuery = new querySQL();
unionQuery.addUnion(query);
this.collection.filterQuery(unionQuery, filterObject);
this.queryChildren(filterObject, unionQuery, client2);
unionQuery.debug = userQuery.debug;
var parentResult = global.database.query(unionQuery);
return parentResult;
}
};
// framework/server/collection/collection.queryCount.js
var queryCount = class {
static {
__name(this, "queryCount");
}
createJoin() {
var join = new joinSQL();
join.table = this.tableName;
join.name = "children";
join.left.table = join.name;
join.right.column = this.getRight() + "_id";
join.find("signed", "true");
return join;
}
createQuery() {
var object93 = this.getObject();
var leftTable = this.parentName;
var rightTable = object93.propertyName;
var id2 = this.collection.getID();
var joinTableName = leftTable + "_" + rightTable;
var query = new querySQL();
query.table = joinTableName;
query.find(this.getLeft() + "_id", id2);
return query;
}
query() {
var query = this.createQuery();
var join = this.createJoin();
query.addJoin(join);
return global.database.query(query).length;
}
};
// framework/server/collection/collection.js
var collection2 = class {
static {
__name(this, "collection");
}
__className = "collection";
queryChildren = new queryChildren();
queryRoot = new queryRoot();
queryCount = new queryCount();
constructor() {
this.queryChildren.collection = this;
this.queryRoot.collection = this;
this.queryCount.collection = this;
}
querySelect(userQuery, filterObject, client2) {
if (!userQuery) {
userQuery = new querySQL();
}
if (this.parent) {
return this.queryChildren.query(userQuery, filterObject);
} else {
return this.queryRoot.query(userQuery, filterObject, client2);
}
}
countRows() {
return this.queryCount.query();
}
filterQuery(query, filterObject) {
this.prepareOrder(query, filterObject);
if (filterObject.direction) {
query.direction = filterObject.direction;
}
if (filterObject.limit) {
query.limit = filterObject.limit;
}
if (filterObject.from) {
query.offset = filterObject.from;
}
if (filterObject.offset) {
query.offset = filterObject.offset;
}
}
prepareOrder(unionQuery, filterObject) {
if (filterObject.order) {
var searchable2 = filterObject.order.findPath(".")[0];
if (searchable2) {
var columnName = searchable2.getColumnName();
unionQuery.orderBy(columnName);
}
}
}
searchQuery(query, filterObject) {
if (filterObject.search) {
var searchables = filterObject.search.findPath(".");
for (var i = 0; i < searchables.length; i++) {
var currentSearchable = searchables[i];
var columnName = currentSearchable.getColumnName();
var searchValue = currentSearchable.getValue();
var operator = currentSearchable.getOperator();
if (!searchValue) {
var searchValue = "";
}
query.find(columnName, searchValue, operator, true, true);
}
}
}
getID(object93) {
var id2 = object93.id;
if (!id2) {
id2 = object93.parent.id;
}
if (!id2) {
id2 = this.id;
}
return id2;
}
rowExists(id2) {
var rows = this.rows;
for (var i = 0; i < rows.length; i++) {
var currentChild = rows[i];
if (id2 == currentChild.id) {
return true;
}
}
return false;
}
getRowByID(id2) {
var rows = this.rows;
for (var i = 0; i < rows.length; i++) {
var currentChild = rows[i];
if (id2 == currentChild.id) {
return currentChild;
}
}
return false;
}
findID(rows, id2) {
for (var i = 0; i < rows.length; i++) {
var currentChild = rows[i];
console.log("find id", id2, currentChild.id);
if (id2 == currentChild.id) {
return true;
}
}
return false;
}
delete(object93) {
this.remove(object93);
}
remove(object93) {
var row_id = object93.id;
var joinTable = this.tableName + "_" + this.propertyName;
var query = new querySQL();
query.type = "delete";
query.table = joinTable;
query.find(this.getLeft() + "_id", this.parent.id);
query.find(this.getRight() + "_id", row_id);
global.database.query(query);
}
add(object93) {
var row_id = object93.id;
var query = new querySQL();
var parentName = this.getParentName();
var joinTable = parentName + "_" + this.propertyName;
query.type = "insert";
query.table = joinTable;
query.setColumn(this.getLeft() + "_id", this.parent.id);
query.setColumn(this.getRight() + "_id", row_id);
global.database.query(query);
}
getObject() {
if (this.propertyName == "storageCollection") {
return this.parent;
} else {
return this;
}
}
queryInsert(parent_id, last_insert_id) {
var joinTable = this.parentName + "_" + this.propertyName;
var left = this.getLeft();
var right = this.getRight();
var query = new querySQL();
query.type = "insert";
query.table = joinTable;
query.setValue(right + "_id", last_insert_id);
query.setValue(left + "_id", parent_id);
return global.database.query(query);
}
};
// framework/unify/emptyObject.js
var emptyObject = class {
static {
__name(this, "emptyObject");
}
};
// framework/unify/purify.js
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
return typeof obj2;
} : function(obj2) {
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
}, _typeof(obj);
}
__name(_typeof, "_typeof");
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || /* @__PURE__ */ __name(function _setPrototypeOf2(o2, p2) {
o2.__proto__ = p2;
return o2;
}, "_setPrototypeOf");
return _setPrototypeOf(o, p);
}
__name(_setPrototypeOf, "_setPrototypeOf");
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct)
return false;
if (Reflect.construct.sham)
return false;
if (typeof Proxy === "function")
return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
return true;
} catch (e) {
return false;
}
}
__name(_isNativeReflectConstruct, "_isNativeReflectConstruct");
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = /* @__PURE__ */ __name(function _construct2(Parent2, args2, Class2) {
var a32 = [null];
a32.push.apply(a32, args2);
var Constructor = Function.bind.apply(Parent2, a32);
var instance = new Constructor();
if (Class2)
_setPrototypeOf(instance, Class2.prototype);
return instance;
}, "_construct");
}
return _construct.apply(null, arguments);
}
__name(_construct, "_construct");
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
__name(_toConsumableArray, "_toConsumableArray");
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr))
return _arrayLikeToArray(arr);
}
__name(_arrayWithoutHoles, "_arrayWithoutHoles");
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
return Array.from(iter);
}
__name(_iterableToArray, "_iterableToArray");
function _unsupportedIterableToArray(o, minLen) {
if (!o)
return;
if (typeof o === "string")
return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor)
n = o.constructor.name;
if (n === "Map" || n === "Set")
return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return _arrayLikeToArray(o, minLen);
}
__name(_unsupportedIterableToArray, "_unsupportedIterableToArray");
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length)
len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++)
arr2[i] = arr[i];
return arr2;
}
__name(_arrayLikeToArray, "_arrayLikeToArray");
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.");
}
__name(_nonIterableSpread, "_nonIterableSpread");
var hasOwnProperty2 = Object.hasOwnProperty;
var setPrototypeOf = Object.setPrototypeOf;
var isFrozen = Object.isFrozen;
var getPrototypeOf = Object.getPrototypeOf;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var freeze = Object.freeze;
var seal = Object.seal;
var create = Object.create;
var _ref = typeof Reflect !== "undefined" && Reflect;
var apply = _ref.apply;
var construct = _ref.construct;
if (!apply) {
apply = /* @__PURE__ */ __name(function apply2(fun, thisValue, args) {
return fun.apply(thisValue, args);
}, "apply");
}
if (!freeze) {
freeze = /* @__PURE__ */ __name(function freeze2(x) {
return x;
}, "freeze");
}
if (!seal) {
seal = /* @__PURE__ */ __name(function seal2(x) {
return x;
}, "seal");
}
if (!construct) {
construct = /* @__PURE__ */ __name(function construct2(Func, args) {
return _construct(Func, _toConsumableArray(args));
}, "construct");
}
var arrayForEach = unapply(Array.prototype.forEach);
var arrayPop = unapply(Array.prototype.pop);
var arrayPush2 = unapply(Array.prototype.push);
var stringToLowerCase = unapply(String.prototype.toLowerCase);
var stringMatch = unapply(String.prototype.match);
var stringReplace = unapply(String.prototype.replace);
var stringIndexOf = unapply(String.prototype.indexOf);
var stringTrim = unapply(String.prototype.trim);
var regExpTest = unapply(RegExp.prototype.test);
var typeErrorCreate = unconstruct(TypeError);
function unapply(func) {
return function(thisArg) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return apply(func, thisArg, args);
};
}
__name(unapply, "unapply");
function unconstruct(func) {
return function() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return construct(func, args);
};
}
__name(unconstruct, "unconstruct");
function addToSet(set, array, transformCaseFunc) {
transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;
if (setPrototypeOf) {
setPrototypeOf(set, null);
}
var l = array.length;
while (l--) {
var element2 = array[l];
if (typeof element2 === "string") {
var lcElement = transformCaseFunc(element2);
if (lcElement !== element2) {
if (!isFrozen(array)) {
array[l] = lcElement;
}
element2 = lcElement;
}
}
set[element2] = true;
}
return set;
}
__name(addToSet, "addToSet");
function clone(object93) {
var newObject = create(null);
var property2;
for (property2 in object93) {
if (apply(hasOwnProperty2, object93, [property2])) {
newObject[property2] = object93[property2];
}
}
return newObject;
}
__name(clone, "clone");
function lookupGetter(object93, prop) {
while (object93 !== null) {
var desc = getOwnPropertyDescriptor(object93, prop);
if (desc) {
if (desc.get) {
return unapply(desc.get);
}
if (typeof desc.value === "function") {
return unapply(desc.value);
}
}
object93 = getPrototypeOf(object93);
}
function fallbackValue(element2) {
console.warn("fallback value for", element2);
return null;
}
__name(fallbackValue, "fallbackValue");
return fallbackValue;
}
__name(lookupGetter, "lookupGetter");
var html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
var svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
var svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
var svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
var mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]);
var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
var text = freeze(["#text"]);
var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]);
var svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/);
var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
var IS_ALLOWED_URI = seal(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
// eslint-disable-line no-useless-escape
);
var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
var ATTR_WHITESPACE = seal(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
// eslint-disable-line no-control-regex
);
var DOCTYPE_NAME = seal(/^html$/i);
var getGlobal = /* @__PURE__ */ __name(function getGlobal2() {
return typeof window === "undefined" ? null : window;
}, "getGlobal");
var _createTrustedTypesPolicy = /* @__PURE__ */ __name(function _createTrustedTypesPolicy2(trustedTypes, document2) {
if (_typeof(trustedTypes) !== "object" || typeof trustedTypes.createPolicy !== "function") {
return null;
}
var suffix = null;
var ATTR_NAME = "data-tt-policy-suffix";
if (document2.currentScript && document2.currentScript.hasAttribute(ATTR_NAME)) {
suffix = document2.currentScript.getAttribute(ATTR_NAME);
}
var policyName = "dompurify" + (suffix ? "#" + suffix : "");
try {
return trustedTypes.createPolicy(policyName, {
createHTML: /* @__PURE__ */ __name(function createHTML(html2) {
return html2;
}, "createHTML"),
createScriptURL: /* @__PURE__ */ __name(function createScriptURL(scriptUrl) {
return scriptUrl;
}, "createScriptURL")
});
} catch (_) {
console.warn("TrustedTypes policy " + policyName + " could not be created.");
return null;
}
}, "_createTrustedTypesPolicy");
function createDOMPurify() {
var window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
var DOMPurify = /* @__PURE__ */ __name(function DOMPurify2(root2) {
return createDOMPurify(root2);
}, "DOMPurify");
DOMPurify.version = "2.3.10";
DOMPurify.removed = [];
if (!window2 || !window2.document || window2.document.nodeType !== 9) {
DOMPurify.isSupported = false;
return DOMPurify;
}
var originalDocument = window2.document;
var document2 = window2.document;
var DocumentFragment = window2.DocumentFragment, HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement = window2.HTMLFormElement, DOMParser = window2.DOMParser, trustedTypes = window2.trustedTypes;
var ElementPrototype = Element.prototype;
var cloneNode = lookupGetter(ElementPrototype, "cloneNode");
var getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
var getChildNodes = lookupGetter(ElementPrototype, "childNodes");
var getParentNode = lookupGetter(ElementPrototype, "parentNode");
if (typeof HTMLTemplateElement === "function") {
var template = document2.createElement("template");
if (template.content && template.content.ownerDocument) {
document2 = template.content.ownerDocument;
}
}
var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML("") : "";
var _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
var importNode = originalDocument.importNode;
var documentMode = {};
try {
documentMode = clone(document2).documentMode ? document2.documentMode : {};
} catch (_) {
}
var hooks = {};
DOMPurify.isSupported = typeof getParentNode === "function" && implementation && typeof implementation.createHTMLDocument !== "undefined" && documentMode !== 9;
var MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE;
var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
var ALLOWED_TAGS = null;
var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));
var ALLOWED_ATTR = null;
var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));
var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
tagNameCheck: {
writable: true,
configurable: false,
enumerable: true,
value: null
},
attributeNameCheck: {
writable: true,
configurable: false,
enumerable: true,
value: null
},
allowCustomizedBuiltInElements: {
writable: true,
configurable: false,
enumerable: true,
value: false
}
}));
var FORBID_TAGS = null;
var FORBID_ATTR = null;
var ALLOW_ARIA_ATTR = true;
var ALLOW_DATA_ATTR = true;
var ALLOW_UNKNOWN_PROTOCOLS = false;
var SAFE_FOR_TEMPLATES = false;
var WHOLE_DOCUMENT = false;
var SET_CONFIG = false;
var FORCE_BODY = false;
var RETURN_DOM = false;
var RETURN_DOM_FRAGMENT = false;
var RETURN_TRUSTED_TYPE = false;
var SANITIZE_DOM = true;
var KEEP_CONTENT = true;
var IN_PLACE = false;
var USE_PROFILES = {};
var FORBID_CONTENTS = null;
var DEFAULT_FORBID_CONTENTS = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
var DATA_URI_TAGS = null;
var DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
var URI_SAFE_ATTRIBUTES = null;
var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
var MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
var NAMESPACE = HTML_NAMESPACE;
var IS_EMPTY_INPUT = false;
var PARSER_MEDIA_TYPE;
var SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
var DEFAULT_PARSER_MEDIA_TYPE = "text/html";
var transformCaseFunc;
var CONFIG = null;
var formElement = document2.createElement("form");
var isRegexOrFunction = /* @__PURE__ */ __name(function isRegexOrFunction2(testValue) {
return testValue instanceof RegExp || testValue instanceof Function;
}, "isRegexOrFunction");
var _parseConfig = /* @__PURE__ */ __name(function _parseConfig2(cfg) {
if (CONFIG && CONFIG === cfg) {
return;
}
if (!cfg || _typeof(cfg) !== "object") {
cfg = {};
}
cfg = clone(cfg);
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? function(x) {
return x;
} : stringToLowerCase;
ALLOWED_TAGS = "ALLOWED_TAGS" in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
ALLOWED_ATTR = "ALLOWED_ATTR" in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
URI_SAFE_ATTRIBUTES = "ADD_URI_SAFE_ATTR" in cfg ? addToSet(
clone(DEFAULT_URI_SAFE_ATTRIBUTES),
// eslint-disable-line indent
cfg.ADD_URI_SAFE_ATTR,
// eslint-disable-line indent
transformCaseFunc
// eslint-disable-line indent
) : DEFAULT_URI_SAFE_ATTRIBUTES;
DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet(
clone(DEFAULT_DATA_URI_TAGS),
// eslint-disable-line indent
cfg.ADD_DATA_URI_TAGS,
// eslint-disable-line indent
transformCaseFunc
// eslint-disable-line indent
) : DEFAULT_DATA_URI_TAGS;
FORBID_CONTENTS = "FORBID_CONTENTS" in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
FORBID_TAGS = "FORBID_TAGS" in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
FORBID_ATTR = "FORBID_ATTR" in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
USE_PROFILES = "USE_PROFILES" in cfg ? cfg.USE_PROFILES : false;
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
RETURN_DOM = cfg.RETURN_DOM || false;
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
FORCE_BODY = cfg.FORCE_BODY || false;
SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
IN_PLACE = cfg.IN_PLACE || false;
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
}
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
}
if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
}
if (SAFE_FOR_TEMPLATES) {
ALLOW_DATA_ATTR = false;
}
if (RETURN_DOM_FRAGMENT) {
RETURN_DOM = true;
}
if (USE_PROFILES) {
ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));
ALLOWED_ATTR = [];
if (USE_PROFILES.html === true) {
addToSet(ALLOWED_TAGS, html$1);
addToSet(ALLOWED_ATTR, html);
}
if (USE_PROFILES.svg === true) {
addToSet(ALLOWED_TAGS, svg$1);
addToSet(ALLOWED_ATTR, svg);
addToSet(ALLOWED_ATTR, xml);
}
if (USE_PROFILES.svgFilters === true) {
addToSet(ALLOWED_TAGS, svgFilters);
addToSet(ALLOWED_ATTR, svg);
addToSet(ALLOWED_ATTR, xml);
}
if (USE_PROFILES.mathMl === true) {
addToSet(ALLOWED_TAGS, mathMl$1);
addToSet(ALLOWED_ATTR, mathMl);
addToSet(ALLOWED_ATTR, xml);
}
}
if (cfg.ADD_TAGS) {
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
ALLOWED_TAGS = clone(ALLOWED_TAGS);
}
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
}
if (cfg.ADD_ATTR) {
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
ALLOWED_ATTR = clone(ALLOWED_ATTR);
}
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
}
if (cfg.ADD_URI_SAFE_ATTR) {
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
}
if (cfg.FORBID_CONTENTS) {
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
FORBID_CONTENTS = clone(FORBID_CONTENTS);
}
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
}
if (KEEP_CONTENT) {
ALLOWED_TAGS["#text"] = true;
}
if (WHOLE_DOCUMENT) {
addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
}
if (ALLOWED_TAGS.table) {
addToSet(ALLOWED_TAGS, ["tbody"]);
delete FORBID_TAGS.tbody;
}
if (freeze) {
freeze(cfg);
}
CONFIG = cfg;
}, "_parseConfig");
var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
var HTML_INTEGRATION_POINTS = addToSet({}, ["foreignobject", "desc", "title", "annotation-xml"]);
var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
var ALL_SVG_TAGS = addToSet({}, svg$1);
addToSet(ALL_SVG_TAGS, svgFilters);
addToSet(ALL_SVG_TAGS, svgDisallowed);
var ALL_MATHML_TAGS = addToSet({}, mathMl$1);
addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
var _checkValidNamespace = /* @__PURE__ */ __name(function _checkValidNamespace2(element2) {
var parent = getParentNode(element2);
if (!parent || !parent.tagName) {
parent = {
namespaceURI: HTML_NAMESPACE,
tagName: "template"
};
}
var tagName = stringToLowerCase(element2.tagName);
var parentTagName = stringToLowerCase(parent.tagName);
if (element2.namespaceURI === SVG_NAMESPACE) {
if (parent.namespaceURI === HTML_NAMESPACE) {
return tagName === "svg";
}
if (parent.namespaceURI === MATHML_NAMESPACE) {
return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
}
return Boolean(ALL_SVG_TAGS[tagName]);
}
if (element2.namespaceURI === MATHML_NAMESPACE) {
if (parent.namespaceURI === HTML_NAMESPACE) {
return tagName === "math";
}
if (parent.namespaceURI === SVG_NAMESPACE) {
return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
}
return Boolean(ALL_MATHML_TAGS[tagName]);
}
if (element2.namespaceURI === HTML_NAMESPACE) {
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
return false;
}
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
return false;
}
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
}
return false;
}, "_checkValidNamespace");
var _forceRemove = /* @__PURE__ */ __name(function _forceRemove2(node) {
arrayPush2(DOMPurify.removed, {
element: node
});
try {
node.parentNode.removeChild(node);
} catch (_) {
try {
node.outerHTML = emptyHTML;
} catch (_2) {
node.remove();
}
}
}, "_forceRemove");
var _removeAttribute = /* @__PURE__ */ __name(function _removeAttribute2(name, node) {
try {
arrayPush2(DOMPurify.removed, {
attribute: node.getAttributeNode(name),
from: node
});
} catch (_) {
arrayPush2(DOMPurify.removed, {
attribute: null,
from: node
});
}
node.removeAttribute(name);
if (name === "is" && !ALLOWED_ATTR[name]) {
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
try {
_forceRemove(node);
} catch (_) {
}
} else {
try {
node.setAttribute(name, "");
} catch (_) {
}
}
}
}, "_removeAttribute");
var _initDocument = /* @__PURE__ */ __name(function _initDocument2(dirty) {
var doc;
var leadingWhitespace;
if (FORCE_BODY) {
dirty = "" + dirty;
} else {
var matches = stringMatch(dirty, /^[\r\n\t ]+/);
leadingWhitespace = matches && matches[0];
}
if (PARSER_MEDIA_TYPE === "application/xhtml+xml") {
dirty = '
' + dirty + "";
}
var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
if (NAMESPACE === HTML_NAMESPACE) {
try {
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
} catch (_) {
}
}
if (!doc || !doc.documentElement) {
doc = implementation.createDocument(NAMESPACE, "template", null);
try {
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? "" : dirtyPayload;
} catch (_) {
}
}
var body61 = doc.body || doc.documentElement;
if (dirty && leadingWhitespace) {
body61.insertBefore(document2.createTextNode(leadingWhitespace), body61.childNodes[0] || null);
}
if (NAMESPACE === HTML_NAMESPACE) {
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
}
return WHOLE_DOCUMENT ? doc.documentElement : body61;
}, "_initDocument");
var _createIterator = /* @__PURE__ */ __name(function _createIterator2(root2) {
return createNodeIterator.call(
root2.ownerDocument || root2,
root2,
// eslint-disable-next-line no-bitwise
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT,
null,
false
);
}, "_createIterator");
var _isClobbered = /* @__PURE__ */ __name(function _isClobbered2(elm) {
return elm instanceof HTMLFormElement && (typeof elm.nodeName !== "string" || typeof elm.textContent !== "string" || typeof elm.removeChild !== "function" || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== "function" || typeof elm.setAttribute !== "function" || typeof elm.namespaceURI !== "string" || typeof elm.insertBefore !== "function");
}, "_isClobbered");
var _isNode = /* @__PURE__ */ __name(function _isNode2(object93) {
return _typeof(Node) === "object" ? object93 instanceof Node : object93 && _typeof(object93) === "object" && typeof object93.nodeType === "number" && typeof object93.nodeName === "string";
}, "_isNode");
var _executeHook = /* @__PURE__ */ __name(function _executeHook2(entryPoint, currentNode, data2) {
if (!hooks[entryPoint]) {
return;
}
arrayForEach(hooks[entryPoint], function(hook) {
hook.call(DOMPurify, currentNode, data2, CONFIG);
});
}, "_executeHook");
var _sanitizeElements = /* @__PURE__ */ __name(function _sanitizeElements2(currentNode) {
var content;
_executeHook("beforeSanitizeElements", currentNode, null);
if (_isClobbered(currentNode)) {
_forceRemove(currentNode);
return true;
}
if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) {
_forceRemove(currentNode);
return true;
}
var tagName = transformCaseFunc(currentNode.nodeName);
_executeHook("uponSanitizeElement", currentNode, {
tagName,
allowedTags: ALLOWED_TAGS
});
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
_forceRemove(currentNode);
return true;
}
if (tagName === "select" && regExpTest(/= 0; --i) {
parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
}
}
}
_forceRemove(currentNode);
return true;
}
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
_forceRemove(currentNode);
return true;
}
if ((tagName === "noscript" || tagName === "noembed") && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
_forceRemove(currentNode);
return true;
}
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
content = currentNode.textContent;
content = stringReplace(content, MUSTACHE_EXPR$1, " ");
content = stringReplace(content, ERB_EXPR$1, " ");
if (currentNode.textContent !== content) {
arrayPush2(DOMPurify.removed, {
element: currentNode.cloneNode()
});
currentNode.textContent = content;
}
}
_executeHook("afterSanitizeElements", currentNode, null);
return false;
}, "_sanitizeElements");
var _isValidAttribute = /* @__PURE__ */ __name(function _isValidAttribute2(lcTag, lcName, value2) {
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value2 in document2 || value2 in formElement)) {
return false;
}
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName))
;
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName))
;
else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
if (
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
_basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value2) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value2))
)
;
else {
return false;
}
} else if (URI_SAFE_ATTRIBUTES[lcName])
;
else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE$1, "")))
;
else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value2, "data:") === 0 && DATA_URI_TAGS[lcTag])
;
else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value2, ATTR_WHITESPACE$1, "")))
;
else if (!value2)
;
else {
return false;
}
return true;
}, "_isValidAttribute");
var _basicCustomElementTest = /* @__PURE__ */ __name(function _basicCustomElementTest2(tagName) {
return tagName.indexOf("-") > 0;
}, "_basicCustomElementTest");
var _sanitizeAttributes = /* @__PURE__ */ __name(function _sanitizeAttributes2(currentNode) {
var attr;
var value2;
var lcName;
var l;
_executeHook("beforeSanitizeAttributes", currentNode, null);
var attributes = currentNode.attributes;
if (!attributes) {
return;
}
var hookEvent = {
attrName: "",
attrValue: "",
keepAttr: true,
allowedAttributes: ALLOWED_ATTR
};
l = attributes.length;
while (l--) {
attr = attributes[l];
var _attr = attr, name = _attr.name, namespaceURI = _attr.namespaceURI;
value2 = name === "value" ? attr.value : stringTrim(attr.value);
lcName = transformCaseFunc(name);
hookEvent.attrName = lcName;
hookEvent.attrValue = value2;
hookEvent.keepAttr = true;
hookEvent.forceKeepAttr = void 0;
_executeHook("uponSanitizeAttribute", currentNode, hookEvent);
value2 = hookEvent.attrValue;
if (hookEvent.forceKeepAttr) {
continue;
}
_removeAttribute(name, currentNode);
if (!hookEvent.keepAttr) {
continue;
}
if (regExpTest(/\/>/i, value2)) {
_removeAttribute(name, currentNode);
continue;
}
if (SAFE_FOR_TEMPLATES) {
value2 = stringReplace(value2, MUSTACHE_EXPR$1, " ");
value2 = stringReplace(value2, ERB_EXPR$1, " ");
}
var lcTag = transformCaseFunc(currentNode.nodeName);
if (!_isValidAttribute(lcTag, lcName, value2)) {
continue;
}
if (trustedTypesPolicy && _typeof(trustedTypes) === "object" && typeof trustedTypes.getAttributeType === "function") {
if (namespaceURI)
;
else {
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
case "TrustedHTML":
value2 = trustedTypesPolicy.createHTML(value2);
break;
case "TrustedScriptURL":
value2 = trustedTypesPolicy.createScriptURL(value2);
break;
}
}
}
try {
if (namespaceURI) {
currentNode.setAttributeNS(namespaceURI, name, value2);
} else {
currentNode.setAttribute(name, value2);
}
arrayPop(DOMPurify.removed);
} catch (_) {
}
}
_executeHook("afterSanitizeAttributes", currentNode, null);
}, "_sanitizeAttributes");
var _sanitizeShadowDOM = /* @__PURE__ */ __name(function _sanitizeShadowDOM2(fragment) {
var shadowNode;
var shadowIterator = _createIterator(fragment);
_executeHook("beforeSanitizeShadowDOM", fragment, null);
while (shadowNode = shadowIterator.nextNode()) {
_executeHook("uponSanitizeShadowNode", shadowNode, null);
if (_sanitizeElements(shadowNode)) {
continue;
}
if (shadowNode.content instanceof DocumentFragment) {
_sanitizeShadowDOM2(shadowNode.content);
}
_sanitizeAttributes(shadowNode);
}
_executeHook("afterSanitizeShadowDOM", fragment, null);
}, "_sanitizeShadowDOM");
DOMPurify.sanitize = function(dirty, cfg) {
var body61;
var importedNode;
var currentNode;
var oldNode;
var returnNode;
IS_EMPTY_INPUT = !dirty;
if (IS_EMPTY_INPUT) {
dirty = "";
}
if (typeof dirty !== "string" && !_isNode(dirty)) {
if (typeof dirty.toString !== "function") {
throw typeErrorCreate("toString is not a function");
} else {
dirty = dirty.toString();
if (typeof dirty !== "string") {
throw typeErrorCreate("dirty is not a string, aborting");
}
}
}
if (!DOMPurify.isSupported) {
if (_typeof(window2.toStaticHTML) === "object" || typeof window2.toStaticHTML === "function") {
if (typeof dirty === "string") {
return window2.toStaticHTML(dirty);
}
if (_isNode(dirty)) {
return window2.toStaticHTML(dirty.outerHTML);
}
}
return dirty;
}
if (!SET_CONFIG) {
_parseConfig(cfg);
}
DOMPurify.removed = [];
if (typeof dirty === "string") {
IN_PLACE = false;
}
if (IN_PLACE) {
if (dirty.nodeName) {
var tagName = transformCaseFunc(dirty.nodeName);
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
}
}
} else if (dirty instanceof Node) {
body61 = _initDocument("");
importedNode = body61.ownerDocument.importNode(dirty, true);
if (importedNode.nodeType === 1 && importedNode.nodeName === "BODY") {
body61 = importedNode;
} else if (importedNode.nodeName === "HTML") {
body61 = importedNode;
} else {
body61.appendChild(importedNode);
}
} else {
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
dirty.indexOf("<") === -1) {
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
}
body61 = _initDocument(dirty);
if (!body61) {
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
}
}
if (body61 && FORCE_BODY) {
_forceRemove(body61.firstChild);
}
var nodeIterator = _createIterator(IN_PLACE ? dirty : body61);
while (currentNode = nodeIterator.nextNode()) {
if (currentNode.nodeType === 3 && currentNode === oldNode) {
continue;
}
if (_sanitizeElements(currentNode)) {
continue;
}
if (currentNode.content instanceof DocumentFragment) {
_sanitizeShadowDOM(currentNode.content);
}
_sanitizeAttributes(currentNode);
oldNode = currentNode;
}
oldNode = null;
if (IN_PLACE) {
return dirty;
}
if (RETURN_DOM) {
if (RETURN_DOM_FRAGMENT) {
returnNode = createDocumentFragment.call(body61.ownerDocument);
while (body61.firstChild) {
returnNode.appendChild(body61.firstChild);
}
} else {
returnNode = body61;
}
if (ALLOWED_ATTR.shadowroot) {
returnNode = importNode.call(originalDocument, returnNode, true);
}
return returnNode;
}
var serializedHTML = WHOLE_DOCUMENT ? body61.outerHTML : body61.innerHTML;
if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body61.ownerDocument && body61.ownerDocument.doctype && body61.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body61.ownerDocument.doctype.name)) {
serializedHTML = "\n" + serializedHTML;
}
if (SAFE_FOR_TEMPLATES) {
serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, " ");
serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, " ");
}
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
};
DOMPurify.setConfig = function(cfg) {
_parseConfig(cfg);
SET_CONFIG = true;
};
DOMPurify.clearConfig = function() {
CONFIG = null;
SET_CONFIG = false;
};
DOMPurify.isValidAttribute = function(tag, attr, value2) {
if (!CONFIG) {
_parseConfig({});
}
var lcTag = transformCaseFunc(tag);
var lcName = transformCaseFunc(attr);
return _isValidAttribute(lcTag, lcName, value2);
};
DOMPurify.addHook = function(entryPoint, hookFunction) {
if (typeof hookFunction !== "function") {
return;
}
hooks[entryPoint] = hooks[entryPoint] || [];
arrayPush2(hooks[entryPoint], hookFunction);
};
DOMPurify.removeHook = function(entryPoint) {
if (hooks[entryPoint]) {
return arrayPop(hooks[entryPoint]);
}
};
DOMPurify.removeHooks = function(entryPoint) {
if (hooks[entryPoint]) {
hooks[entryPoint] = [];
}
};
DOMPurify.removeAllHooks = function() {
hooks = {};
};
return DOMPurify;
}
__name(createDOMPurify, "createDOMPurify");
var purify = createDOMPurify();
// framework/unify/shared.js
var shared = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object3 = new shared();
var shared_default = object3.get();
// framework/unify/cacheManager.js
var cacheManager = class {
static {
__name(this, "cacheManager");
}
objects = new Array();
getObjectByClassName(object93, id2, classname) {
var arrayWithObjects = this.objects[classname];
if (arrayWithObjects) {
var output = arrayWithObjects[id2];
if (output) {
object93.serialize(output);
return object93;
} else {
object93.id = id2;
var row181 = object93.getRow();
arrayWithObjects[id2] = row181;
object93.serialize(row181);
return object93;
}
} else {
this.objects[classname] = new Array();
return this.getObjectByClassName(object93, id2, classname);
}
}
getObject(object93, id2) {
var className2 = object93.getClassName();
return this.getObjectByClassName(object93, id2, className2);
}
getLocalObject(object93, id2, classname) {
var arrayWithObjects = this.objects[classname];
if (arrayWithObjects) {
var output = arrayWithObjects[id2];
if (output) {
return output;
} else {
return false;
}
} else {
this.objects[classname] = new Array();
return this.getLocalObject(object93, id2, classname);
}
}
addObject(object93, id2, classname) {
this.objects[classname][id2] = object93;
}
};
// framework/unify/serializer.database.js
var databaseSerializer = class {
static {
__name(this, "databaseSerializer");
}
cache = new cacheManager();
setID(row181, targetObject2) {
if (row181.id && targetObject2) {
targetObject2.id = row181.id;
}
}
setJoinID(row181, targetObject2) {
if (row181.join_id && targetObject2) {
targetObject2.join_id = row181.join_id;
}
}
copyValue(row181, child, value2) {
if (value2 == "true") {
value2 = true;
}
if (value2 == "false") {
value2 = false;
}
child.value = value2;
}
getChildTable(children, row181, child, propertyName2) {
var id2 = row181[propertyName2 + "_id"];
if (id2) {
row181 = this.cache.getObject(child, id2);
}
}
copyChild(children, child, row181) {
var propertyName2 = child.propertyName;
var value2 = row181[propertyName2];
if (child.datatype && value2 != null) {
this.copyValue(row181, child, value2);
}
if (child.type == "table") {
this.getChildTable(children, row181, child, propertyName2);
}
}
copyProperties(row181, targetObject2) {
var children = targetObject2.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.copyChild(children, child, row181);
}
}
serialize(row181, targetObject2, client2) {
this.setID(row181, targetObject2);
this.setJoinID(row181, targetObject2);
this.copyProperties(row181, targetObject2);
}
};
var serializer_database_default = new databaseSerializer();
// framework/unify/placeholder.js
var placeholder = class {
static {
__name(this, "placeholder");
}
};
// framework/unify/unify.js
var unify = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default = new unify();
// framework/unify/datatype.js
var datatype_default = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/serialized.js
var serialized = class {
static {
__name(this, "serialized");
}
};
// framework/unify/permissionObject.js
var permissionObject = class {
static {
__name(this, "permissionObject");
}
READ;
WRITE;
DELETE;
};
// framework/unify/serializer.object.js
var objectSerializer = class {
static {
__name(this, "objectSerializer");
}
css = new css();
serialize(sourceObject, targetObject2, client2) {
var serializedObject2 = this.serializeObject(sourceObject, targetObject2, client2);
this.findColumns(targetObject2);
var defaultObjectInstance = new defaultObject_default();
return defaultObjectInstance.agregateDefaultObject(serializedObject2);
}
propegateCollection(sourceObject, targetObject2) {
var collection35 = sourceObject.getCollection();
var targetCollection = new placeholder();
targetCollection.objectName = tools_default.getClassName(new collection35.object());
targetCollection.propertyName = collection35.propertyName;
if (collection35.parent) {
targetCollection.parentID = collection35.parent.id;
targetCollection.parentName = tools_default.getTableName(collection35.parent);
}
targetObject2.collection = targetCollection;
}
cleanCollection(sourceObject, targetObject2) {
if (!sourceObject) {
return false;
}
if (!sourceObject.getCollection) {
return false;
}
if (!sourceObject.getCollection()) {
return false;
}
this.propegateCollection(sourceObject, targetObject2);
return targetObject2;
}
serializeObject(sourceObject, targetObject2, client2) {
if (!sourceObject) {
return false;
}
unify_default.extend(targetObject2);
this.serializeID(sourceObject, targetObject2);
this.serializeProperties(sourceObject, targetObject2);
this.serializeChildren(sourceObject, targetObject2);
this.serializeRenderCollection(sourceObject, targetObject2);
this.serializePermissionObjects(sourceObject, targetObject2);
this.propegateNewProperties(sourceObject, targetObject2);
return targetObject2;
}
serializePermission(sourceObject, targetObject2) {
var targetObject2 = new permissionObject();
if (!sourceObject) {
return false;
}
if (typeof sourceObject.WRITE == "boolean") {
targetObject2.WRITE = tools_default.validateBoolean(sourceObject.WRITE);
}
if (typeof sourceObject.DELETE == "boolean") {
targetObject2.DELETE = tools_default.validateBoolean(sourceObject.DELETE);
}
if (typeof sourceObject.READ == "boolean") {
targetObject2.READ = tools_default.validateBoolean(sourceObject.READ);
}
return targetObject2;
}
createPermissionObject(currentPermissionObject) {
var permissionObject2 = new serialized();
permissionObject2.path = tools_default.validateString(currentPermissionObject.path);
permissionObject2.permission = this.validatePermission(currentPermissionObject.permission);
}
serializePermissionObject(currentPermissionObject, targetObject2, c31) {
var permissionObject2 = this.createPermissionObject(currentPermissionObject);
targetObject2.permissionObjects[c31] = permissionObject2;
}
serializePermissionObjects(sourceObject, targetObject2) {
if (!sourceObject.permissionObjects) {
return false;
}
if (!tools_default.isArray(sourceObject.permissionObjects)) {
return false;
}
var permissionObjects = sourceObject.permissionObjects;
targetObject2.permissionObjects = new Array();
for (var c31 = 0; c31 < permissionObjects.length; c31++) {
var currentPermissionObject = permissionObjects[c31];
this.serializePermissionObject(currentPermissionObject, targetObject2, c31);
}
}
propegateProperty(targetObject2, property2) {
const preserved = new Array("placeholder", "load", "permissions", "collections", "__sourcePath", "__sourcePath", "rowID", "tableName", "datatype", "_value", "__value", "__sourcePath", "synced", "permissionManager", "filterObject", "parent", "__nodeMethods", "__className", "join_id", "serializationType", "value", "clearOnSync", "type", "propertyName", "showValue", "propegateEvent", "enabled", "renderToDOM", "isActive", "parse", "parseChildren", "parseTable", "layers", "useCustomElement", "editable", "defaultDisplayType", "scrollbarWidth", "boxFlex", "debug", "defaultBoxDisplayType");
if (!property2.value) {
return false;
}
if (typeof property2.name != "string") {
return false;
}
if (this.css.propertyIsStyle(property2.name)) {
return false;
}
if (targetObject2[property2.name]) {
return false;
}
if (preserved.includes(property2.name)) {
return false;
}
targetObject2[property2.name] = property2.value;
}
propegateNewPropertiesOutside(sourceObject, targetObject2) {
if (sourceObject.permissions) {
targetObject2.permissions = this.serializePermission(sourceObject.permissions);
}
if (sourceObject.permissionObjects) {
targetObject2.permissionObjects = sourceObject.permissionObjects;
}
if (sourceObject.data) {
targetObject2.data = sourceObject.data;
}
if (sourceObject.type == "renderCollection") {
return false;
}
var properties = sourceObject.getProperties();
for (var i = 0; i < properties.length; i++) {
var property2 = properties[i];
this.propegateProperty(targetObject2, property2);
}
}
propegateBoxProperty(property2) {
const preserved = new Array("serializationType", "value", "clearOnSync", "type", "propertyName", "showValue", "propegateEvent", "enabled", "renderToDOM", "isActive", "parse", "parseChildren", "parseTable", "layers", "useCustomElement", "editable", "defaultDisplayType", "scrollbarWidth", "boxFlex", "debug", "defaultBoxDisplayType");
if (!property2.name.toLowerCase().includes("box")) {
return false;
}
if (preserved.includes(property2.name.replace("box", ""))) {
return false;
}
property2.name = tools_default.firstLowerCase(property2.name.replace("box", ""));
}
propegateValue(property2, targetObject2, newProperies) {
const preserved = new Array("serializationType", "value", "clearOnSync", "type", "propertyName", "showValue", "propegateEvent", "enabled", "renderToDOM", "isActive", "parse", "parseChildren", "parseTable", "layers", "useCustomElement", "editable", "defaultDisplayType", "scrollbarWidth", "boxFlex", "debug", "defaultBoxDisplayType");
if (typeof property2.name != "string") {
return false;
}
if (this.css.propertyIsStyle(property2.name.replace("box", ""))) {
return false;
}
if (targetObject2[property2.name]) {
return false;
}
if (!tools_default.validateValue(property2.value)) {
return false;
}
if (preserved.includes(property2.name)) {
return false;
}
newProperies.push(property2);
targetObject2[property2.name] = property2.value;
}
propegateNewProperty(property2, targetObject2, newProperies) {
this.propegateBoxProperty(property2);
this.propegateValue(property2, targetObject2, newProperies);
}
propegateRenderCollection(sourceObject, targetObject2, newProperies) {
var properties = sourceObject.getProperties();
for (var i = 0; i < properties.length; i++) {
var property2 = properties[i];
this.propegateNewProperty(property2, targetObject2, newProperies);
}
}
propegateBrowserProperty(targetObject2, property2) {
if (typeof property2.value == "string") {
targetObject2[property2.name] = property2.value;
}
}
propegateBrowserProperties(sourceObject, targetObject2) {
if (tools_default.getEnvironment() == "Node") {
return false;
}
var properties = tools_default.getProperties(sourceObject);
for (var i = 0; i < properties.length; i++) {
var property2 = properties[i];
this.propegateBrowserProperty(targetObject2, property2);
}
}
propegateNewProperties(sourceObject, targetObject2) {
var newProperies = new Array();
if (sourceObject.getProperties) {
if (sourceObject.type == "renderCollection") {
this.propegateRenderCollection(sourceObject, targetObject2, newProperies);
}
} else {
this.propegateBrowserProperties(sourceObject, targetObject2);
}
return newProperies;
}
serializeFilterObject(sourceObject, targetObject2) {
if (sourceObject.filterObject) {
targetObject2.filterObject = new serialized();
this.serializeObject(sourceObject.filterObject, targetObject2.filterObject);
}
}
serializeRenderCollectionRow(targetObject2, row181) {
var serializedRow = new targetObject2.object();
this.serializeObject(row181, serializedRow);
targetObject2.rows.push(serializedRow);
}
serializeRenderCollectionRows(sourceObject, targetObject2) {
var rows = sourceObject.rows;
targetObject2.rows = new Array();
for (var c31 = 0; c31 < rows.length; c31++) {
var row181 = rows[c31];
this.serializeRenderCollectionRow(targetObject2, row181);
}
}
serializeRenderCollection(sourceObject, targetObject2) {
if (!sourceObject.rows) {
return false;
}
if (!tools_default.isArray(sourceObject.rows)) {
return false;
}
this.serializeRenderCollectionRows(sourceObject, targetObject2);
}
serializeIDNumber(sourceObject, targetObject2) {
var id2 = tools_default.validateNumber(sourceObject.id);
targetObject2.id = id2;
targetObject2.setID(id2);
}
serializeUndefinedID(targetObject2) {
if (tools_default.getEnvironment() == "Node") {
targetObject2.id = false;
targetObject2.setID(false);
}
}
serializeJoinID(sourceObject, targetObject2) {
var join_id = tools_default.validateNumber(sourceObject.join_id);
targetObject2.join_id = join_id;
targetObject2.setJoinID(id);
}
serializeID(sourceObject, targetObject2) {
if (sourceObject && sourceObject.id) {
this.serializeIDNumber(sourceObject, targetObject2);
} else {
this.serializeUndefinedID(targetObject2);
}
if (sourceObject.join_id) {
this.serializeJoinID(sourceObject, targetObject2);
}
}
serializeAction(sourceObject, targetObject2) {
if (targetObject2.action) {
targetObject2.action = sourceObject.action;
}
return targetObject2;
}
copyValueToChild(child, extendedClass, column31, table33) {
var columnName = tools_default.getClassName(extendedClass);
if (!extendedClass.datatype) {
return false;
}
if (!column31) {
return false;
}
if (!table33[columnName]) {
return false;
}
child.value = table33[columnName].value;
if (tools_default.getEnvironment() == "Browser") {
child.updateElementContent();
}
}
findExtendedClasses(child, parent, table33) {
if (child.type == "collection") {
return false;
}
if (child.type == "renderCollection") {
return false;
}
if (!child.datatype) {
return false;
}
var extendedClasses = tools_default.getExtendedClassesMulti(child);
for (var c31 = 0; c31 < extendedClasses.length; c31++) {
var extendedClass = extendedClasses[c31];
var column31 = tools_default.isUnifyColumn(extendedClass);
this.copyValueToChild(child, extendedClass, column31, table33);
}
}
findColumns(parent, table33 = false) {
if (!parent.getChildren) {
return false;
}
unify_default.extend(parent);
var children = parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (parent.type == "table") {
table33 = parent;
}
this.findExtendedClasses(child, parent, table33);
this.findColumns(child, table33);
}
}
serializeNumberValue(sourceObject, targetObject2) {
targetObject2.value = sourceObject.value;
}
serializeBooleanValue(sourceObject, targetObject2) {
if (sourceObject.value == "false" || sourceObject.value == "" || !sourceObject.value) {
targetObject2.value = false;
} else {
targetObject2.value = true;
}
}
serializeEmptyValue(targetObject2) {
targetObject2.value = "";
targetObject2._value = "";
}
serializeStringValue(sourceObject, targetObject2) {
targetObject2.value = tools_default.validateValue(sourceObject.value);
if (sourceObject.setValue) {
sourceObject.setValue();
}
}
serializeFalse(targetObject2) {
if (typeof targetObject2.value) {
targetObject2.value = false;
}
}
serializeValue(sourceObject, targetObject2) {
if (typeof sourceObject.value == "number") {
this.serializeNumberValue(sourceObject, targetObject2);
} else if (sourceObject.datatype == "BOOLEAN") {
this.serializeBooleanValue(sourceObject, targetObject2);
} else if (sourceObject.value == "") {
this.serializeEmptyValue(targetObject2);
} else if (typeof sourceObject.value && sourceObject.value != "undefined") {
this.serializeStringValue(sourceObject, targetObject2);
} else {
this.serializeFalse(targetObject2);
}
return targetObject2;
}
serializeProperties(sourceObject, targetObject2) {
this.serializeValue(sourceObject, targetObject2);
if (sourceObject.error) {
targetObject2.error = tools_default.validateValue(sourceObject.error);
}
if (sourceObject.searchTerm) {
targetObject2.searchTerm = tools_default.validateValue(sourceObject.searchTerm);
}
if (sourceObject.action) {
targetObject2.action = tools_default.validateValue(sourceObject.action);
}
if (sourceObject.rowID) {
targetObject2.rowID = tools_default.validateNumber(sourceObject.rowID);
}
if (typeof sourceObject.count) {
targetObject2.count = tools_default.validateNumber(sourceObject.count);
}
if (typeof sourceObject.original) {
targetObject2.original = tools_default.validateValue(sourceObject.original);
}
if (typeof sourceObject.nodeMethodName) {
targetObject2.nodeMethodName = tools_default.validateValue(sourceObject.nodeMethodName);
}
if (typeof sourceObject.nodeMethodArguments) {
targetObject2.nodeMethodArguments = tools_default.validateValue(sourceObject.nodeMethodArguments);
}
if (sourceObject.files) {
targetObject2.files = sourceObject.files;
}
if (sourceObject.commits) {
targetObject2.commits = sourceObject.commits;
}
if (sourceObject.fileInformation) {
targetObject2.fileInformation = sourceObject.fileInformation;
}
if (sourceObject.id) {
targetObject2.id = tools_default.validateNumber(sourceObject.id);
}
if (sourceObject.status) {
targetObject2.status = tools_default.validateString(sourceObject.status);
}
if (sourceObject.error) {
targetObject2.error = tools_default.validateString(sourceObject.error);
}
if (sourceObject.order) {
targetObject2.order = tools_default.validateString(sourceObject.order);
}
if (sourceObject.direction) {
targetObject2.direction = tools_default.validateString(sourceObject.direction);
}
if (sourceObject.from) {
targetObject2.from = tools_default.validateString(sourceObject.from);
}
if (sourceObject.to) {
targetObject2.to = tools_default.validateString(sourceObject.to);
}
if (typeof sourceObject.WRITE == "boolean") {
targetObject2.WRITE = tools_default.validateBoolean(sourceObject.WRITE);
}
if (typeof sourceObject.DELETE == "boolean") {
targetObject2.DELETE = tools_default.validateBoolean(sourceObject.DELETE);
}
if (typeof sourceObject.READ == "boolean") {
targetObject2.READ = tools_default.validateBoolean(sourceObject.READ);
}
if (typeof sourceObject.like == "string") {
targetObject2.like = tools_default.validateString(sourceObject.like);
}
if (sourceObject.permissions) {
targetObject2.permissions = this.validatePermission(sourceObject.permissions);
}
if (sourceObject.lastModified) {
targetObject2.lastModified = tools_default.validateNumber(sourceObject.lastModified);
}
if (typeof sourceObject.lastModifiedDate == "string") {
targetObject2.lastModifiedDate = tools_default.validateString(sourceObject.lastModifiedDate);
}
if (typeof sourceObject.name == "string") {
targetObject2.name = tools_default.validateString(sourceObject.name);
}
if (typeof sourceObject.type == "string") {
}
if (typeof sourceObject.webkitRelativePath == "string") {
targetObject2.webkitRelativePath = tools_default.validateString(sourceObject.webkitRelativePath);
}
return targetObject2;
}
serializeChild(child, clientObject, targetObject2) {
var propertyName2 = tools_default.validateString(child.propertyName);
var clientObjectChild = clientObject[propertyName2];
if (clientObjectChild) {
targetObject2[propertyName2] = this.serializeObject(clientObjectChild, child);
}
}
serializeChildren(clientObject, targetObject2) {
if (!targetObject2.getChildren) {
console.error("This object cannot be serialized", targetObject2);
return false;
}
var children = targetObject2.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.serializeChild(child, clientObject, targetObject2);
}
}
validatePermission(sourcePermission) {
var targetPermission = new permissionObject();
if (!sourcePermission) {
return targetPermission;
}
if (typeof sourcePermission.READ == "boolean") {
targetPermission.READ = tools_default.validateBoolean(sourcePermission.READ);
}
if (typeof sourcePermission.WRITE == "boolean") {
targetPermission.WRITE = tools_default.validateBoolean(sourcePermission.WRITE);
}
if (typeof sourcePermission.DELETE == "boolean") {
targetPermission.DELETE = tools_default.validateBoolean(sourcePermission.DELETE);
}
return targetPermission;
}
};
var serializer_object_default = new objectSerializer();
// framework/unify/serializer.clean.js
var cleanManager = class {
static {
__name(this, "cleanManager");
}
clean(sourceObject, method2) {
if (tools_default.getEnvironment() == "Node") {
var cleanObject = this.cleanObject(sourceObject);
} else {
this.findColumns(sourceObject);
var cleanObject = this.cleanObject(sourceObject, method2);
}
var name = sourceObject.getClassName();
var object93 = this.createOuterObject(name, cleanObject);
return object93;
}
createOuterObject(classname, object93) {
var outerObject = new placeholder();
outerObject[classname] = object93;
return outerObject;
}
findExtendedClass(child, extendedClass, table33) {
if (!extendedClass.datatype) {
return false;
}
var column31 = tools_default.isUnifyColumn(extendedClass);
var columnName = tools_default.getClassName(extendedClass);
if (!column31) {
return false;
}
table33[columnName].value = child.value;
}
findExtendedClasses(child, parent, table33) {
if (parent.type == "table") {
return false;
}
if (!child.datatype) {
return false;
}
var extendedClasses = tools_default.getExtendedClassesMulti(child);
for (var c31 = 0; c31 < extendedClasses.length; c31++) {
var extendedClass = extendedClasses[c31];
this.findExtendedClass(child, extendedClass, table33);
}
}
findChild(child, parent, table33) {
this.findExtendedClasses(child, parent, table33);
if (parent.type == "table") {
table33 = parent;
}
this.findColumns(child, table33);
}
findColumns(parent, table33 = false) {
if (!parent.getChildren) {
return false;
}
var children = parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
this.findChild(child, parent, table33);
}
}
cleanColumn(sourceObject, targetObject2) {
if (sourceObject.id) {
targetObject2.id = tools_default.validateNumber(sourceObject.id);
}
targetObject2 = serializer_object_default.serializeValue(sourceObject, targetObject2);
targetObject2.type = "column";
}
cleanObject(sourceObject, method2) {
if (sourceObject.scope == "private") {
return false;
}
var targetObject2 = new placeholder();
switch (sourceObject.type) {
case "column":
this.cleanColumn(sourceObject, targetObject2);
break;
case "table":
this.cleanTable(sourceObject, targetObject2, method2);
break;
case "renderCollection":
this.cleanRenderCollection(sourceObject, targetObject2);
break;
default:
this.cleanDefault(sourceObject, targetObject2);
}
if (tools_default.getEnvironment() == "Node") {
serializer_object_default.propegateNewPropertiesOutside(sourceObject, targetObject2);
}
return targetObject2;
}
cleanDefault(sourceObject, targetObject2) {
targetObject2 = serializer_object_default.serializeProperties(sourceObject, targetObject2);
targetObject2 = this.cleanProperties(sourceObject, targetObject2);
targetObject2.serializationType = "object";
this.cleanChildren(sourceObject, targetObject2);
}
cleanColumn(sourceObject, targetObject2) {
if (sourceObject.id) {
targetObject2.id = tools_default.validateNumber(sourceObject.id);
}
targetObject2 = serializer_object_default.serializeValue(sourceObject, targetObject2);
targetObject2.type = "column";
}
cleanChildren(sourceObject, targetObject2, method2) {
if (sourceObject.getChildren) {
var children = sourceObject.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
var propertyName2 = child.propertyName;
if (child.type == "table" || child.type == "renderCollection" || method2 == "process" || child.value) {
targetObject2[propertyName2] = this.cleanObject(child);
}
}
}
}
cleanTable(sourceObject, targetObject2, method2) {
if (typeof sourceObject.value) {
targetObject2 = serializer_object_default.serializeValue(sourceObject, targetObject2);
}
if (sourceObject.id) {
targetObject2.id = tools_default.validateNumber(sourceObject.id);
}
if (sourceObject.status) {
targetObject2.status = tools_default.validateString(sourceObject.status);
}
targetObject2.type = "table";
targetObject2.serializationType = "object";
targetObject2.collection = false;
if (method2 != "get" || tools_default.getEnvironment() == "Node") {
if (sourceObject.collections && sourceObject.collections.length > 0) {
var collection35 = sourceObject.getCollection();
this.cleanCollection(sourceObject, targetObject2);
}
this.cleanChildren(sourceObject, targetObject2, method2);
}
}
serializeCollection(sourceCollection, targetObject2) {
var targetCollection = new placeholder();
targetObject2.collections = new Array();
targetCollection.id = sourceCollection.id;
targetObject2.collections.push(targetCollection);
}
cleanRenderCollection(sourceObject, targetObject2) {
if (sourceObject.id) {
targetObject2.id = tools_default.validateNumber(sourceObject.id);
}
targetObject2 = serializer_object_default.serializeValue(sourceObject, targetObject2);
this.cleanRenderCollectionRows(sourceObject, targetObject2);
targetObject2 = this.cleanCollection(sourceObject, targetObject2);
if (tools_default.getEnvironment() == "Browser") {
serializer_object_default.propegateNewProperties(sourceObject, targetObject2);
}
targetObject2.type = "renderCollection";
}
cleanRenderCollectionRows(sourceObject, targetObject2) {
if (sourceObject.rows) {
var rows = sourceObject.rows;
targetObject2.rows = new Array();
for (var c31 = 0; c31 < rows.length; c31++) {
var row181 = rows[c31];
if (row181.type == "table") {
var rowObject = this.cleanObject(row181);
}
targetObject2.rows.push(rowObject);
}
}
return targetObject2;
}
cleanProperties(sourceObject, targetObject2) {
const allowedProperties = new Array("__sourcePath", "action", "files", "fileInformation", "commits", "search", "value", "from", "to", "order", "direction", "filter", "files", "type", "permissionObjects", "childrenPermissions", "filterObject");
for (var i = 0; i < allowedProperties.length; i++) {
var propertieName = allowedProperties[i];
if (sourceObject[propertieName]) {
targetObject2[propertieName] = sourceObject[propertieName];
}
}
return targetObject2;
}
cleanCollection(sourceObject, targetObject2) {
if (sourceObject.getCollection && sourceObject.getCollection()) {
var collection35 = sourceObject.getCollection();
targetObject2.collection = new placeholder();
targetObject2.collection.objectName = tools_default.getClassName(new collection35.object()).split("$")[0];
targetObject2.collection.propertyName = collection35.propertyName;
if (collection35.parent) {
targetObject2.collection.parentID = collection35.parent.id;
targetObject2.collection.parentName = tools_default.getClassName(tools_default.getTableFromObject(collection35.parent));
}
}
return targetObject2;
}
};
var serializer_clean_default = new cleanManager();
// framework/unify/serializer.js
var serializer = class {
static {
__name(this, "serializer");
}
clean(sourceObject, method2) {
return serializer_clean_default.clean(sourceObject, method2);
}
serialize(sourceObject, targetObject2, client2) {
if (!sourceObject) {
return false;
}
if (sourceObject.serializationType == "object") {
return serializer_object_default.serialize(sourceObject, targetObject2, client2);
} else {
serializer_database_default.serialize(sourceObject, targetObject2, client2);
}
}
};
// framework/unify/defaultObject.js
var globalTabIndex = 0;
var defaultObject = class _defaultObject {
static {
__name(this, "defaultObject");
}
id = 1;
extend(object93) {
if (this.exposeMethodsToObject(object93)) {
return true;
} else {
return false;
}
}
exposeMethodsToObject(object93, force = false) {
if (!force) {
if (object93.constructor.name == "Object" && !object93.tag) {
return false;
}
}
if (object93.__proto__) {
object93.__proto__.exposeMethodsToObject = this.exposeMethodsToObject;
object93.__proto__.agregateDefaultObject = this.agregateDefaultObject;
object93.__proto__.getClassName = this.getClassName;
object93.__proto__.getID = this.getID;
object93.__proto__.getFirstID = this.getFirstID;
object93.__proto__.getApplicationPath = this.getApplicationPath;
object93.__proto__.getChildren = this.getChildren;
object93.__proto__.getProperties = this.getProperties;
object93.__proto__.getParentWithTable = this.getParentWithTable;
object93.__proto__.getRoot = this.getRoot;
object93.__proto__.getCore = this.getCore;
object93.__proto__.getExtendedClass = this.getExtendedClass;
object93.__proto__.getExtendedClassName = this.getExtendedClassName;
object93.__proto__.parents = this.parents;
object93.__proto__.getAll = this.getAll;
object93.__proto__.getObjectsByClassName = this.getObjectsByClassName;
object93.__proto__.isTable = this.isTable;
object93.__proto__.extendsTable = this.extendsTable;
object93.__proto__.isRenderCollection = this.isRenderCollection;
object93.__proto__.extendsClass = this.extendsClass;
object93.__proto__.extend = this.extend;
object93.__proto__.setApplicationPath = this.setApplicationPath;
object93.__proto__.getApplicationPathString = this.getApplicationPathString;
object93.__proto__.setID = this.setID;
object93.__proto__.setApplicationID = this.setApplicationID;
object93.__proto__.setParent = this.setParent;
object93.__proto__.setUser = this.setUser;
object93.__proto__.setUserChildren = this.setUserChildren;
object93.__proto__.isHidden = this.isHidden;
object93.__proto__.syncAllChildren = this.syncAllChildren;
if (object93.type != "collection") {
object93.__proto__.prepend = this.prepend;
object93.__proto__.add = this.add;
object93.__proto__.remove = this.remove;
}
object93.__proto__.serialize = this.serialize;
object93.__proto__.clean = this.clean;
object93.__proto__.empty = this.empty;
object93.__proto__.hide = this.hide;
object93.__proto__.show = this.show;
object93.__proto__.hideChildren = this.hideChildren;
object93.__proto__.showChildren = this.showChildren;
object93.__proto__.processGridElement = this.processGridElement;
object93.__proto__.allow = this.allow;
object93.__proto__.isAllowed = this.isAllowed;
object93.__proto__.updatePermissions = this.updatePermissions;
object93.__proto__.log = this.log;
object93.__proto__.updateElementContent = this.updateElementContent;
object93.__proto__.computePermissions = this.computePermissions;
object93.__proto__.showParents = this.showParents;
object93.__proto__.simpleClone = this.simpleClone;
object93.__proto__.updateProperties = this.updateProperties;
object93.__proto__.exposeMethodsToObject = this.exposeMethodsToObject;
object93.__proto__.getExtends = this.getExtends;
object93.__proto__.getExtendObjects = this.getExtendObjects;
object93.__proto__.isVisible = this.isVisible;
object93.__proto__.preloadImage = this.preloadImage;
object93.__proto__.getPreviousSibling = this.getPreviousSibling;
object93.__proto__.getNextSibling = this.getNextSibling;
this.overideRemainingMethods(object93);
}
return true;
}
overideRemainingMethod(object93, method2) {
const ommit = new Array("", "setJoinID", "reset", "isOrExtendsClass", "hasClass", "getTableName", "delete", "appendToSelector", "agregateDefaultObject", "__defineGetter__", "__defineSetter__", "__lookupGetter__", "__lookupSetter__", "valueOf", "constructor", "toLocaleString", "toString");
if (ommit.includes(method2)) {
return false;
}
if (!object93.__proto__[method2]) {
object93.__proto__[method2] = this[method2];
}
}
overideRemainingMethods(object93) {
if (this.constructor.name != "defaultObject") {
return false;
}
const methods = tools_default.getAllFuncs(this);
for (var i = 0; i < methods.length; i++) {
var method2 = methods[i];
this.overideRemainingMethod(object93, method2);
}
}
propertyIsValid(property2) {
const omit = new Array("datatype", "validateType", "appendToSelector", "gridArea", "order", "customElement", "__sourcePath", "applicationID", "selector", "appendToSelector", "gridArea", "order", "display");
if (property2.name.slice(0, 2) == "__") {
return false;
}
if (omit.includes(property2.name)) {
return false;
}
if (!tools_default.isCSSProperty(property2.name)) {
return false;
}
return true;
}
updateValidCssProperty(property2) {
var core3 = this.getCore();
if (!this[property2.name]) {
core3.css.parseProperty(property2, this);
}
console.log("--", "update css property", property2.name, property2.value);
this[property2.name] = property2.value;
}
updateCssProperty(property2) {
if (!property2.value) {
return false;
}
if (this.propertyIsValid(property2)) {
this.updateValidCssProperty(property2);
} else {
}
}
updateCssProperties(sourceProperties) {
for (var i = 0; i < sourceProperties.length; i++) {
var property2 = sourceProperties[i];
this.updateCssProperty(property2);
}
}
updatePropertyText(property2) {
if (property2.name == "text" && property2.value) {
this.label = property2.value;
}
}
getPreviousSibling() {
var id2 = this.id;
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.id == id2 - 1) {
return child;
}
}
}
getNextSibling() {
var id2 = this.id;
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.id == id2 + 1) {
return child;
}
}
}
updateEmptyCssProperty(property2, sourceProperties) {
var omit = ["applicationID", "selector", "appendToSelector", "gridArea", "order", "display"];
let obj = sourceProperties.find((o) => o.name === property2.name);
if (obj) {
return false;
}
if (this.propertyIsValid(property2)) {
this[property2.name] = "none";
}
}
updateEmptyCssProperties(sourceProperties) {
var properties = this.getProperties();
for (var i = 0; i < properties.length; i++) {
var property2 = properties[i];
this.updatePropertyText(property2);
this.updateEmptyCssProperty(property2, sourceProperties);
}
}
getAllDefinedMethods(fromObject) {
var allMethods = tools_default.getAllFuncs(fromObject);
var emptyInstance = new emptyObject();
this.exposeMethodsToObject(emptyInstance);
var basicMethods = tools_default.getAllFuncs(emptyInstance);
var methods = allMethods.filter((x) => !basicMethods.includes(x));
return methods;
}
overideMethod(sourceObject, methodName, nodeMethods) {
if (!nodeMethods.includes(methodName)) {
this[methodName] = sourceObject[methodName];
}
}
overrideMethods(sourceObject) {
var methods = this.getAllDefinedMethods(sourceObject);
var nodeMethods = this.__nodeMethods.split(",");
for (var i = 0; i < methods.length; i++) {
var methodName = methods[i];
this.overideMethod(sourceObject, methodName, nodeMethods);
}
}
addNewMethods() {
}
updateProperties(sourceObject) {
var sourceProperties = sourceObject.getProperties();
this.updateCssProperties(sourceProperties);
this.updateEmptyCssProperties(sourceProperties);
this.overrideMethods(sourceObject);
}
simpleClone(object93) {
var clone2 = new this.constructor();
this.exposeMethodsToObject(clone2);
clone2.id = this.id;
return clone2;
}
appendToSelector() {
var selectedElement = document_default.querySelector(object.selector);
if (selectedElement) {
var children = selectedElement.childNodes;
if (children.length == 0) {
selectedElement.appendChild(object.elements[0]);
}
}
}
agregateDefaultObject(object93) {
if (object93.constructor.name != "Object") {
this.exposeMethodsToObject(object93);
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.agregateDefaultObject(child);
}
}
}
getObjectsByClassName(className2) {
return this.getCore().getObjectsByClassName(className2);
}
isHidden() {
function isVisible(e) {
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
}
__name(isVisible, "isVisible");
if (this.customElement) {
return isVisible(this.customElement);
}
}
getAll(className2) {
return this.getCore().getObjectsByClassName(className2);
}
getElement() {
if (this.element) {
var element2 = this.element;
}
if (this.innerElement) {
var element2 = this.innerElement;
}
return element2;
}
updateElementWithLabel(element2) {
if (typeof this.label != "string") {
return false;
}
if (this.label == "") {
return false;
}
if (this.sanitize) {
element2.innerHTML = purify.sanitize(this.label);
} else {
element2.innerHTML = this.label;
}
}
updateInputWithValue(element2) {
if (element2.type == "file") {
return false;
}
if (this.sanitize) {
element2.value = purify.sanitize(this.value);
} else {
element2.value = this.value;
}
}
updateInnerHTMLWithValue(element2) {
if (this.sanitize) {
element2.innerHTML = purify.sanitize(this.value);
} else {
element2.innerHTML = this.value;
}
}
updateElementWithValue(element2) {
if (typeof this.value != "string") {
return false;
}
if (!element2.tagName) {
return false;
}
switch (element2.tagName.toLowerCase()) {
case "input":
this.updateInputWithValue(element2);
break;
default:
this.updateInnerHTMLWithValue(element2);
}
}
updateElementWithText(element2) {
if (typeof this.text != "string") {
return false;
}
if (this.text == "") {
return false;
}
if (this.sanitize) {
element2.innerHTML = purify.sanitize(this.__text.toString());
} else {
element2.innerHTML = this.__text.toString();
}
}
updateElementTries(element2) {
if (!element2) {
return false;
}
if (!this.showValue) {
return false;
}
this.updateElementWithLabel(element2);
this.updateElementWithValue(element2);
this.updateElementWithText(element2);
}
updateElementContent() {
if (this.type == "file") {
return true;
}
if (!this.preventUpdating && this.getElement) {
var element2 = this.getElement();
this.updateElementTries(element2);
}
if (this.update) {
this.update();
}
this.processGridElement();
}
setParent(parent) {
this.parent = parent;
}
updatePermissions(permissions) {
if (permissions) {
this.permissions = permissions;
} else {
var permissions = this.permissions;
}
if (permissions.WRITE) {
if (this.enableWRITE) {
this.enableWRITE();
}
} else {
if (this.disableWRITE) {
this.disableWRITE();
}
}
if (permissions.READ) {
if (this.enableREAD) {
this.enableREAD();
}
} else {
if (this.disableREAD) {
this.disableREAD();
}
}
if (permissions.DELETE) {
if (this.enableDELETE) {
this.enableDELETE();
}
} else {
if (this.disableDELETE) {
this.disableDELETE();
}
}
}
allow(user32, type) {
this.permissionManager.allow(user32, type);
}
logPermission(message) {
if (this.debug) {
console.log("Log permission:", this.getClassName(), message);
}
}
isAllowed(user32, type) {
if (this.permissionManager.isAllowed(user32, type, this)) {
this.logPermission("Allowed to " + type.toLowerCase());
return true;
} else {
this.logPermission("Not allowed to " + type.toLowerCase());
return false;
}
}
logInfinite(caller) {
console.log("Stuck in infinity loop, Reason: The method 'parents' -> defaultObject.js, and the object:", caller);
}
getCompareFromSelector(selector, object93) {
if (selector.slice(0, 1) == ".") {
var compareA = object93.getClassName();
var compareB = selector.slice(1, selector.length);
} else {
var compareA = object93.propertyName;
var compareB = selector;
}
return { compareA, compareB };
}
parents(selector, object93 = this, caller = this, depth = 0) {
if (depth == 40) {
this.logInfinite(caller);
}
var { compareA, compareB } = this.getCompareFromSelector(selector, object93);
if (compareA == compareB) {
return object93;
} else {
if (!object93.parent) {
return false;
}
return this.parents(selector, object93.parent, caller, depth + 1);
}
}
getCore() {
var cores = shared_default.cores;
var rootApplication = this.getRoot();
var applicationID = rootApplication.applicationID;
if (document_default.body) {
return rootApplication.core;
} else {
}
if (!applicationID) {
applicationID = 0;
}
return cores[applicationID];
}
preloadImage(url2) {
var imageElement = document_default.createElement("link");
imageElement.href = url2;
imageElement.rel = "preload";
imageElement.as = "image";
document_default.head.appendChild(imageElement);
}
getTemplateTerm(gridTemplate, i) {
gridTemplate[i] = gridTemplate[i].replaceAll(" ", "");
gridTemplate[i] = gridTemplate[i].replaceAll(" ", "");
gridTemplate[i] = gridTemplate[i].replaceAll('"', "");
if (gridTemplate[i].includes("px")) {
gridTemplate[i] = "";
}
}
getTemplateTerms() {
var gridTemplate = this.gridTemplate.replaceAll(" ", " ").split(" ");
for (var i = 0; i < gridTemplate.length; i++) {
this.getTemplateTerm(gridTemplate, i);
}
gridTemplate = gridTemplate.filter((v) => v);
return gridTemplate;
}
updateTabIndices(child, gridTemplate) {
let gridIndex = gridTemplate.indexOf(child.propertyName);
if (child.customElement) {
var tabIndex = gridIndex + globalTabIndex;
if (!child.customElement.tabIndex) {
child.customElement.tabIndex = tabIndex;
}
}
}
hideChild(child) {
if (child.hide) {
child.hide();
}
}
updateTabIndexChild(child, gridTemplate) {
if (gridTemplate.includes(child.propertyName)) {
this.updateTabIndices(child, gridTemplate);
} else {
this.hideChild(child);
}
}
updateGridTemplates(gridTemplate) {
globalTabIndex += gridTemplate.length;
var children = this.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
this.updateTabIndexChild(child, gridTemplate);
}
}
setTabIndex(child, tabIndex) {
if (child.customElement) {
if (!child.customElement.tabIndex) {
child.customElement.tabIndex = tabIndex;
}
}
}
updateTabIndicesChildren() {
var children = this.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
this.setTabIndex(child, i);
}
}
processGridElement() {
if (this.display == "grid" && this.gridTemplate) {
var gridTemplate = this.getTemplateTerms();
if (gridTemplate.length > 0) {
this.showChildren();
this.updateGridTemplates(gridTemplate);
} else {
this.updateTabIndicesChildren();
}
}
}
hideMultiLayer() {
if (this.element) {
if (this.element.parentNode) {
this.handleMultiLayer();
}
}
}
handleMultiLayer() {
if (!this.defaultDisplayType) {
this.handleBoxDisplayValue();
}
this.boxDisplay = "none";
this.element.parentNode.style.display = "none";
}
handleBoxDisplayValue() {
if (this.element.parentNode.style.display == "none") {
this.saveDefaultBoxDisplayValue();
} else {
this.saveOldBoxDisplayValue();
}
}
saveDefaultBoxDisplayValue() {
this.defaultBoxDisplayType = "flex";
}
saveOldBoxDisplayValue() {
this.defaultBoxDisplayType = this.element.parentNode.style.display;
}
saveOldDisplayValue() {
if (!this.defaultDisplayType) {
this.defaultDisplayType = this.display;
}
}
saveDefaultDisplayValue() {
if (!this.defaultDisplayType) {
this.defaultDisplayType = "flex";
}
}
hide() {
if (!this.static) {
if (this.display) {
this.saveOldDisplayValue();
} else {
this.saveDefaultDisplayValue();
}
this.display = "none";
if (this.layers == 2) {
this.hideMultiLayer();
}
}
}
communicateVisibleElements() {
if (this.getCore() && this.getRoot().mode == "development") {
this.getCore().communicateVisibleElements();
}
}
showMultiLayer() {
if (this.element) {
if (this.element && this.element.parentNode) {
this.boxDisplay = this.defaultBoxDisplayType;
this.element.parentNode.style.display = this.defaultBoxDisplayType;
}
}
}
show(type, parentType) {
if (type && type != "none") {
this.defaultDisplayType = type;
} else if (this.display && this.display != "none") {
this.defaultDisplayType = this.display;
}
if (parentType) {
this.defaultBoxDisplayType = parentType;
}
if (!this.defaultBoxDisplayType) {
this.defaultBoxDisplayType = "flex";
}
if (this.defaultDisplayType) {
this.display = this.defaultDisplayType;
} else {
this.display = "flex";
}
if (this.layers > 1) {
this.showMultiLayer();
}
this.communicateVisibleElements();
}
syncChild(child) {
if (child.type == "renderCollection") {
child.sync();
}
if (child.getChildren) {
this.syncAllChildren(child);
}
}
syncAllChildren(object93) {
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
this.syncChild(child);
}
}
findStaticChild(child) {
if (child.static) {
this.syncAllChildren(child);
}
}
findStaticChildren(object93) {
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
this.findStaticChild(child);
}
}
showParents(object93 = this) {
object93.show();
this.findStaticChildren(object93);
if (object93.parent) {
this.showParents(object93.parent);
}
}
hideChild(child) {
if (child.hide) {
child.hide();
}
}
hideChildren(object93 = this) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.hideChild(child);
}
}
showChild(child) {
if (child.show) {
child.show();
}
}
showChildren(object93 = this) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.showChild(child);
}
}
getRoot(object93 = this, depth = 0) {
if (object93.parent) {
return this.getRoot(object93.parent, depth++);
} else {
return object93;
}
}
getParentWithTable(object93 = this) {
if (object93.type == "table") {
return object93;
} else {
return this.getParentWithTable(object93.parent);
}
}
removeProperty() {
var name = this.propertyName;
if (name && this.parent[name]) {
delete this.parent[name];
}
}
removeElements() {
if (this.element) {
this.element.remove();
}
if (this.layers == 2) {
this.elements[0].remove();
if (this.elements[1]) {
this.elements[1].remove();
}
}
if (this.defaultElement) {
this.defaultElement.remove();
}
if (this.customElement) {
this.customElement.remove();
}
}
remove() {
this.removeElements();
this.removeProperty();
}
setUser(user32) {
if (user32) {
this.setUserChildren(this, user32);
}
}
setUserProperty(property2, user32) {
if (property2.value == "userplaceholder" && property2.name != "user") {
}
}
setUserProperties(object93, user32) {
if (!object93.getProperties) {
return false;
}
var properties = object93.getProperties();
for (var c31 = 0; c31 < properties.length; c31++) {
var property2 = properties[c31];
this.setUserProperty(property2, user32);
}
}
setUserChildrenRecursive(object93, user32) {
var d31 = new _defaultObject();
d31.exposeMethodsToObject(object93);
if (!object93.getChildren) {
return false;
}
var children = object93.getChildren(false);
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (!child.user) {
this.setUserChildren(child, user32);
}
}
}
setUserChildren(object93, user32) {
this.exposeMethodsToObject(object93);
this.setUserChildrenRecursive(object93, user32);
}
setApplicationPath() {
this.applicationPath = this.getApplicationPath();
this.applicationPathString = this.applicationPath.join("/");
}
getApplicationPathString() {
return this.getApplicationPath().join("/");
}
async prepend(object93, parse = true) {
return this.add(object93, parse, true);
}
ensureID(object93) {
if (!object93.id) {
object93.id = this.getChildren().length;
}
}
convertToUnifyObject(object93) {
var defaultInstance = new _defaultObject();
defaultInstance.agregateDefaultObject(object93);
}
prependPropertyName(object93) {
object93.propertyName = "__" + object93.propertyName;
}
appendPropertyName(object93) {
if (object93.type == "renderCollection") {
object93.propertyName = object93.getClassName();
} else {
object93.propertyName = object93.getClassName() + object93.id;
}
}
createPropertyName(object93, prepend) {
if (prepend) {
this.prependPropertyName(object93);
} else {
this.appendPropertyName(object93);
}
}
prepareChildBeforeAdd(object93, prepend) {
object93.parent = this;
object93.dynamic = true;
object93.parse = false;
this.createPropertyName(object93, prepend);
}
bindChildToParent(object93) {
this[object93.propertyName] = object93;
}
parseAddedObject(object93) {
object93.getCore().createStyleSheet = true;
object93.getCore().parse(object93);
}
// Deprecated
sendAddedObjectToServer(object93) {
}
handleAddedChild(object93) {
if (typeof document_default.body != void 0 && this.socketManager) {
this.parseAddedObject(object93);
} else {
this.getRoot().client.addObjectMessage(10, object93);
}
}
ensureUnifyObject(object93) {
if (tools_default.isUnifyObject("object", object93)) {
return true;
} else {
console.log("object is not a unify object", object93);
return false;
}
}
async add(child, parse = true, prepend = false) {
this.ensureID(child);
this.convertToUnifyObject(child);
var isUnifyObject = this.ensureUnifyObject(child);
if (!isUnifyObject) {
return false;
}
this.prepareChildBeforeAdd(child, prepend);
this.bindChildToParent(child);
this.handleAddedChild(child);
}
delete() {
}
getClassName() {
if (this.__className) {
return this.__className;
}
return this.constructor.name.split("$")[0];
}
getID() {
if (this.id) {
return this.id;
} else {
return false;
}
}
getFirstID() {
var object93 = this;
if (object93.id) {
return object93.id;
}
if (object93.parent.id) {
return object93.parent.id;
}
if (object93.parent.parent.id) {
return object93.parent.parent.id;
}
}
getExtendedClass() {
var object93 = this;
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = object93.prototype.__proto__;
if (!extendedClass) {
return false;
}
return extendedClass;
}
getExtendedClassName() {
var extendedClass = tools_default.getExtendedClass(this);
return tools_default.getClassName(extendedClass);
}
extendsTable(object93 = this) {
if (object93.isTable()) {
return true;
}
var extendedClass = tools_default.getExtendedClass(object93);
if (extendedClass) {
return this.extendsTable(extendedClass);
} else {
return false;
}
}
isTable() {
var object93 = this;
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = tools_default.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = tools_default.getClassName(extendedClass);
if (className2 == "table" || className2 == "unify_table_table" || className2 == "server_table_table") {
return true;
} else {
return false;
}
}
// dont enable because rendercollection has this function and overriding destroys the framework
getTableName() {
var object93 = this;
var table33 = tools_default.getTableFromObject(object93);
var tableName = tools_default.getClassName(table33);
return tableName;
}
getParentApplicationPath(object93, array) {
if (object93.constructor.name == object93.parent.constructor.name) {
return array;
}
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array) {
if (!object93) {
var object93 = this;
}
if (!array) {
array = new Array();
}
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
isRenderCollection(object93) {
return this.extendsClass("renderCollection");
}
hasClass(className2) {
if (this.getClassName(this) == className2) {
return true;
} else {
return false;
}
}
getExtend(extended2, array, depth) {
this.exposeMethodsToObject(extended2);
if (extended2.getClassName) {
array.push(extended2.getClassName());
}
this.getExtends(extended2, array, depth + 1);
}
getExtendsRecursive(extendedClasses, depth, array) {
for (var i = 0; i < extendedClasses.length; i++) {
var extended2 = extendedClasses[i];
this.getExtend(extended2, array, depth);
}
}
getExtends(object93 = this, array = new Array(), depth = 0) {
var extendedClasses = tools_default.getExtendedClassesMulti(object93);
if (!extendedClasses) {
return array;
} else {
this.getExtendsRecursive(extendedClasses, depth, array);
}
return array;
}
getExtendObjectsRecursive(object93, depth, array) {
if (depth > 0) {
this.exposeMethodsToObject(object93);
if (object93.getClassName) {
array.push(object93);
}
}
depth++;
return this.getExtendObjects(extended, array, depth);
}
getExtendObjects(object93 = this, array = new Array(), depth = 0) {
var extended2 = tools_default.getExtendedClass(object93);
if (!extended2) {
return array;
} else {
return this.getExtendObjectsRecursive(object93, depth, array);
}
}
isVisible(element2 = this.element) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
extendsClass(className2) {
var extendedClass = this.getExtendedClass(this);
if (!extendedClass.getClassName) {
return false;
}
if (extendedClass.getClassName() == className2) {
return true;
} else {
return false;
}
}
isOrExtendsClass(className2) {
if (this.isClass(className2)) {
return true;
}
if (this.extendsClass(className2)) {
return true;
}
return false;
}
/*
extend( object ) {
var table = tools.getTableFromObject( object );
var tableName = tools.getClassName( table );
object.tableName = tableName;
object.table = object;
if( object.table ) {
var entries = Object.entries( object );
for( var c = 0; c 0 || element2.offsetHeight > 0;
}
getVisibleInherites(className2, visible) {
var core3 = document.cores[0];
this.cacheArray = new Array();
var objects = core3.dependencieMap[className2];
if (!objects) {
return false;
}
for (var b32 = 0; b32 < objects.length; b32++) {
var object93 = objects[b32];
if (tools_default.isVisible(object93.element) || visible) {
this.cacheArray.push(object93);
}
}
console.log("created cache array", this.cacheArray);
}
async updateFile(message) {
var parameters = message.parameters;
var file31 = parameters.file;
var fullPath = file31.path + "/" + file31.name;
var currentPath = "../cache/platforms/" + document.config.os + "/" + document.config.device + "/" + document.config.tint + "/" + fullPath + "?disableCache=" + Math.random();
console.log("message", message);
console.log("currentPath", currentPath);
var newImport = await import(currentPath);
var newInstance = new newImport.default();
unify_default.extend(newInstance);
console.log("newInstance", newInstance);
var className2 = newInstance.getClassName();
this.getVisibleInherites(className2, false);
newInstance.create = false;
this.updateMainObjects(newInstance);
this.updateInherites(newInstance);
var that2 = this;
setTimeout(function() {
that2.getVisibleInherites(className2, true);
that2.updateInherites(newInstance);
}, 1e3);
}
updateInherites() {
var objects = this.cacheArray;
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
this.instantiateInheritence(object93);
}
}
updateMainObjects(newInstance) {
var core3 = document.cores[0];
var idObjects = core3.classObjects[newInstance.getClassName()];
if (idObjects) {
idObjects = idObjects.filter((n) => n);
console.log(idObjects);
for (var i = 0; i < idObjects.length; i++) {
var object93 = idObjects[i];
object93.updateProperties(newInstance);
}
}
}
async instantiateInheritence(object93) {
var newConstructor = object93.constructor;
if (object93.__sourcePath) {
var currentPath = "../cache/platforms/" + document.config.os + "/" + document.config.device + "/" + document.config.tint + "/" + object93.__sourcePath + "?disableCache=" + Math.random();
var newImport = await import(currentPath);
if (newImport.default) {
var newInstance = new newImport.default();
unify_default.extend(newInstance);
console.log("Hot swap Unify Object", object93.getClassName(), object93.element, newInstance["background"]);
var reload = object93.updateProperties(newInstance);
}
} else {
console.log("error object doesnt have sourcePath", object93);
}
}
addDebugObject(message) {
var object93 = cycle.retrocycle(message.parameters.object);
if (object93.applicationPathString) {
console.log("add object", object93);
var div = document.createElement("div");
div.innerHTML = object93.applicationPathString;
var socket2 = this.socketManager.socket;
div.onclick = function() {
console.log(object93.applicationPathString);
var message2 = new socketMessage();
message2.controller = "settings";
message2.method = "debugObject";
message2.object = object93.applicationPathString;
socket2.send(JSON.stringify(message2));
this.style.color = "green";
console.log(this.style.color);
};
document.body.appendChild(div);
}
}
logDebugMessage(message) {
var parameters = message.parameters;
var parameter1 = cycle.retrocycle(parameters.parameter1);
var parameter2 = cycle.retrocycle(parameters.parameter2);
var parameter3 = cycle.retrocycle(parameters.parameter3);
if (parameter1 == "clear_console") {
console.clear();
}
var filename = parameters.filename;
if (parameters.lineNumber) {
filename += ":" + parameters.lineNumber;
}
filename = this.parseFilename(filename);
if (parameters.parameter3) {
console.log(filename, parameter1, parameter2, parameter3);
} else if (parameters.parameter2) {
console.log(filename, parameter1, parameter2);
} else {
console.log(filename, parameter1);
}
}
};
// framework/client/processManager/processManager.js
var processManager = class {
static {
__name(this, "processManager");
}
add = new processManagerAdd();
update = new processManagerUpdate();
promise = new processManagerPromise();
debugger = new debug();
process(content) {
var message = JSON.parse(content.data);
switch (message.type) {
case "promise":
this.promise.process(message);
break;
case "clientUpdate":
this.update.process(message);
break;
case "addObject":
this.add.process(message);
break;
case "debug":
console.log("debug", message, this.mode);
this.debugger.processDebugMessage(message);
break;
case "logClient":
console.log("----------------- Log client", this.application.selector, message);
break;
default:
}
}
};
// framework/client/socketManager.js
var socketManager = class {
static {
__name(this, "socketManager");
}
promiseManager = new promiseManager();
//debugger = new debugManager();
processManager = new processManager();
socket = false;
mode = "client";
state = "disconnected";
serverAddress = "localhost";
messageID = 0;
tries = 0;
port = 5002;
ssl = false;
promises = new Array();
constructor(port) {
this.promiseManager.socketManager = this;
this.processManager.promise.promiseManager = this.promiseManager;
document.socketManager = this;
if (port) {
this.port = port;
}
}
getSocketAddress() {
if (!this.ssl) {
console.log("%c Trying to connect with server on host: ws://" + this.serverAddress + ":" + this.port, "background: yellow;");
var socketAddress = "ws://" + this.serverAddress + ":" + this.port;
} else {
console.log("%c Ssl set to true, Tying to create Secure connection with server on host: wss://" + this.serverAddress.split(":")[0], "background: yellow;");
var socketAddress = "wss://" + this.serverAddress.split(":")[0];
}
return socketAddress;
}
createSocket() {
var socketManager2 = this;
var socketAddress = this.getSocketAddress();
this.socket = new WebSocket(socketAddress);
var promiseManager32 = this.promiseManager;
this.socket.onclose = function() {
socketManager2.onClose();
};
this.socket.onopen = function() {
socketManager2.onOpen();
};
}
pingServer() {
var message = new socketMessage();
message.controller = "ping";
this.socket.send(JSON.stringify(message));
var that2 = this;
setTimeout(function() {
that2.pingServer();
}, 5e3);
}
async connect() {
var promiseManager32 = this.promiseManager;
promiseManager32.promises = new Array();
promiseManager32.messages = new Array();
this.messageID = 0;
this.createSocket();
var promiseFunction = promiseManager32.createPromiseFunction(this.messageID);
var promise = new Promise(promiseFunction);
await promise;
var message = promiseManager32.getMessageByID(this.messageID);
this.logRecieveMessage(message);
this.messageID++;
this.pingServer();
return message.applications;
}
logRecieveMessage(message) {
var className2 = tools_default.getClassNameByObject(message);
if (document.debugALL) {
console.log("");
console.log("%c recieved message: ", "background: #8bc34a;");
console.log("className: ", className2);
console.log(message);
console.log("");
}
}
onOpen() {
console.log("%c Connected to Socket server", "background: green;");
this.state = "connected";
this.registerClientType(this.mode);
this.createEventListeners();
}
logAjaxConnection(data2) {
console.log("first message recieved", data2);
console.log("sessionKey", this.sessionKey);
}
async registerClient(sessionKey) {
var promiseManager32 = this.promiseManager;
var promiseFunction = promiseManager32.createPromiseFunction(this.messageID);
var promise = new Promise(promiseFunction);
var message = new socketMessage();
message.id = this.messageID;
if (this.sessionKey) {
message.type = "reconnectClient";
message.object = this.sessionKey;
} else {
message.type = "registerClient";
message.object = "none";
}
console.log("message", message);
this.socket.send(JSON.stringify(message));
console.log("awaiting promise");
await promise;
var message = promiseManager32.getMessageByID(this.messageID);
this.messageID++;
console.log("promise recieved", message);
}
disconnect() {
this.socket.close();
}
async addClient() {
var promiseManager32 = this.promiseManager;
this.messageID++;
var messageID = this.messageID;
var data2 = await this.registerClient();
var message = promiseManager32.getMessageByID(messageID);
this.sessionKey = message.data.sessionKey;
return message;
}
createAjaxSocketClass() {
var that2 = this;
return class ajaxSocket {
static {
__name(this, "ajaxSocket");
}
async send(message) {
var json = JSON.parse(message);
json.sessionKey = new String(that2.sessionKey);
message = JSON.stringify(json);
var result = await that2.fetch(message);
var a32 = new Object();
a32.data = result;
that2.message(a32);
}
};
}
async connectAjax() {
var message = new Object();
message.eventName = "connect";
var data2 = await this.fetch(JSON.stringify(message));
this.sessionKey = new String(JSON.parse(data2).sessionKey);
this.logAjaxConnection(data2);
this.socket = this.createAjaxSocketClass();
this.registerClientType(this.mode);
}
async fetch(jsonString) {
const response = await fetch(
"/api/",
{
body: jsonString,
method: "post",
headers: {
"Accept": "application/json, text/plain, */*",
"Content-type": "application/json; charset = UTF-8"
}
}
);
return response.json();
}
onClose() {
this.state = "disconnected";
this.tries++;
this.reconnect();
this.retry();
}
retry() {
}
async reconnect() {
await this.connect();
this.registerClient(this.sessionKey);
}
createEventListeners() {
var socketManager2 = this;
this.socket.onmessage = function(content) {
socketManager2.message(content);
};
}
registerClientType(type) {
this.mode = type;
var message = new socketMessage();
message.controller = "settings";
message.method = "setType";
message.path = new Array();
message.object = type;
this.socket.send(JSON.stringify(message));
}
signin(user32) {
var message = new socketMessage();
message.controller = "settings";
message.method = "signIn";
message.object = user32;
this.socket.send(JSON.stringify(message));
}
async signOut() {
var message = new socketMessage();
message.controller = "settings";
message.method = "signOut";
this.get("settings", "signOut", new Object());
}
message(content) {
this.processManager.process(content);
}
createMessage(messageID, controller, method2, eventName, object93, data2) {
var message = new socketMessage();
message.id = messageID;
message.controller = controller;
message.method = method2;
message.parse = object93.parse;
message.data = data2;
message.eventName = eventName;
if (object93.getClassName) {
message.object = object93.clean(method2)[object93.getClassName()];
message.applicationPath = tools_default.getApplicationPath(object93);
} else {
message.object = object93;
}
if (typeof object93 == "string") {
message.object = object93;
}
return message;
}
createPromise(promiseFunction) {
var promise = new Promise(promiseFunction);
document.promises.push(promise);
return promise;
}
async get(controller, method2, object93, eventName, data2) {
var messageID = ++this.messageID;
var promiseFunction = this.promiseManager.createPromiseFunction(messageID, object93);
var message = this.createMessage(messageID, controller, method2, eventName, object93, data2);
this.logSendMessage(message, object93);
this.socket.send(JSON.stringify(message));
var promise = this.createPromise(promiseFunction);
await promise;
return this.processMessage(method2, messageID);
}
processMessage(method2, messageID) {
var data2 = this.promiseManager.getMessageByID(messageID).data;
switch (method2) {
case "count":
if (!tools_default.getFirstChild(data2)) {
return 0;
}
return tools_default.getFirstChild(data2).count;
break;
default:
if (Object.prototype.toString.call(data2) === "[object Array]") {
return data2;
}
if (typeof data2 == "object") {
return tools_default.getFirstChild(data2);
} else {
return data2;
}
}
}
logInjection(message) {
var path2 = message.applicationPath.join("/");
console.log("socketMessage", message.id);
console.log("");
console.log("%c send message: ", "background: #eb2666;", path2, message);
console.log("");
}
handleInjection(messageID, data2) {
var data2 = this.promiseManager.getMessageByID(messageID).data;
switch (method) {
case "count":
return tools_default.getFirstChild(data2).count;
break;
default:
return tools_default.getFirstChild(data2);
}
}
async inject(message) {
var promiseFunction = this.promiseManager.createPromiseFunction(message.id);
var messageID = message.id;
var method2 = message.method;
this.logInjection(message);
this.socket.send(JSON.stringify(message));
await new Promise(promiseFunction);
return this.handleInjection(messageID, data);
}
logSendMessage(message, object93) {
var path2 = "";
if (message.applicationPath) {
path2 = message.applicationPath.join("/");
}
if (object93.getClassName && object93.debug || document.debugALL) {
console.log("");
console.log("%c send message: ", "background: #eb2666;", path2, message);
console.log("");
}
}
async update(eventName, object93) {
var result = await this.get("column", "update", object93, eventName);
}
};
// framework/client/animation/animation.property.js
var property = class {
static {
__name(this, "property");
}
name;
value;
composeCss() {
var functionNames = new Array("rotate", "translate", "scaleX", "scaleY", "scale", "skewX", "skewY", "skew", "matrix");
if (functionNames.includes(this.name)) {
return "transform: " + this.name + "( " + this.value + " ); ";
} else {
return "\n " + this.name + " : " + this.value + ";\n";
}
}
};
// framework/client/animation/animation.keyFrame.js
var keyFrame = class {
static {
__name(this, "keyFrame");
}
percent;
properties = new Array();
setProperty(name, value2) {
var newProperty = new property();
newProperty.name = name;
if (typeof value2 == "number") {
value2 += "px";
}
newProperty.value = value2;
this.properties.push(newProperty);
}
composeCss() {
var properties = this.properties;
var propertyLines = "";
for (var i = 0; i < properties.length; i++) {
propertyLines += properties[i].composeCss();
}
return propertyLines;
}
};
// framework/client/animation/animation.js
var animation = class {
static {
__name(this, "animation");
}
name;
element;
keyFrames = new Array();
animationManager;
duration;
createKeyFrame(percent) {
var newKeyFrame = new keyFrame();
newKeyFrame.percent = percent;
this.keyFrames.push(newKeyFrame);
return newKeyFrame;
}
createPromiseFunction(id2) {
var that2 = this;
function promiseFunction(resolveFunction) {
var promiseObject = new Object();
promiseObject.id = id2;
promiseObject.resolve = resolveFunction;
that2.animationManager.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
async stop() {
if (!this.element.classList.contains("keyFrameAnimations")) {
var animationClassName = this.animationManager.getAnimationClassName();
this.element.classList.remove(animationClassName);
}
}
async pause() {
this.element.classList.add("pause-animation");
}
setDuration(duration) {
this.duration = duration;
}
setDirection(direction) {
this.direction = direction;
}
setIterationCount(iterationCount) {
this.iterationCount = iterationCount;
}
setFillMode(fillMode) {
this.fillMode = fillMode;
}
async play(duration) {
if (this.element.classList.contains("pause-animation")) {
this.element.classList.remove("pause-animation");
return true;
}
if (!this.element.classList.contains("keyFrameAnimations")) {
var animationClassName = this.animationManager.getAnimationClassName();
this.element.classList.add(animationClassName);
}
if (duration) {
this.duration = duration;
}
this.active = true;
var source = this.animationManager.composeCss();
this.writeStyleToDOM(source);
var promiseFunction = this.createPromiseFunction(this.id);
var promise = new Promise(promiseFunction);
this.animationManager.createEventListener();
await promise;
return true;
}
writeStyleToDOM(source) {
var style = document.createElement("style");
style.type = "text/css";
style.appendChild(document.createTextNode(source));
document.getElementsByTagName("head")[0].appendChild(style);
}
};
// framework/client/animation/animationManager.js
var animationManager = class {
static {
__name(this, "animationManager");
}
id = 0;
start = 0;
animations = new Array();
element = document.querySelector(".test");
promises = new Array();
eventListener;
constructor() {
this.id = document.animationID++;
}
createAnimation(name) {
var newAnimation = new animation();
newAnimation.animationManager = this;
newAnimation.id = document.keyframeID++;
newAnimation.name = name + newAnimation.id;
newAnimation.element = this.element;
newAnimation.created = false;
this.animations[newAnimation.name] = newAnimation;
this.createListeners(newAnimation);
return newAnimation;
}
getAnimationClassName() {
return "keyFrameAnimation" + this.id;
}
createListeners(animation2) {
if (!animation2.direction) {
animation2.__direction = "normal";
} else {
animation2.__direction = animation2.direction;
}
var that2 = this;
animation2.__defineSetter__("direction", function(value2) {
animation2.__direction = value2;
var animationManager2 = animation2.animationManager;
var source = that2.composeCss();
animation2.writeStyleToDOM(source);
});
animation2.__defineGetter__("direction", function() {
return animation2.__direction;
});
}
composeKeyFrameCss(source) {
var animations31 = this.animations;
for (var i in animations31) {
var currentAnimation = animations31[i];
source += "@keyframes " + currentAnimation.name + "{ \n";
var keyFrames = currentAnimation.keyFrames;
for (var i = 0; i < keyFrames.length; i++) {
var currentKeyFrame = keyFrames[i];
source += " " + currentKeyFrame.percent + "% {";
source += currentKeyFrame.composeCss();
source += "}\n";
}
source += "} \n";
currentAnimation.created = true;
}
return source;
}
composeAnimationCss(source) {
var names = new Array();
var durations = new Array();
var interationCounts = new Array();
var fillModes = new Array();
var directions = new Array();
var animations31 = this.animations;
for (var i in animations31) {
var currentAnimation = animations31[i];
if (currentAnimation.active) {
if (currentAnimation.duration) {
names.push(currentAnimation.name);
durations.push(currentAnimation.duration);
directions.push(currentAnimation.direction);
if (!currentAnimation.iterationCount) {
currentAnimation.iterationCount = 1;
}
interationCounts.push(currentAnimation.iterationCount);
if (!currentAnimation.fillMode) {
currentAnimation.fillMode = "none";
}
fillModes.push(currentAnimation.fillMode);
}
}
}
source += ".keyFrameAnimation" + this.id + "{\n";
source += " animation-name: " + names.join(",") + ";\n";
source += " animation-duration: " + durations.join(",") + ";\n";
source += " animation-iteration-count: " + interationCounts.join(",") + ";\n";
source += " animation-fill-mode: " + fillModes.join(",") + ";\n";
source += " animation-direction: " + directions.join(",") + ";\n";
source += "}";
return source;
}
composeCss() {
var source = "";
source += this.composeKeyFrameCss(source);
source += this.composeAnimationCss(source);
return source;
}
addPromise(promiseObject) {
this.promises[promiseObject.id] = promiseObject;
}
getPromiseByID(id2) {
return this.promises[id2];
}
createPromiseFunction(animationID) {
var that2 = this;
function promiseFunction(resolveFunction) {
var promiseObject = {};
promiseObject.id = animationID;
promiseObject.resolve = resolveFunction;
that2.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
attach(object93) {
object93.animate = this.createCallback(object93);
var animationManager2 = this;
object93.createAnimation = function(name) {
return object93.animationManager.createAnimation(name);
};
this.element = object93.element;
}
createCallback(object93) {
object93.animationManager.object = object93;
return async function(from, to, callback) {
return object93.animationManager.animate(from, to, callback);
};
}
async animate(from, to, callback, firstTick = true, animationID, value2 = false, start = false) {
var object93 = this.object;
if (firstTick) {
animationID = document.animationID++;
}
var sign = Math.sign(from - to);
var stop = false;
if (sign > 0) {
value2 = from - value2;
if (value2 < to) {
var stop = true;
}
} else {
value2 = from + value2;
if (value2 > to) {
var stop = true;
}
}
if (firstTick) {
this.object["animationCallback" + animationID] = callback;
}
if (!stop) {
this.object["animationCallback" + animationID](value2);
window.requestAnimationFrame(function(timestamp) {
if (!start) {
start = timestamp;
}
var progress = timestamp - start;
object93.animationManager.animate(from, to, callback, false, animationID, progress, start);
});
} else {
var promise = this.getPromiseByID(animationID);
promise.resolve();
}
if (firstTick) {
this.object["animationCallback" + animationID](value2);
var promiseFunction = this.createPromiseFunction(animationID);
await new Promise(promiseFunction);
return true;
}
}
createEventListener() {
var that2 = this;
if (this.element.keyFrameEventListener) {
canvas.removeEventListener("click", this.element.keyFrameEventListener);
}
this.element.keyFrameEventListener = this.element.addEventListener("animationend", async function(event2) {
var animations31 = that2.animations;
var animationName = event2.animationName;
var currentAnimation = animations31[animationName];
console.log("turn off animation", currentAnimation);
currentAnimation.active = false;
if (currentAnimation) {
var promise = that2.promises[currentAnimation.id];
if (promise) {
promise.resolve();
} else {
return false;
}
}
that2.promises.splice(currentAnimation.id, 1, false);
for (var i = 0; i < that2.promises.length; i++) {
if (that2.promises[i]) {
return false;
}
}
var animationClassName = that2.getAnimationClassName();
that2.element.classList.remove(animationClassName);
}, false);
return true;
}
resetAnimation() {
this.element.classList.remove("keyFrameAnimations");
}
};
// framework/unify/omitMethodNames.js
var omitMethodNames_default = [
"extendDefaultObject",
"exposeMethodsToObject",
"getID",
"getFirstID",
"getApplicationPath",
"getChildren",
"getProperties",
"getParentWithTable",
"getRoot",
"getCore",
"getExtendedClass",
"getExtendedClassName",
"parents",
"getAll",
"getObjectsByClassName",
"isTable",
"extendsTable",
"extendsClass",
"extend",
"setApplicationPath",
"getApplicationPathString",
"setID",
"setApplicationID",
"setParent",
"setUser",
"setUserChildren",
"isHidden",
"syncAllChildren",
"prepend",
"add",
"remove",
"serialize",
"clean",
"clear",
"hide",
"show",
"hideChildren",
"showChildren",
"processGridElement",
"allow",
"isAllowed",
"updatePermissions",
"log",
"updateElementContent",
"computePermissions",
"showParents",
"simpleClone",
"updateProperties",
"extendsClassWorking",
"getExtends",
"getExtendObjects",
"isVisible",
"getProperties",
"__defineGetter__",
"__defineSetter__",
"hasOwnProperty",
"__lookupGetter__",
"__lookupSetter__",
"isPrototypeOf",
"propertyIsEnumerable",
"toString",
"valueOf",
"toLocaleString",
"__proto__",
"collection",
"animationManager",
"socketManager",
"core",
"isRenderCollection",
"getClassName",
"permission",
"constructor",
"filter",
"filterCustom",
"filterByType",
"filterByCollection",
"filterByClassName",
"filterByName",
"filterByID",
"filterByParent",
"filterByParentName",
"getFirstRow",
"getTableName",
"createInstance",
"getColumnName",
"getFilter",
"getParentName",
"getLeft",
"set",
"addObject",
"createVisitor",
"process"
];
// framework/client/themeSwitcher.js
var themeSwitcher = class _themeSwitcher {
static {
__name(this, "themeSwitcher");
}
setCore(core3) {
this.core = core3;
}
communicateTheme(os31, device, tint31) {
var themeProfile = new Object();
themeProfile.os = os31;
themeProfile.device = device;
themeProfile.tint = tint31;
this.core.socketManager.get("settings", "setTheme", JSON.stringify(themeProfile));
}
parseObject(object93) {
if (!object93.parent) {
if (object93.device) {
object93.__os = object93.os;
object93.__tint = object93.tint;
object93.__device = object93.device;
this.createSetters(object93);
}
}
}
updateClassName(oldValue, newValue) {
var elements = document.querySelectorAll("." + oldValue);
for (var i = 0; i < elements.length; i++) {
var element2 = elements[i];
element2.classList.remove(oldValue);
element2.classList.add(newValue);
}
}
delayUpdateThemeProperties() {
var that2 = this;
setTimeout(function() {
that2.updateThemeProperties();
}, 1e3);
}
updateCoreOS(newValue) {
var core3 = this.core;
core3.os = newValue;
core3.setTheme();
core3.os = newValue;
}
osSetter(newValue, object93) {
var core3 = this.core;
var oldValue = object93.__os;
object93.__os = newValue;
this.updateCoreOS(newValue);
this.updateClassName(oldValue, newValue);
core3.callAfterLoad(object93.getRoot());
this.delayUpdateThemeProperties(_themeSwitcher);
core3.communicateTheme(object93.__os, object93.__device, object93.__tint);
console.log("this is the setter of os, changed value from", oldValue, "to", newValue);
}
createOSSetter(object93) {
var themeSwitcher2 = this;
object93.__defineSetter__("os", function(value2) {
themeSwitcher2.osSetter(value2, object93);
});
}
createOSGetter(object93) {
object93.__defineGetter__("os", function(value2) {
return object93.__os;
});
}
updateCoreTint(newValue) {
var core3 = this.core;
core3.tint = newValue;
core3.setTheme();
core3.tint = newValue;
}
tintSetter(newValue, object93) {
var core3 = this.core;
var oldValue = object93.__tint;
object93.__tint = newValue;
this.updateCoreTint(newValue);
this.updateClassName(oldValue, newValue);
document.config.tint = newValue;
this.delayUpdateThemeProperties();
core3.communicateTheme(object93.__os, object93.__device, object93.__tint);
}
createTintSetter(object93) {
var themeSwitcher2 = this;
object93.__defineSetter__("tint", function(value2) {
themeSwitcher2.tintSetter(value2, object93);
});
}
createTintGetter(object93) {
object93.__defineGetter__("tint", function(value2) {
return object93.__tint;
});
}
createSetters(object93) {
this.createOSSetter(object93);
this.createOSGetter(object93);
this.createTintSetter(object93);
this.createTintGetter(object93);
}
updateMethodA(object93, themeObject) {
var properties = Object.getOwnPropertyNames(object93);
for (var j = 0; j < properties.length; j++) {
var methodName = properties[j];
if (!omitMethodNames_default.includes(methodName)) {
if (themeObject[methodName] && typeof themeObject[methodName] == "function") {
}
}
}
}
updateMethodB(object93, themeObject) {
Object.getOwnPropertyNames(Object.getPrototypeOf(object93)).forEach((methodName) => {
if (!omitMethodNames_default.includes(methodName)) {
if (themeObject[methodName] && typeof themeObject[methodName] == "function") {
}
}
});
}
updateMethods(object93, themeObject) {
this.updateMethodA(object93, themeObject);
this.updateMethodB(object93, themeObject);
}
updateRenderCollection(object93, themeObject) {
if (object93.type == "renderCollection") {
if (object93.object) {
object93.object = themeObject.object;
}
}
}
updateProperty(object93, themeObject, name) {
var objectString = object93["__" + name];
var themeString = themeObject[name];
if (themeString != objectString) {
var css2 = this.core.css;
var cssPropertyName = css2.normalizePropertyName(name);
var normalizedProperty = css2.normalizeProperty(cssPropertyName);
var isCSS = css2.propertyIsStyle(normalizedProperty);
if (!isCSS && !definitions_default.invalid.includes(name)) {
object93[name] = themeObject[name];
}
}
}
updateCustomProperties(object93, themeObject) {
var properties = themeObject.getProperties();
for (var j = 0; j < properties.length; j++) {
var name = properties[j].name;
var value2 = properties[j].value;
if (typeof value2 == "string") {
if (!definitions_default.invalid.includes(name)) {
this.updateProperty(object93, themeObject, name);
}
}
}
}
getThemeObject(themeObjects, className2) {
var themeByClass = themeObjects[className2];
themeByClass = themeByClass.filter((n) => n);
var themeObject = themeByClass[0];
return themeObject;
}
updateObject(object93, className2, themeObjects) {
var themeObject = this.getThemeObject(themeObjects, className2);
if (themeObject) {
this.updateMethods(object93, themeObject);
}
this.updateRenderCollection(object93, themeObject);
if (themeObject) {
this.updateCustomProperties(object93, themeObject);
}
}
updateThemeProperties() {
var themeObjects = document.themeObjects[this.core.os][this.core.device][this.core.tint];
console.log("themeObjects", themeObjects);
for (var i = 0; i < this.core.objects.length; i++) {
var object93 = this.core.objects[i];
var className2 = object93.getClassName();
if (themeObjects[className2]) {
this.updateObject(object93, className2, themeObjects);
}
}
}
};
// framework/client/fileLoader.js
var fileLoader = class {
static {
__name(this, "fileLoader");
}
files = new Array();
filesExists = new Array();
async get(url2) {
return await this.getFile(url2);
}
exists(url2) {
if (this.filesExists[url2]) {
return this.filesExists[url2];
}
var http = new XMLHttpRequest();
http.open("HEAD", url2, false);
http.send();
this.filesExists[url2] = http.status != 404;
return http.status != 404;
}
async getFile(url2) {
if (this.files[url2]) {
return this.files[url2];
} else {
var response = await fetch(url2);
var json = await response.json();
this.addFile(url2, json);
return json;
}
}
addFile(url2, json) {
this.files[url2] = json;
}
};
// framework/unify/cookieManager.js
var cookieManager = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default = new cookieManager();
// framework/client/stateMachine.js
var stateEvent = class {
static {
__name(this, "stateEvent");
}
object;
method;
args;
};
var state = class {
static {
__name(this, "state");
}
events = new Array();
registerEvent(object93, method2, args) {
var event2 = new stateEvent();
event2.object = object93;
event2.method = method2;
event2.args = args;
this.events.push(event2);
}
async triggerEvents() {
var events = this.events;
for (var i = 0; i < events.length; i++) {
var event2 = events[i];
var object93 = event2.object;
var method2 = event2.method;
var args = event2.args;
object93["__" + method2](args[0], args[1], args[2], args[3], args[4]);
}
}
};
var stateMachine = class {
static {
__name(this, "stateMachine");
}
states = new Array();
currentState;
stateID = 0;
constructor() {
var state2 = this.createState();
}
createState() {
var newState = new state();
newState.id = this.stateID++;
this.states.push(newState);
this.currentState = newState;
return newState;
}
registerEvent(object93, method2, args) {
var state2 = this.currentState;
state2.registerEvent(object93, method2, args);
}
async composeState(...args) {
this.createState();
var state2 = this.currentState;
if (args.length == 0) {
history.pushState({ id: state2.id }, "Unify");
} else if (args.length == 1) {
var title91 = args.pop().replaceAll(" ", "_");
if (title91 == "") {
title91 = "page";
}
history.pushState({ id: state2.id }, "Unify", "/" + title91 + ".html");
} else {
var title91 = args.pop();
title91 = title91.toString().replaceAll(" ", "_");
if (title91 == "") {
title91 = "page";
}
history.pushState({ id: state2.id }, "Unify", "/" + args.join("/") + "/" + title91 + ".html");
}
}
generateUrl(...args) {
var title91 = args.pop().replaceAll(" ", "_");
return "https://unifyjs.org/" + args.join("/") + "/" + title91 + ".html";
}
getState(id2) {
return this.states[id2];
}
};
// framework/client/core.js
document.stateMachine = new stateMachine();
var objectsPendingToCreate = new Array();
var core2 = class {
static {
__name(this, "core");
}
dom = new dom();
css = new css();
eventManager = new eventManager();
themeSwitcher = new themeSwitcher();
fileLoader = new fileLoader();
stateMachine = document.stateMachine;
type = "core";
objects = new Array();
pathObjects = new Array();
root = false;
user = false;
wait = false;
addDOMToSelector = true;
loadAnimations = true;
createStyleSheet = true;
initializeRenderLoop = true;
parseEvents = true;
executeMethods = true;
classObjects = [];
sourcePathObjects = [];
visibleObjectClassNames = "";
constructor() {
this.themeSwitcher.setCore(this);
}
setUser(user32) {
this.user = user32;
for (var i = 0; i < this.objects.length; i++) {
this.objects[i].user = user32;
}
}
clearCache() {
this.css.clearCache();
}
mapClassDependencies(idObjects) {
idObjects = idObjects.filter(function() {
return true;
});
if (idObjects.length > 0) {
for (var i = 0; i < idObjects.length; i++) {
var currentClass = idObjects[i];
var extendObjects = currentClass.getExtends();
this.mapExtendsDependencies(extendObjects, currentClass);
}
}
}
mapExtendsDependencies(extendObjects, currentClass) {
for (var c31 = 0; c31 < extendObjects.length; c31++) {
var extendName = extendObjects[c31];
if (!this.dependencieMap[extendName]) {
this.dependencieMap[extendName] = new Array();
} else {
this.dependencieMap[extendName].push(currentClass);
}
}
}
createDependencyMap() {
var classObjects = this.classObjects;
var keys2 = Object.keys(classObjects);
this.dependencieMap = new Array();
for (let className2 of keys2) {
var idObjects = classObjects[className2];
this.mapClassDependencies(idObjects);
}
}
getFirstByClassName(classname, object93 = false) {
this.extendDefaultObject(object93);
if (object93.getClassName() == classname) {
return object93;
}
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
var result = this.getFirstByClassName(classname, child);
if (result) {
return result;
}
}
}
getObjectByPath(applicationPath, application32 = false) {
if (!application32) {
application32 = this.root;
}
var objectName = applicationPath.pop();
var currentApplication = application32[objectName];
if (applicationPath.length > 0) {
return this.getObjectByPath(applicationPath, currentApplication);
} else {
return currentApplication;
}
}
removeCollection(collection35) {
var rows = collection35.rows;
for (var b32 = 0; b32 < object.rows.length; b32++) {
var row181 = object.rows[b32];
if (row181.getClassName) {
this.removeObject(row181.getClassName(), row181.id);
}
}
}
removeChildren(object93) {
var children = object93.getChildren();
for (var b32 = 0; b32 < children.length; b32++) {
var child = children[b32];
if (child.getClassName) {
this.removeObject(child.getClassName(), child.id);
}
}
if (object93.getCollection) {
if (collection35) {
var collection35 = object93.getCollection();
this.removeCollection(collection35);
}
}
}
removeObject(className2, id2) {
if (className2 && id2) {
var classObjects = this.classObjects[className2];
if (classObjects) {
var object93 = classObjects[id2];
if (object93) {
delete this.classObjects[className2][id2];
}
}
}
}
getObjectByClassName(className2, id2) {
if (!this.classObjects[className2]) {
return false;
}
var objects = this.classObjects[className2][id2];
if (objects) {
return objects;
} else {
return false;
}
}
getObjectsByClassName(className2) {
var objects = this.classObjects[tools_default.validateString(className2)];
if (objects) {
var sortedArray = new Array();
for (var key in objects) {
if (key === "length" || !objects.hasOwnProperty(key)) {
continue;
}
sortedArray.push(objects[key]);
}
return sortedArray;
} else {
return false;
}
}
getObjectsByPropertyName(propertyName2) {
var objects = this.objects;
var matches = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == propertyName2) {
matches.push(object93);
}
}
return matches;
}
setObjectClasses(object93) {
object93.__proto__.core = this;
object93.__proto__.socketManager = this.socketManager;
object93.__proto__.stateMachine = this.stateMachine;
if (this.loadAnimations) {
object93.__proto__.animationManager = new animationManager();
}
object93.fileLoader = this.fileLoader;
}
callAfterLoad(object93) {
if (object93.afterLoad) {
object93.afterLoad();
}
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (this.allowParseChild(object93, child)) {
this.callAfterLoad(child);
}
}
}
callAfterThemeLoad(object93) {
if (object93.afterThemeLoad) {
object93.afterThemeLoad();
}
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (this.allowParseChild(object93, child)) {
this.callAfterThemeLoad(child);
}
}
}
extendDefaultObject(object93) {
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(object93);
}
filterVisibleObjects(objects) {
var visibleObjectClassNames = new Array();
for (var i = 0; i < objects.length; i++) {
var object93 = objects[i];
if (tools_default.isVisible(object93.element)) {
visibleObjectClassNames.push(object93.getClassName());
}
}
visibleObjectClassNames = tools_default.uniqueArrayRows(visibleObjectClassNames);
return visibleObjectClassNames;
}
communicateVisibleElements() {
var objects = this.objects;
var visibleObjectClassNames = this.filterVisibleObjects(objects);
if (this.visibleObjectClassNames != visibleObjectClassNames.join()) {
this.visibleObjectClassNames = visibleObjectClassNames.join();
this.socketManager.get("settings", "setVisibleElements", visibleObjectClassNames.join());
}
}
communicateTheme(os31, device, tint31) {
this.themeSwitcher.communicateTheme(os31, device, tint31);
}
createObjectCustomVariables(object93) {
if (typeof object93.sanitize != "boolean") {
object93.sanitize = true;
}
if (!typeof object93.display) {
object93.display = "flex";
}
if (!typeof object93.transition) {
object93.transition = "all 0.1s ease-out";
}
if (typeof object93.propegateEvent != "boolean") {
object93.propegateEvent = true;
}
if (object93.editable) {
object93.useCustomElement = true;
}
if (typeof object93.static != "boolean") {
object93.static = false;
}
if (typeof object93.setZIndex != "boolean") {
object93.setZIndex = true;
}
if (typeof object93.created != "boolean") {
object93.created = false;
}
if (typeof object93.enabled != "boolean") {
object93.enabled = true;
}
if (typeof object93.addToDom != "boolean") {
object93.addToDom = true;
}
if (typeof object93.loadThemes != "boolean") {
object93.loadThemes = true;
}
if (typeof object93.isActive != "boolean") {
object93.isActive = true;
}
if (typeof object93.parse != "boolean") {
object93.parse = true;
}
if (typeof object93.parseChildren != "boolean") {
object93.parseChildren = true;
}
if (typeof object93.parseTable != "boolean") {
object93.parseTable = true;
}
if (!object93.layers) {
object93.layers = 2;
}
if (object93.layers > 1) {
if (!object93.boxGridArea) {
object93.boxGridArea = object93.propertyName;
}
} else {
if (!object93.gridArea) {
object93.gridArea = object93.propertyName;
}
}
if (typeof object93.showValue == "undefined") {
object93.showValue = true;
}
if (!object93.display) {
object93.display = "flex";
}
if (!object93.user) {
if (this.user) {
object93.user = this.user;
}
}
if (typeof object93.renderToDOM != "boolean") {
if (object93.datatype) {
object93.renderToDOM = false;
} else {
object93.renderToDOM = true;
}
}
object93.callbacks = new Array();
}
createCustomMethod(object93, nodeMethod) {
object93[nodeMethod] = async function(...nodeArguments) {
this.nodeMethodArguments = JSON.stringify(nodeArguments);
return this.socketManager.get("object", "callNodeMethod", this, nodeMethod);
};
}
parseStateMethods(object93) {
var stateMethodString = object93.__stateMethods;
if (stateMethodString) {
var stateMethods = stateMethodString.split(",");
for (var i = 0; i < stateMethods.length; i++) {
const stateMethod = stateMethods[i];
var originalMethod = object93[stateMethod];
object93["__" + stateMethod] = originalMethod;
var stateMachine2 = this.stateMachine;
object93[stateMethod] = function(...args) {
stateMachine2.registerEvent(object93, stateMethod, args);
object93["__" + stateMethod](args[0], args[1], args[2], args[3], args[4]);
};
}
}
}
createObjectCustomMethods(object93) {
var nodeMethodsString = object93.__nodeMethods;
if (nodeMethodsString) {
var nodeMethods = nodeMethodsString.split(",");
for (var i = 0; i < nodeMethods.length; i++) {
const nodeMethod = nodeMethods[i];
this.createCustomMethod(object93, nodeMethod);
}
}
object93.save = async function() {
return this.socketManager.get("table", "save", this, "save");
};
object93.delete = async function() {
return this.socketManager.get("table", "delete", this, "delete");
};
object93.process = async function() {
return this.socketManager.get("table", "process", this, this.lastEvent);
};
}
attachAnimationManager(object93) {
}
createRenderTimer(object93) {
if (!object93.mouse) {
object93.mouse = new vector2(0, 0);
}
if (!object93.createdTimer) {
object93.createdTimer = true;
object93.filterStrength = 60;
object93.frameTime = 0;
object93.lastLoop = performance.timing.navigationStart + performance.now();
object93.timeID = 0;
object93.thisLoop;
}
}
renderLoop(start, previousProgress) {
var object93 = this;
object93.requestAnimationFrameID = window.requestAnimationFrame(function(timestamp) {
var thisFrameTime = (object93.thisLoop = performance.timing.navigationStart + performance.now()) - object93.lastLoop;
object93.frameTime += (thisFrameTime - object93.frameTime) / object93.filterStrength;
object93.lastLoop = object93.thisLoop;
if (object93.showFps) {
object93.customElement.innerHTML = (1e3 / object93.frameTime).toFixed(1) + " fps";
}
if (!start) {
start = timestamp;
}
var progress = (timestamp - start) / 10;
if (!previousProgress) {
var delta = 0;
} else {
var delta = progress - previousProgress;
}
object93.render(delta, progress);
object93.renderLoop(start, progress);
});
}
attachRenderLoop(object93) {
this.createRenderTimer(object93);
if (object93.create && !object93.isCreated) {
object93.create();
object93.isCreated = true;
}
object93.renderLoop = this.renderLoop;
object93.renderLoop();
}
createObjects() {
var objects = objectsPendingToCreate;
console.log("objectsPendingToCreate", objectsPendingToCreate.length);
while (objects.length > 0) {
var object93 = objects.pop();
if (object93.create && object93.type != "renderCollection") {
}
}
console.log("finished", objectsPendingToCreate);
}
callObjectMethods(object93) {
if (object93.sync) {
}
if (typeof object93.render == "function" && this.initializeRenderLoop) {
this.attachRenderLoop(object93);
var that2 = this;
object93.startRenderLoop = function() {
that2.attachRenderLoop(object93);
};
}
if (this.loadAnimations) {
object93.animationManager.attach(object93);
}
if (object93.create && this.executeMethods) {
if (object93.type != "renderCollection" && !object93.isCreated) {
object93.create();
object93.isCreated = true;
} else {
if (!object93.isHidden()) {
object93.create();
}
}
}
if (object93.setup) {
object93.setup();
}
if (object93.permissions) {
object93.updatePermissions(object93.permissions);
}
if (object93.windowResize && this.executeMethods) {
object93.windowResize();
}
}
validateUser(object93) {
var user32 = cookieManager_default.get("user");
if (object93.permitted) {
if (object93.allowed) {
object93.allowed();
}
} else {
if (object93.denied) {
object93.denied();
}
}
}
async prepareObject(object93) {
this.setObjectClasses(object93);
this.createObjectCustomVariables(object93);
}
parseObject(object93) {
if (object93.type != "collection" && object93.renderToDOM) {
this.dom.parseObject(object93);
this.css.parseObject(object93);
if (this.parseEvents) {
this.eventManager.parseEvents(object93);
}
}
}
parseRows(object93) {
if (object93.type == "renderCollection") {
var childRows = object93.rows;
for (var c31 = 0; c31 < childRows.length; c31++) {
object93.addRow(childRows[c31]);
}
}
}
acceptObject(object93) {
if (object93.scope == "private") {
return false;
}
if (object93.enabled == false) {
return false;
}
if (object93.disable == true) {
return false;
}
if (object93.getClassName() == "signed") {
return false;
}
return true;
}
getClassObjects() {
var classObjects = this.classObjects;
var keys2 = Object.keys(classObjects);
var array = new Array();
for (let x of keys2) {
var idObjects = classObjects[x];
idObjects = idObjects.filter(function() {
return true;
});
if (idObjects.length > 0) {
array.push(idObjects);
}
}
return array;
}
getClassObjectsOrdered() {
if (!this.classObjectsOrdered) {
this.classObjectsOrdered = this.getClassObjects();
}
return this.classObjectsOrdered;
}
addObjects(object93, addToObjects) {
if (addToObjects) {
this.objects.push(object93);
this.pathObjects[object93.getApplicationPathString()] = object93;
}
if (!this.getObjectByClassName(object93.getClassName(), object93.id)) {
if (!this.classObjects[object93.getClassName()]) {
this.classObjects[object93.getClassName()] = new Array();
}
if (object93.id) {
this.classObjects[object93.getClassName()][object93.id] = object93;
} else {
this.classObjects[object93.getClassName()].push(object93);
}
}
this.classObjects[object93.getClassName()].push(object93);
if (!this.sourcePathObjects[object93["__sourcePath"]]) {
this.sourcePathObjects[object93["__sourcePath"]] = new Array();
}
this.sourcePathObjects[object93["__sourcePath"]].push(object93);
}
updateCore(object93, addToObjects) {
if (!this.root) {
this.root = object93;
}
this.extendDefaultObject(object93);
if (object93.getClassName) {
this.addObjects(object93, addToObjects);
}
}
async prepareObjects(object93) {
this.setObjectClasses(object93);
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
await this.prepareObjects(child);
}
}
runDefault(object93) {
if (object93.default) {
object93.default();
}
if (object93.getChildren) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.runDefault(child);
}
}
}
appendAllToSelector(object93 = this.root) {
}
fixCustomElementInheritence(object93) {
}
removeUnifyElement(object93, depth = 0) {
var extended2 = tools_default.getExtendedClass(object93);
this.extendDefaultObject(object93);
if (extended2) {
var extendConstructor = extended2.constructor;
var instance = new extendConstructor();
depth++;
if (instance.customElement && instance.getClassName) {
return this.removeUnifyElement(extended2, depth);
} else {
return depth;
}
} else {
return depth;
}
}
setTheme() {
this.dom.tint = this.tint;
this.dom.device = this.device;
this.dom.os = this.os;
this.dom.addDOMToSelector = this.addDOMToSelector;
this.css.tint = this.tint;
this.css.device = this.device;
this.css.os = this.os;
}
createDefaultStyleProperties(object93) {
const array = Object.entries(definitions_default.css);
for (var i = 0; i < array.length; i++) {
var propertyName2 = array[i][0];
if (!object93[propertyName2] && propertyName2 != "gridArea") {
object93.__proto__[propertyName2] = "";
}
}
console.log(object93);
}
createCustomEvents(object93) {
object93.submit = function(event2) {
event2.preventDefault();
};
document.body.addEventListener("mousemove", function(event2) {
object93.mouse = document.mouse;
object93.mouseVelocity = document.mouseVelocity;
});
}
async parse(object93, addToObjects = true) {
if (!this.acceptObject(object93)) {
return false;
}
this.createCustomEvents(object93);
this.fixCustomElementInheritence(object93);
this.createObjectCustomMethods(object93);
this.parseStateMethods(object93);
this.updateCore(object93, addToObjects);
this.prepareObject(object93);
this.parseObject(object93);
this.attachAnimationManager(object93);
if (object93.parseChildren) {
this.parseChildren(object93);
}
this.callObjectMethods(object93);
if (object93.type != "collection") {
this.createHTML(object93);
}
this.themeSwitcher.parseObject(object93);
if (object93.prepare) {
object93.prepare(this.socketManager);
}
}
parseCSSProperties(object93) {
var properties = object93.getProperties();
for (var c31 = 0; c31 < properties.length; c31++) {
var property2 = properties[c31];
this.css.parseProperty(property2, object93);
}
}
addObjectToDOM(object93) {
this.dom.parseInnerElements(object93);
if (this.createStyleSheet) {
this.css.createStyleSheet(object93);
}
}
createHTML(object93) {
if (object93.renderToDOM) {
this.parseCSSProperties(object93);
if (object93.isActive || object93.type != "collection" || object93.enabled) {
this.addObjectToDOM(object93);
}
}
}
parseRenderCollectionObject(child, index) {
if (child.getCollection) {
if (child.object) {
var newObject = new child.object();
this.extendDefaultObject(newObject);
newObject.addToDom = false;
newObject.parent = child;
newObject.order = index;
newObject.propertyName = newObject.getClassName();
}
}
}
async parseChildren(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
child.order = c31;
child.parent = object93;
if (this.allowParseChild(object93, child)) {
this.parse(child);
}
if (child.type == "renderCollection") {
this.parseRenderCollectionObject(child, c31);
}
}
}
allowParseChild(parent, child) {
if (!child.extendsClass) {
this.extendDefaultObject(child);
}
if (child.constructor.name != "Object" && !child.extendsClass("table")) {
if (!(!parent.parseTable && child.datatype)) {
return true;
}
}
return false;
}
updatePermissions(objectPermissions) {
for (var c31 = 0; c31 < objectPermissions.length; c31++) {
var objectPermission = objectPermissions[c31];
var path2 = objectPermission.path.split("/");
var object93 = this.getObjectByPath(path2);
var permissions = objectPermission.permission;
if (object93) {
object93.updatePermissions(permissions);
} else {
}
}
}
};
// framework/client/codePreview.js
var codePreview = class {
static {
__name(this, "codePreview");
}
constructor(application32) {
return this.createPreviewApplication(application32);
}
createPreviewApplication(app) {
var id2 = app.selector;
var element2 = document.querySelector(id2);
if (element2 && element2.children.length == 0) {
this.stylePreviewApplication(element2, id2);
}
return element2;
}
stylePreviewApplication(element2, id2) {
var examplePre = element2.previousElementSibling;
if (examplePre && examplePre.firstChild) {
var codeElement = examplePre.firstChild;
codeElement.className = codeElement.className + " halfCodeElement";
examplePre.className = "examplePre";
element2.remove();
var examplePanel = document.createElement("div");
examplePanel.className = "examplePanel";
examplePanel.id = id2.replace("#", "").replace(".", "");
examplePre.appendChild(examplePanel);
}
}
createPreviewLabel(element2) {
var previewLabel = document.createElement("div");
previewLabel.className = "previewLabel";
previewLabel.innerHTML = "preview";
element2.appendChild(previewLabel);
}
};
// framework/unify/extender.rejectMethods.js
var extender_rejectMethods_default = new Array(
"extendDefaultObject",
"exposeMethodsToObject",
"getID",
"getFirstID",
"getApplicationPath",
"getChildren",
"getProperties",
"getParentWithTable",
"getRoot",
"getCore",
"getExtendedClass",
"getExtendedClassName",
"parents",
"getAll",
"getObjectsByClassName",
"isTable",
"extendsTable",
"extendsClass",
"extend",
"setApplicationPath",
"getApplicationPathString",
"setID",
"setApplicationID",
"setParent",
"setUser",
"setUserChildren",
"isHidden",
"syncAllChildren",
"prepend",
"add",
"remove",
"serialize",
"clean",
"clear",
"hide",
"show",
"hideChildren",
"showChildren",
"processGridElement",
"allow",
"isAllowed",
"updatePermissions",
"log",
"updateElementContent",
"computePermissions",
"showParents",
"simpleClone",
"updateProperties",
"extendsClassWorking",
"getExtends",
"getExtendObjects",
"isVisible",
"getProperties",
"__defineGetter__",
"__defineSetter__",
"hasOwnProperty",
"__lookupGetter__",
"__lookupSetter__",
"isPrototypeOf",
"propertyIsEnumerable",
"toString",
"valueOf",
"toLocaleString",
"__proto__",
"collection"
);
// framework/unify/extender.js?disableCache=0235
function extender(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender, "extender");
// framework/unify/extender.js?disableCache=0568
function extender2(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender2, "extender");
// framework/cache/platforms/Windows/Mobile/Light/elements/button.js?disableCache=0568
var button = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 12;
padding = "8px 40px";
background = "#0067C0";
color = "white";
hoverBackgroundColor = "rgb(86 141 189)";
opaqueBackgroundColor = "#0067C0";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/icon.js?disableCache=0568
var icon_id = 0;
var icon = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(0)";
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/minimizeButton.js?disableCache=0235
var minimizeButton = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.js?disableCache=0568
var menuButton = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
borderRadius = 6;
width = 160;
padding = 10;
marginTop = 2;
marginBottom = 2;
paddingLeft = 30;
activated = false;
propegateEvent = false;
cursor = "pointer";
hightlightBackgroundColor = "rgb(141 180 189 / 12%)";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.news.js?disableCache=0568
var newsButton = class extends menuButton {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0568
var settingsButton = class extends menuButton {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0568
var collection5 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0568
var datatype_default2 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0568
var documentTool2 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object4 = new documentTool2();
var document_default2 = object4.getDocument();
// framework/cache/platforms/Windows/Mobile/Light/elements/option.js?disableCache=0568
var option = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default2.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/group/user.group.js?disableCache=0568
var visitor = class extends option {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member = class extends option {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin = class extends option {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member();
admin = new admin();
visitor = new visitor();
};
// framework/cache/platforms/Windows/Mobile/Light/user/group/user.group.permission.js?disableCache=0568
var user_group_permission_default = new groups();
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0568
var signinPageButton = class extends menuButton {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0568
var signinButton = class extends menuButton {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0568
var visitor2 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor2();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default = new userManager();
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0568
var signoutButton = class extends menuButton {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default.member, "PROCESS");
this.allow(user_group_permission_default.admin, "PROCESS");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0568
var fileMangerButton = class extends menuButton {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0568
var settingsButton2 = class extends menuButton {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.users.js?disableCache=0568
var usersPageButton = class extends menuButton {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default.member, "PROCESS");
this.allow(user_group_permission_default.admin, "PROCESS");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0568
var settingsButton3 = class extends menuButton {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/header.js?disableCache=0568
var header = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
fontWeight = "bold";
fontSize = 24;
margin = 0;
color = "#282626";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.header.js?disableCache=0568
var menuHeader = class extends header {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/leftSide/leftSide.js?disableCache=0235
var leftSide = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader();
paddingLeft = 4;
paddingRight = 4;
background = "rgb(255 255 255 / 75%)";
color = "black";
fontWeight = "200";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton();
settingsButton = new settingsButton();
usersButton = new usersPageButton();
signinButton = new signinPageButton();
signoutButton = new signoutButton();
signupButton = new signinButton();
animationsButton = new settingsButton2();
gridButton = new settingsButton3();
fileManagerButton = new fileMangerButton();
};
// framework/client/table.js
var table = class {
static {
__name(this, "table");
}
__className = "table";
type = "table";
id = 0;
collection = false;
collections = new Array();
load = true;
synced = false;
useCustomElement = false;
useCache = false;
deleteProperty(child) {
if (child.rowID) {
delete this[child.propertyName];
}
}
cleanChildren(object93) {
if (object93.getChildren) {
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.rows) {
child.rows = new Array();
}
this.deleteProperty(child);
this.cleanChildren(child);
}
}
}
destroyEventListener(object93) {
if (object93.render) {
if (object93.autoDestroyRenderLoop) {
window.cancelAnimationFrame(object93.requestAnimationFrameID);
}
}
if (object93.destroy) {
object93.destroy();
}
}
destroyEventListeners(element2) {
if (element2.object) {
var object93 = element2.object;
this.destroyEventListener(object93);
}
var children = element2.childNodes;
for (var i = 0; i < children.length; i++) {
var child = children[i];
this.destroyEventListeners(child);
}
}
logSync() {
if (this.debug | document.debugALL) {
console.log("");
console.log("%ctable::sync", "background: #5dc2d6;");
console.log("className: ", this.getClassName());
console.log("Path: ", this.applicationPathString);
console.log(this);
}
}
async loadObject(sign) {
if (this.load) {
if (!this.id) {
await this.createObject(sign);
} else {
await this.updateObject();
}
}
}
scrollPage(show) {
if (show) {
this.show();
if (this.element) {
this.element.scrollTo(0, 0);
}
if (this.boxElement) {
this.boxElement.scrollTo(0, 0);
}
}
}
hasURL() {
var hasUrl = false;
if (this.parent.type != "table") {
hasUrl = true;
}
if (this.parent.type == "renderCollection") {
hasUrl = false;
}
if (this.title && this.title.value == "") {
hasUrl = false;
}
if (!this.title) {
hasUrl = false;
}
return hasUrl;
}
composePath() {
var urlPath = new Array();
urlPath.push(this.propertyName);
if (this.id) {
urlPath.push(this.id);
}
if (this.title) {
if (this.title.value == "") {
urlPath.push(this.propertyName.replaceAll(" ", "_") + ".html");
} else {
urlPath.push(this.title.value.replaceAll(" ", "_") + ".html");
}
} else {
urlPath.push(this.propertyName.replaceAll(" ", "_") + ".html");
}
return urlPath.join("/");
}
async createUrl(pass) {
var hasURL = this.hasURL();
if (hasURL || pass) {
var path2 = this.composePath();
var state2 = new Object();
state2.id = this.id;
state2.applicationPath = this.applicationPath;
state2.table = this;
document.states.push(state2);
var url2 = window.location;
await history.pushState({ id: document.states.length - 1 }, "Unify", "/" + path2);
}
}
async sync(sign = false, show = true, createUrl = true) {
var sign = true;
this.setApplicationPath();
this.logSync();
await this.loadObject(sign);
if (createUrl) {
}
this.scrollPage(show);
this.getCore().communicateVisibleElements();
return true;
}
async createObject(sign) {
if (sign) {
var table33 = await this.socketManager.get("table", "create", this, "sign");
} else {
var table33 = await this.socketManager.get("table", "create", this);
}
this.setID(table33.id);
this.updatePermissions(table33.permissions);
return true;
}
async getObject() {
if (this.useCache) {
var object93 = document.cacheManager.getLocalObject(this, this.id, tools_default.getTableName(this));
} else {
var object93 = false;
}
if (!object93) {
var object93 = await this.socketManager.get("table", "get", this);
}
return object93;
}
async prepareObject(object93) {
this.setID(object93.id);
this.serialize(object93);
this.updatePermissions(object93.permissions);
await this.setupChildren();
if (this.create) {
await this.create();
}
}
async updateObject() {
var object93 = await this.getObject();
await this.prepareObject(object93);
this.getCore().appendAllToSelector();
return true;
}
async setupChildren() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.setup) {
await child.setup();
}
}
}
};
// framework/unify/userPermission.js
var userPermission = class {
static {
__name(this, "userPermission");
}
constructor(user32, type, policy) {
if (user32) {
this.userObject = user32;
}
if (type) {
this.type = type;
}
if (policy) {
this.policy = policy;
}
}
userObject;
type;
policy;
};
// framework/unify/permissionManager.js
var permissionManager = class {
static {
__name(this, "permissionManager");
}
__className = "permissionManager";
permissions = new Array();
addPermission(user32, type) {
var currentPermission = new userPermission(user32, type, "allow");
this.permissions.push(currentPermission);
}
allow(user32, type) {
if (!user32) {
return false;
}
this.addPermission(user32, type);
}
callPermissionMethod(object93) {
var clone2 = object93.simpleClone();
object93.permissionManager.permissions = new Array();
object93.permissions = new Array();
object93.permission(clone2);
}
noPermissionsWarning(object93) {
if (object93.permissionManager.permissions.length == 0) {
if (object93.debug) {
console.log("No permissions are set for this object, All request are rejected..");
}
}
}
isAllowed(user32, type, object93) {
if (object93.permission) {
this.callPermissionMethod(object93);
this.noPermissionsWarning(object93);
}
var permission2 = new userPermission(user32, type);
if (this.permissions.length == 0) {
return false;
}
var isPermitted = this.checkPermissions(permission2);
if (isPermitted) {
return true;
} else {
return false;
}
}
checkPermissions(permissionB) {
for (var c31 = 0; c31 < this.permissions.length; c31++) {
var permission2 = this.permissions[c31];
if (this.checkPermission(permission2, permissionB)) {
return true;
}
}
return false;
}
checkCollectionPermission(permission2, permissionB) {
var permissionA2 = new userPermission(permissionB.userObject, permission2.type, permissionB.userObject);
if (this.comparePermission(permissionA2, permissionB)) {
return true;
}
}
checkRenderObjectPermissionUser(permissionA2, permissionB, validator2) {
if (currentUser.value) {
var permissionA2 = new userPermission();
permissionA2.type = permission.type;
permissionA2.policy = permission.policy;
permissionA2.userObject = currentUser[b];
if (this.comparePermission(permissionA2, permissionB)) {
validator2.isValid = true;
}
}
}
checkRenderobjectPermission(permission2, permissionB) {
var userObject = permission2.userObject;
var users = userObject.rows;
var validator2 = new validator2();
for (var b32 = 0; b32 < users.length; b32++) {
var currentUser2 = users[b32];
this.checkRenderObjectPermissionUser(permissionA, permissionB, validator2);
if (validator2.isValid) {
return true;
}
}
}
checkUserGroupPermission(permission2, permissionB) {
var user32 = permissionB.userObject;
var userGroup = permission2.userObject;
if (user32.groups.value != userGroup.value) {
return false;
}
if (permissionB.type != permission2.type) {
return false;
}
return true;
}
isDefined(userObject, validator2) {
if (!userObject) {
validator2.isValid = false;
}
}
isUserPlaceholder(userObject, validator2) {
if (userObject == "userplaceholder") {
validator2.isValid = false;
}
}
validateVisitor(permission2, permissionB, validator2) {
if (!permissionB.userObject) {
if (permission2.userObject.__className == "visitor") {
validator2.isValid = true;
} else {
validator2.isValid = false;
}
}
}
compareUser(permission2, permissionB, validator2) {
if (this.comparePermission(permission2, permissionB)) {
validator2.isValid = true;
}
}
compareCollection(permission2, permissionB, validator2) {
if (this.checkCollectionPermission(permission2, permissionB)) {
validator2.isValid = true;
}
}
compareRenderCollection(permission2, permissionB, validator2) {
if (this.checkRenderobjectPermission(permission2, permissionB)) {
validator2.isValid = true;
}
}
compareUserGroup(permission2, permissionB, validator2) {
if (this.checkUserGroupPermission(permission2, permissionB)) {
validator2.isValid = true;
}
}
validateObjects(userObject, validator2) {
this.isDefined(userObject, validator2);
this.isUserPlaceholder(userObject, validator2);
}
compareObjects(userObject, permission2, permissionB, validator2) {
switch (userObject.getClassName()) {
case "user":
this.compareUser(permission2, permissionB, validator2);
break;
case "userObject":
this.compareUser(permission2, permissionB, validator2);
break;
case "collection":
this.compareCollection(permission2, permissionB, validator2);
break;
default:
if (userObject.type == "renderCollection") {
this.compareRenderCollection(permission2, permissionB, validator2);
}
if (userObject.type == "userGroup") {
this.compareUserGroup(permission2, permissionB, validator2);
}
if (userObject.isUser) {
this.compareUser(permission2, permissionB, validator2);
}
}
return validator2;
}
checkPermission(permission2, permissionB) {
var userObject = permission2.userObject;
var validator2 = new Object();
validator2.isValid = true;
this.validateObjects(userObject, validator2);
this.validateVisitor(permission2, permissionB, validator2);
if (!validator2.isValid) {
return false;
}
validator2.isValid = false;
unify_default.extend(userObject);
this.compareObjects(userObject, permission2, permissionB, validator2);
return validator2.isValid;
}
comparePermission(permissionA2, permissionB) {
if (permissionA2.userObject.id == 0) {
return false;
}
if (permissionA2.userObject.id != permissionB.userObject.id) {
return false;
}
if (permissionA2.type != permissionB.type) {
return false;
}
if (permissionA2.policy != "allow") {
return false;
}
return true;
}
deny(user32, type) {
var currentPermission = new userPermission(user32, type);
this.permissions.push(currentPermission);
}
};
// framework/server/userManager.js
var visitor3 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager2 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor3();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default2 = new userManager2();
// framework/server/table.js
var table2 = class extends table {
static {
__name(this, "table");
}
__className = "table";
permissionManager = new permissionManager();
type = "table";
constructor() {
super();
console_default.setFilename("table.js");
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
}
setCollection(collection35) {
this.collections = [collection35];
}
parseObject(object93, propertyName2) {
if (tools_default.objectIsRenderCollection(object93)) {
this.parseRenderCollection(object93);
} else if (tools_default.objectIsTable(object93)) {
if (propertyName2 != "table") {
this.joinObject(object93);
}
}
}
getProperties(parent, child) {
var entries = Object.entries(parent);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var object93 = tools_default.getObjectByEntry(entry);
var propertyName2 = tools_default.getClassNameByEntry(entry);
this.parseObject(object93, propertyName2);
}
}
joinObject(object93) {
var tableName = tools_default.getClassName(object93);
var parentName = tools_default.getClassName(tools_default.getTableFromObject(object93.parent));
var columnName = object93.propertyName;
}
parseRenderCollection(renderCollection33) {
var collections = renderCollection33.collections;
for (var b32 = 0; b32 < collections.length; b32++) {
var currentCollection = collections[b32];
var join = currentCollection.createJoin(renderCollection33.propertyName);
}
var renderCollectionObject = renderCollection33.getObject();
this.getProperties(renderCollectionObject, renderCollection33);
}
getRow() {
this.getProperties(this.constructor);
var table33 = tools_default.getTableFromObject(this);
var tableName = table33.getClassName();
var query = new querySQL();
query.type = "select";
query.table = tableName;
query.find("id", this.id);
var output = global.database.query(query);
if (output[0]) {
return output[0];
}
}
// For server side, When being instantiated
create() {
if (typeof document_default == "undefined") {
this.createInstance();
}
}
createInstance(inherit_id = true) {
this.signed.value = true;
var new_inser_id = global.database.insertRow(this);
if (inherit_id) {
this.id = new_inser_id;
}
return new_inser_id;
}
get(client2) {
var sqlRow = this.getRow();
if (sqlRow) {
this.serialize(sqlRow);
}
if (client2) {
this.computePermissions(client2);
var user32 = client2.user;
this.permissions = userManager_default2.computePermissions(this, user32);
}
}
delete() {
var table33 = this.table;
var tableName = table33.getClassName();
var query = new querySQL();
query.type = "delete";
query.table = tableName;
query.find("id", this.id);
var output = global.database.query(query);
return output;
}
save() {
if (!this.table) {
this.getCore().tableManager.parse(this);
}
var table33 = this.table;
var tableName = table33.getClassName();
var query = new querySQL();
query.type = "update";
query.table = tableName;
query.debug = this.debug;
query.addObject(this);
var query = global.database.query(query);
}
find(column31, value2) {
var tableName = tools_default.getTableName(this);
var query = new querySQL();
query.type = "select";
query.table = tableName;
query.find(column31, value2);
return global.database.query(query);
}
};
// framework/unify/signed.js
var signed = class {
static {
__name(this, "signed");
}
datatype = datatype_default.TEXT;
value = "false";
enabled = "false";
type = "column";
};
// framework/unify/table.js?disableCache=0568
var table3 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0568
var column = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/news.title.js?disableCache=0568
var title = class extends column {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/news.body.js?disableCache=0568
var body = class extends column {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/news.price.js?disableCache=0568
var price = class extends column {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default2.REAL;
};
// framework/cache/platforms/Windows/Mobile/Light/user/user.username.js?disableCache=0568
var username2 = class extends column {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0568
var tools3 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll2(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default2 = new tools3();
// framework/cache/platforms/Windows/Mobile/Light/elements/input.js?disableCache=0568
var input = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default2.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default2.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default2.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/user.salt.js?disableCache=0568
var salt2 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default2.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Light/user/user.hash.js?disableCache=0568
var hash2 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default2.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Light/user/user.js?disableCache=0568
var user2 = class _user extends table3 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username2();
salt = new salt2();
hash = new hash2();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups();
selectedUsers = new collection5(_user);
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/comment.body.js?disableCache=0568
var body2 = class extends column {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/comment.title.js?disableCache=0568
var title2 = class extends column {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/comment.js?disableCache=0568
var comment2 = class extends table3 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user2();
title = new title2();
body = new body2();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/news.js?disableCache=0568
var news = class extends table3 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title();
body = new body();
price = new price();
comments = new collection5(comment2);
};
// framework/cache/platforms/Windows/Mobile/Light/elements/tableCell.js?disableCache=0568
var tableCell = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0568
var sortBy = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.header.row.column.js?disableCache=0568
var gridViewRowColumn = class extends tableCell {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
paddingRight = 40;
paddingLeft = 20;
sortBy = new sortBy();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/header/news.list.header.body.js?disableCache=0568
var newsListHeaderBody = class extends gridViewRowColumn {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/header/news.list.header.title.js?disableCache=0568
var newsListHeaderTitle = class extends gridViewRowColumn {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/header/news.list.header.price.js?disableCache=0568
var newsListHeaderPrice = class extends gridViewRowColumn {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/header/news.list.header.actions.js?disableCache=0568
var newsListHeaderActions = class extends gridViewRowColumn {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.header.row.js?disableCache=0568
var gridViewTableRow = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/header/news.list.header.js?disableCache=0568
var newsListHeader = class extends extender2(news, gridViewTableRow) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody();
title = new newsListHeaderTitle();
price = new newsListHeaderPrice();
actions = new newsListHeaderActions();
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.header.js?disableCache=0568
var gridViewHeader = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "#ffffffa8";
borderBottom = "1px solid rgb(0 0 0 / 5%)";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/news.list.table.header.js?disableCache=0568
var newsListTableHeader = class extends gridViewHeader {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader();
};
// framework/client/renderCollection.js
var renderCollection = class {
static {
__name(this, "renderCollection");
}
__className = "renderCollection";
methodCache = new Array();
//create() {
// this.fetch();
//}
synced = false;
clearOnSync = true;
clearRenderCollection() {
var collection35 = this.getCollection();
if (collection35) {
collection35.clear();
}
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
child.remove();
}
this.defaultElement.innerHTML = "";
}
async sync() {
await this.fetch();
this.getCore().createDependencyMap();
return true;
}
hasURL() {
var hasUrl = false;
if (this.parent.type != "table") {
hasUrl = true;
}
if (this.parent.type == "renderCollection") {
hasUrl = false;
}
if (this.title && this.title.value == "") {
hasUrl = false;
}
if (!this.title) {
hasUrl = false;
}
return hasUrl;
}
composePath() {
var urlPath = new Array();
urlPath.push(this.propertyName);
if (this.id) {
urlPath.push(this.id);
}
if (this.title) {
if (this.title.value == "") {
urlPath.push(this.propertyName.replaceAll(" ", "_") + ".html");
} else {
urlPath.push(this.title.value.replaceAll(" ", "_") + ".html");
}
} else {
urlPath.push(this.propertyName.replaceAll(" ", "_") + ".html");
}
return urlPath.join("/");
}
async createUrl(pass) {
var hasURL = this.hasURL();
if (hasURL || pass) {
var path2 = this.composePath();
var state2 = new Object();
state2.id = this.id;
state2.applicationPath = this.applicationPath;
var url2 = window.location;
await history.pushState(state2, "Unify", "/" + path2);
}
}
cleanChildren(object93) {
if (this.rows) {
this.rows = new Array();
}
if (object93.getChildren) {
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.rowID) {
console.log("delete", child.propertyName);
delete this[child.propertyName];
}
this.cleanChildren(child);
}
}
}
logRenderCollection() {
if (this.debug || document.debugALL) {
console.log("");
console.log("%c renderCollection::fetch", "background: #a6e22e;", this.getClassName());
console.log(this);
}
}
async fetch(query) {
this.logRenderCollection();
this.rows = new Array();
if (this.core) {
var result = await this.core.socketManager.get("table", "get", this, "fetch");
this.synced = true;
if (this.clearOnSync) {
this.empty();
this.rows = new Array();
}
await this.parseRows(result.rows);
this.getCore().communicateVisibleElements();
}
return true;
}
remapCurrentMethod(object93) {
var className2 = object93.__className;
var methods = this.methodCache[className2];
if (methods) {
const keys2 = Object.keys(methods);
for (var i = 0; i < keys2.length; i++) {
var methodName = keys2[i];
object93[methodName] = this.methodCache[className2][methodName];
}
}
}
remapMethods(object93) {
unify_default.extend(object93, true);
this.remapCurrentMethod(object93);
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.remapMethods(child);
}
}
deleteProperties() {
if (object.elements) {
for (var i = 0; i < object.elements.length; i++) {
delete object.elements[i];
}
}
delete object.element;
delete object.customElement;
delete object.boxElement;
delete object.defaultElement;
delete object.user;
delete object.fileLoader;
}
copyMethods() {
var properties = Object.getOwnPropertyNames(object);
for (var j = 0; j < properties.length; j++) {
var methodName = properties[j];
if (typeof object[methodName] == "function") {
this.methodCache[className][methodName] = object[methodName];
object[methodName] = false;
}
}
var methods = tools_default.getAllFuncs(object);
for (var i = 0; i < methods.length; i++) {
methodName = methods[i];
this.methodCache[className][methodName] = object[methodName];
}
}
removeDOM(object93) {
var className2 = object93.getClassName();
if (!this.methodCache[className2]) {
this.methodCache[className2] = new Array();
}
this.deleteProperties();
this.copyMethods();
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.removeDOM(child);
}
}
async parseRows(rows) {
var promises = new Array();
for (var c31 = 0; c31 < rows.length; c31++) {
var object93 = rows[c31];
object93 = this.addRowSync(object93, false, c31);
this.rows.push(object93);
}
await Promise.all(promises);
return true;
}
serializeRenderCollection(object93) {
if (object93.rows && tools_default.isArray(object93.rows)) {
var rows = object93.rows;
var rows = new Array();
for (var c31 = 0; c31 < rows.length; c31++) {
var object93 = rows[c31];
var object93 = targetObject.addRow(object93, false, c31);
rows.push(object93);
}
}
}
};
// framework/server/renderCollection.js
var renderCollection2 = class extends renderCollection {
static {
__name(this, "renderCollection");
}
__className = "renderCollection";
constructor() {
super();
}
deleteRows() {
}
getStoredRows(customQuery) {
var customQuery = this.createQuery();
customQuery.debug = this.debug;
var storedRows = this.storageCollection.querySelect(customQuery);
return storedRows;
}
addCurrentRow(row181, client2, c31) {
var parsedObject = this.addRow(row181, client2);
parsedObject.rowID = c31;
this.rows.push(parsedObject);
}
addRows(rows, client2, collection35) {
for (var c31 = 0; c31 < rows.length; c31++) {
var row181 = rows[c31];
this.addCurrentRow(row181, client2, c31);
}
}
getFromCollection(collection35, client2) {
collection35.id = this.id;
var customQuery = this.createQuery();
customQuery.debug = this.debug;
var rows = collection35.querySelect(customQuery, this.filterObject, client2);
this.addRows(rows, client2, collection35);
collection35.rows = this.rows;
}
get(client2) {
this.rows = new Array();
var collection35 = this.getCollection();
if (collection35) {
this.getFromCollection(collection35, client2);
} else {
console.log("This renderCollection has no collection.");
}
}
createQuery() {
var query = new querySQL();
var filter = this.filterObject;
unify_default.extend(filter);
return query;
}
createQueryChildCollection(child, query) {
var collectionChildren = child.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var collectionChild = collectionChildren[b32];
if (collectionChild.like) {
query.find(collectionChild.propertyName, collectionChild.like, "LIKE");
}
}
}
findRow(storedRows, id2) {
for (var c31 = 0; c31 < storedRows.length; c31++) {
var storedRow = storedRows[c31];
if (storedRow.id == id2) {
return true;
}
}
return false;
}
};
// framework/unify/sql/searchable.js
var searchable = class {
static {
__name(this, "searchable");
}
constructor(path2) {
this.path = path2;
}
path = false;
operator = false;
findPath(path2, searchable2 = this, searchables = new Array()) {
if (searchable2.operator) {
if (typeof searchable2.a == "object") {
searchable2.a.parent = searchable2;
}
if (typeof searchable2.b == "object") {
searchable2.b.parent = searchable2;
}
var a32 = this.findPath(path2, searchable2.a, searchables);
var b32 = this.findPath(path2, searchable2.b, searchables);
if (a32 || b32) {
return searchables;
}
}
if (searchable2.path) {
var currentPath = searchable2.path;
var parts = currentPath.split("/");
var columnName = parts.pop();
var filterAddress = parts.join("/");
if (filterAddress == path2) {
searchables.push(searchable2);
return searchables;
}
}
return false;
}
getColumnName() {
var currentPath = this.path;
var parts = currentPath.split("/");
return parts.pop();
}
getValue() {
return this.parent.b;
}
getOperator() {
return this.parent.operator;
}
};
// framework/unify/renderCollection.js?disableCache=0568
var renderCollection3 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.body.js?disableCache=0568
var gridViewTableHeader = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "white";
};
// framework/unify/sql/OR.js?disableCache=0568
function OR(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR, "OR");
// framework/unify/sql/LIKE.js?disableCache=0568
function LIKE(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0568
function GREATER_OR_EQUAL(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0568
function SMALLER_OR_EQUAL(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Windows/Mobile/Light/demo/list/news.list.table.body.js?disableCache=0568
var newsListTableBody = class extends extender2(renderCollection3, gridViewTableHeader) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR(OR(LIKE(filter.title, searchTerm), LIKE(filter.comments.body, searchTerm)), LIKE(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default.visitor, "READ");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.body.row.column.js?disableCache=0568
var gridViewBodyColumn = class extends tableCell {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/item/news.list.item.body.js?disableCache=0568
var newsListItemBody = class extends extender2(body, gridViewBodyColumn) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/item/news.list.item.title.js?disableCache=0568
var newsListItemTitle = class extends extender2(title, gridViewBodyColumn) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/item/news.list.item.price.js?disableCache=0568
var newsListItemPrice = class extends extender2(price, gridViewBodyColumn) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0568
var deleteButton = class extends button {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/item/news.list.item.actions.js?disableCache=0568
var newsListItemActions = class extends extender2(gridViewBodyColumn, gridViewBodyColumn) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton();
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.body.row.js?disableCache=0568
var gridViewRow = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/item/news.list.item.js?disableCache=0568
var newsListItem = class extends extender2(news, gridViewRow) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody();
title = new newsListItemTitle();
price = new newsListItemPrice();
actions = new newsListItemActions();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/gridView/gridView.js?disableCache=0568
var gridView = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 30;
borderRadius = 4;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/list/news.list.table.js?disableCache=0568
var newsListTable = class extends gridView {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader();
body = new newsListTableBody(newsListItem, new collection5(news));
};
// framework/cache/platforms/Windows/Mobile/Light/demo/edit/news.edit.title.js?disableCache=0568
var newsEditTitle = class extends extender2(input, title) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Windows/Mobile/Light/elements/textarea.js?disableCache=0568
var textarea = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 12;
padding = 12;
borderWidth = 1;
borderRadius = 6;
borderColor = "#E5E5E5";
borderBottomColor = "#868686";
background = "#F7FAFC";
border = "1px solid #E5E5E5";
focus() {
this.borderBottom = "2px solid #0067C0";
this.background = "white";
}
blur() {
this.background = "#fbfbfb";
this.borderBottom = "2px solid #868686";
}
value = "";
layers = 1;
customElement = document_default2.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/edit/news.edit.body.js?disableCache=0568
var newsPageBody = class extends extender2(body, textarea) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/edit/news.edit.button.js?disableCache=0568
var editButton = class extends button {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/edit/news.edit.price.js?disableCache=0568
var newsPagePrice = class extends extender2(price, input) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/label.js?disableCache=0568
var label = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
fontWeight = "bold";
color = "#282626";
};
// framework/cache/platforms/Windows/Mobile/Light/elements/label/left.js?disableCache=0568
var leftLabel = class extends label {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Windows/Mobile/Light/elements/panel.js?disableCache=0568
var panel = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
borderRadius = 12;
};
// framework/cache/platforms/Windows/Mobile/Light/elements/window/draggable.js?disableCache=0568
var vector22 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay, "delay");
var draggable = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector22(0, 0);
grabPosition = new vector22(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector22(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector22(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/panel/row.js?disableCache=0568
var panelRow = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
marginTop = 20;
background = "#F7FAFC";
borderRadius = 12;
afterLoad() {
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/window/header.js?disableCache=0568
var maximizeButton = class extends icon {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton = class extends icon {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton();
maximizeButton = new maximizeButton();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title3 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl();
title = new title3();
rightControl = new rightControl();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/edit/news.edit.js?disableCache=0568
var newsBodyRow = class extends panelRow {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel("Message");
body = new newsPageBody();
};
var newsTitleRow = class extends panelRow {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel("Title");
title = new newsEditTitle();
};
var newsPriceRow = class extends panelRow {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel("Price");
price = new newsPagePrice();
};
var cancelButton = class extends button {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow = class extends panelRow {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton();
newsEditbutton = new editButton();
background = "none";
};
var newsEdit = class extends extender2(news, panel, draggable) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader("News");
layers = 2;
zIndex = 1e3;
fontFamily = "segoe";
fontFamily = "SegoeUI";
width = 600;
//background = "white";
background = "#fdfdfdbf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow();
newsPriceRow = new newsPriceRow();
newsBodyRow = new newsBodyRow();
newsButtonRow = new newsButtonRow();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
this.allow(user_group_permission_default.visitor, "READ");
this.allow(user_group_permission_default.member, "WRITE");
this.allow(user_group_permission_default.admin, "WRITE");
this.allow(user_group_permission_default.visitor, "WRITE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsDialogButton.js?disableCache=0568
var newsDialogButton = class extends button {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/search.input.js?disableCache=0568
var searchBar = class extends input {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/select.js?disableCache=0568
var select = class extends renderCollection3 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default2.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default.admin, "READ");
this.allow(user_group_permission_default.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default2.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/search.select.js?disableCache=0568
var customSelect = class extends select {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/search.widget.js?disableCache=0568
var searchWidget = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar();
select = new customSelect();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0568
var paginationItem = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsItemPage.pagination.js?disableCache=0568
var pagination = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsItemPage.limit.js?disableCache=0568
var limit = class extends select {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0568
var tableControl = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label("Select page:");
pagination = new pagination();
limitLabel = new label("Select items per page:");
limit = new limit();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsItemPage.js?disableCache=0568
var testbutton = class extends button {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "rgb(255 255 255 / 75%)";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header("News Items");
searchWidget = new searchWidget();
newsListTable = new newsListTable();
tableControl = new tableControl();
createNews = new newsEdit();
testbutton = new testbutton();
newsDialogButton = new newsDialogButton();
};
// framework/cache/platforms/Windows/Mobile/Light/elements/flexbox.js?disableCache=0568
var flexbox = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/page/news.page.title.js?disableCache=0568
var newsPageTitle = class extends extender2(title, flexbox) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
//background = "rgb(255 255 255 / 75%)";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/page/news.page.body.js?disableCache=0568
var newsPageBody2 = class extends extender2(flexbox, body) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/comments.messages.js?disableCache=0568
var commentsMessages = class extends renderCollection3 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR(LIKE(filter.body, this.value), LIKE(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default.visitor, "READ");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.saveButton.js?disableCache=0568
var saveEditButton = class extends button {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.edit.title.js?disableCache=0568
var commentEditTitle = class extends title2 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.edit.body.js?disableCache=0568
var commentEditBody = class extends extender2(body2, flexbox) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default2.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "none";
color = "black";
margin = 16;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.userLabel.js?disableCache=0568
var userLabel = class extends label {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0568
var deleteButton2 = class extends button {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.editButton.js?disableCache=0568
var editButton2 = class extends button {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.information.js?disableCache=0568
var information = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
background = "#4b94d31f";
_deleteButton = new deleteButton2();
_editButton = new editButton2();
_userLabel = new userLabel();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/edit/comment.edit.js?disableCache=0568
var editComment = class extends comment2 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information();
body = new commentEditBody();
title = new commentEditTitle();
saveButton = new saveEditButton();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/create/comment.saveButton.js?disableCache=0568
var saveCommentButton = class extends button {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/create/comment.create.body.js?disableCache=0568
var commentEditBody2 = class extends extender2(body2, textarea) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/comment/create/comment.create.js?disableCache=0568
var createComment = class extends comment2 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody2();
saveButton = new saveCommentButton();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default.member, "WRITE");
this.allow(user_group_permission_default.admin, "WRITE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/page/news.page.backButton.js?disableCache=0568
var backButton = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/page/news.page.edit.button.js?disableCache=0568
var backButton2 = class extends button {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/filler.js?disableCache=0568
var filler = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
color = "black";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/page/search.comments.js?disableCache=0568
var searchBar2 = class extends input {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/page/news.page.js?disableCache=0568
var testDiv = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle();
};
var newsPage = class extends news {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "rgb(255 255 255 / 75%)";
flexDirection = "column";
_backButton = new backButton();
_testDiv = new testDiv();
body = new newsPageBody2();
editButton = new backButton2();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar2();
commentsMessages = new commentsMessages(editComment, this.comments);
createComment = new createComment(this.comments);
filler = new filler();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default.member, "WRITE");
this.allow(user_group_permission_default.admin, "WRITE");
this.allow(user_group_permission_default.visitor, "WRITE");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
this.allow(user_group_permission_default.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/newsPages.js?disableCache=0568
var newsPages = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage();
newsPage = new newsPage();
newsEdit = new newsEdit();
width = 1800;
};
// framework/cache/platforms/Windows/Mobile/Light/elements/preloaders/simpleSpinner.js?disableCache=0568
var line = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0568
var themaSelectorImage = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0568
var selectLabel = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/themeSelector.js?disableCache=0568
var themeSelector = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage();
selectLabel = new selectLabel();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0568
var themeOSSelectorItem = class extends themeSelector {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default2.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0568
var osSelectorList = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem("Windows");
themeMacOS = new themeOSSelectorItem("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default2.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/os.label.js?disableCache=0568
var osLabel = class extends label {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/os.js?disableCache=0568
var os = class extends panelRow {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel("Os");
osSelector = new osSelectorList();
spinner = new preloaderBox();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0568
var themeTintSelector = class extends themeSelector {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default2.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0568
var themeTintSelectors = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector("Light");
themeDark = new themeTintSelector("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default2.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0568
var customLabel = class extends label {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/rows/tint.js?disableCache=0568
var tint = class extends panelRow {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel("Appearance");
themeTintSelectors = new themeTintSelectors();
spinner = new preloaderBox();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/appearance/panel.js?disableCache=0568
var appearancePanel = class extends panel {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os();
tint = new tint();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/pages/settings.js?disableCache=0568
var settings = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "rgb(255 255 255 / 75%)";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header("Appearance");
appearancePanel = new appearancePanel();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0568
var Console2 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default2 = new Console2();
// framework/unify/promiseManager.js?disableCache=0568
var promiseManager2 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0568
var shared2 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object5 = new shared2();
var shared_default2 = object5.get();
// framework/cache/platforms/Windows/Mobile/Light/elements/fileUpload.js?disableCache=0568
var fileUpload = class extends input {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager2();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0568
var delay2 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton = class extends icon {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay2(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay2(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.icon.js?disableCache=0568
var fileIcon = class extends icon {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.upload.js?disableCache=0568
var stream = class extends fileUpload {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.list.js?disableCache=0568
var fileList = class extends panelRow {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0568
var removeIcons = class extends icon {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/page.js?disableCache=0568
var page = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "rgb(255 255 255 / 75%)";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Windows/Mobile/Light/elements/image.js?disableCache=0568
var icon_id2 = 0;
var image = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default2.createElement("img");
useCustomElement = true;
id = icon_id2++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0568
var previewImage = class extends image {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0568
var imagePreviewWindow = class extends draggable {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
background = "rgb(255 255 255 / 75%)";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader();
previewImage = new previewImage();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0568
var fileChooserFileIcon = class extends icon {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/checkbox.js?disableCache=0568
var checkbox = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default2.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/fileChooser/fileChooser.file.js?disableCache=0568
var file = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox();
icon = new fileChooserFileIcon();
label = new label();
};
// framework/cache/platforms/Windows/Mobile/Light/elements/fileChooser/fileChooser.files.js?disableCache=0568
var fileChooserFiles = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0568
var fileChooserSelectButton = class extends button {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/fileChooser/fileChooser.js?disableCache=0568
var fileChooser = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles();
selectButton = new fileChooserSelectButton();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/fileManager/fileManager.js?disableCache=0568
var fileManager = class extends page {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header("Upload");
fileupload = new stream();
filesHeader = new header("Files");
removeIcons = new removeIcons();
fileList = new fileList();
previewWindow = new imagePreviewWindow();
fileChooser = new fileChooser();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.move.js?disableCache=0568
var animationBlock = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow = class extends panelRow {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel("Move");
animationBlock = new animationBlock();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.rotate.js?disableCache=0568
var animationBlock2 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel2 = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row = class extends panelRow {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel2("Rotate");
animationBlock = new animationBlock2();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.color.js?disableCache=0568
var animationBlock3 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel3 = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row2 = class extends panelRow {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel3("Background color");
animationBlock = new animationBlock3();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.skewX.js?disableCache=0568
var animationBlock4 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel4 = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row3 = class extends panelRow {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel4("skewX");
animationBlock = new animationBlock4();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0568
var animationBlock5 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel5 = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row4 = class extends panelRow {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel5("Rotate + Move + Background");
animationBlock = new animationBlock5();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.reverse.js?disableCache=0568
var animationBlock6 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton = class extends button {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton = class extends button {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton = class extends button {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton = class extends button {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton = class extends button {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel6 = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton();
pauseButton = new pauseButton();
stopButton = new stopButton();
forwardButton = new forwardButton();
backwardButton = new backwardButton();
flexDirection = "column";
};
var row5 = class extends panelRow {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel6("Reverse");
buttons = new buttons();
animationBlock = new animationBlock6();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animation.render.js?disableCache=0568
var animationBlock7 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel7 = class extends label {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row6 = class extends panelRow {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel7("RenderLoop");
animationBlock = new animationBlock7();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/animations/animations.js?disableCache=0568
var animations = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "rgb(255 255 255 / 75%)";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow();
rotateAnimation = new row();
backgroundColor = new row2();
skewX = new row3();
rotateMoveColor = new row4();
reverse = new row5();
render = new row6();
};
// framework/cache/platforms/Windows/Mobile/Light/demo/examples/grids.js?disableCache=0568
var label2 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a = class extends input {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b2 = class extends input {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c = class extends input {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d = class extends input {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label2("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a();
b = new b2();
c = new c();
d = new d();
};
var gridB = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label2("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a();
b = new b2();
c = new c();
d = new d();
};
var gridExample = class extends page {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA();
gridB = new gridB();
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/header/user.userList.header.username.js?disableCache=0568
var userListHeaderUsername = class extends gridViewRowColumn {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/header/user.userList.header.actions.js?disableCache=0568
var userListHeaderActions = class extends gridViewRowColumn {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/header/user.userList.header.js?disableCache=0568
var userListHeader = class extends extender2(user2, gridViewTableRow) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername();
actions = new userListHeaderActions();
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/user.userList.table.header.js?disableCache=0568
var userListTableHeader = class extends gridViewHeader {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader();
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/user.userList.table.body.js?disableCache=0568
var userListTableBody = class extends extender2(renderCollection3, gridViewTableHeader) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default.visitor, "READ");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/item/user.userList.item.username.js?disableCache=0568
var userListItemTitle = class extends extender2(username2, gridViewBodyColumn) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0568
var deleteButton3 = class extends button {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/item/user.userList.item.actions.js?disableCache=0568
var userListItemActions = class extends extender2(gridViewBodyColumn, gridViewBodyColumn) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton3();
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/item/user.userList.item.js?disableCache=0568
var userListItem = class extends extender2(user2, gridViewRow) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle();
actions = new userListItemActions();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/user.userList.table.js?disableCache=0568
var userListTable = class extends gridView {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader();
body = new userListTableBody(userListItem, new collection5(user2));
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/search.js?disableCache=0568
var searchBar3 = class extends input {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/userList/user.userList.page.js?disableCache=0568
var editPage = class extends page {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header("Users");
search = new searchBar3();
userTable = new userListTable();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.username.js?disableCache=0568
var editUsername = class extends extender2(username2, input) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.username.row.js?disableCache=0568
var usernameRow = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label("Username");
username = new editUsername();
};
// framework/cache/platforms/Windows/Mobile/Light/elements/empty.js?disableCache=0568
var empty = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/user.edit.button.js?disableCache=0568
var userEditButton = class extends button {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/user.edit.button.row.js?disableCache=0568
var saveButtonRow = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty();
userEditButton = new userEditButton();
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0568
var checkRenderCollection = class extends renderCollection3 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default.admin, "WRITE");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
this.allow(user_group_permission_default.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.checkbox.js?disableCache=0568
var customCheckbox = class extends checkbox {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0568
var customCheckbox2 = class extends user2 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label();
checkbox = new customCheckbox();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.checkbox.row.js?disableCache=0568
var checkboxRow = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label("Select users");
renderCollection = new checkRenderCollection(customCheckbox2, new collection5(user2));
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.select.option.js?disableCache=0568
var customOption = class extends extender2(option, user2) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0568
var customSelect2 = class extends renderCollection3 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default2.createElement("select");
useCustomElement = true;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
permission() {
this.allow(user_group_permission_default.admin, "WRITE");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
this.allow(user_group_permission_default.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.select.row.js?disableCache=0568
var optionRow = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label("Select user");
renderCollection = new customSelect2(customOption, new collection5(user2));
};
// framework/cache/platforms/Windows/Mobile/Light/user/edit/edit.user.js?disableCache=0568
var editUser = class extends extender2(user2, page) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header("Edit user");
usernameRow = new usernameRow();
selectRow = new optionRow();
checkboxRow = new checkboxRow();
showSelectedUser = new customSelect2(customOption, this.selectedUsers);
saveButtonRow = new saveButtonRow();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default.admin, "WRITE");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
this.allow(user_group_permission_default.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/signup/signup.username.js?disableCache=0568
var signUpUsername = class extends extender2(username2, input) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Light/elements/inputPassword.js?disableCache=0568
var inputPassword = class extends input {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/signup/signup.password.js?disableCache=0568
var signupPassword = class extends inputPassword {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Windows/Mobile/Light/user/signup/signup.passwordCheck.js?disableCache=0568
var signupPasswordCheck = class extends inputPassword {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0568
var cookieManager2 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default2 = new cookieManager2();
// framework/cache/platforms/Windows/Mobile/Light/user/signup/signup.button.js?disableCache=0568
var signupButton = class extends button {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/signup/signup.customLabel.js?disableCache=0568
var customLabel2 = class extends label {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Windows/Mobile/Light/user/signup/user.signup.js?disableCache=0568
var signup = class extends extender2(user2, page) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default2.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header("Signup");
// Children
userLabel = new customLabel2("Username");
username = new signUpUsername();
passwordLabel = new customLabel2("Password");
password = new signupPassword();
passwordAgainLabel = new customLabel2("Password again");
passwordAgain = new signupPasswordCheck();
signUpButton = new signupButton();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default.visitor, "PROCESS");
this.allow(user_group_permission_default.member, "PROCESS");
this.allow(user_group_permission_default.admin, "PROCESS");
}
};
// framework/cache/platforms/Windows/Mobile/Light/user/signin/signin.username.js?disableCache=0568
var signinUsername = class extends extender2(username2, input) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Windows/Mobile/Light/user/user.password.js?disableCache=0568
var password = class extends inputPassword {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Windows/Mobile/Light/user/signin/signin.password.js?disableCache=0568
var signinPassword = class extends password {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Windows/Mobile/Light/user/signin/signin.button.js?disableCache=0568
var signinFormButton = class extends button {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0568
var unify2 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default2 = new unify2();
// framework/cache/platforms/Windows/Mobile/Light/user/signin/signin.cancel.button.js?disableCache=0568
var cancelButton2 = class extends button {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Light/user/signin/user.signin.js?disableCache=0568
var tussenObject = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword();
width = "100%";
};
var buttons2 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton2();
signinButton = new signinFormButton();
};
var hint = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin = class extends extender2(user2, page) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default2.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header("Signin");
//userLabel = new label("Username");
username = new signinUsername();
//passwordLabel = new label("Password");
tussenObject = new tussenObject();
buttons = new buttons2();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user2();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user2();
client2.user = visitor62;
client2.user.error = false;
unify_default2.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default.visitor, "PROCESS");
this.allow(user_group_permission_default.member, "PROCESS");
this.allow(user_group_permission_default.admin, "PROCESS");
this.allow(user_group_permission_default.member, "READ");
this.allow(user_group_permission_default.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/rightSide/rightSide.js?disableCache=0235
var rightSide = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages();
signup = new signup();
signin = new signin();
settings = new settings();
fileManager = new fileManager();
animations = new animations();
gridExample = new gridExample();
userListPage = new editPage();
editUser = new editUser();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0235
var documentTool3 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object6 = new documentTool3();
var document_default3 = object6.getDocument();
// framework/unify/math/vector2.js?disableCache=0235
var vector23 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Windows/Mobile/Light/elements/flexbox.js?disableCache=0235
var flexbox2 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Windows/Mobile/Light/elements/window/frostedGlass.js?disableCache=0235
var frostedGlass2 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/windows/lightBlur.png')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Windows/Mobile/Light/elements/window/draggable.js?disableCache=0235
var vector24 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay3(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay3, "delay");
var draggable2 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector24(0, 0);
grabPosition = new vector24(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector24(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay3(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector24(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Mobile/Light/demo/application.js
var application2 = class extends extender(frostedGlass2, flexbox2, draggable2) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton();
leftSide = new leftSide();
rightSide = new rightSide();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "SegoeUI";
//boxBackgroundImage = "url('/assets/images/wallpapers/windows/light/2048.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/windows/light/blur_1024.jpg')";
border = "1px solid rgb(65 84 118 / 32%)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default3.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector23(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0131
function extender3(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender3, "extender");
// framework/unify/extender.js?disableCache=0299
function extender4(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender4, "extender");
// framework/cache/platforms/Windows/Mobile/Dark/elements/button.js?disableCache=0299
var button2 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 12;
padding = "8px 40px";
background = "#323232";
color = "white";
border = "1px solid #3d3a3a";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#323232";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/icon.js?disableCache=0299
var icon_id3 = 0;
var icon2 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id3++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/minimizeButton.js?disableCache=0131
var minimizeButton2 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.js?disableCache=0299
var menuButton2 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
borderRadius = 6;
width = 160;
padding = 10;
marginTop = 2;
marginBottom = 2;
paddingLeft = 30;
activated = false;
propegateEvent = false;
cursor = "pointer";
hightlightBackgroundColor = "#2d2d2d";
hightlightBackgroundColor = "#0c0e165c";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0299
var newsButton2 = class extends menuButton2 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0299
var settingsButton4 = class extends menuButton2 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0299
var collection6 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0299
var datatype_default3 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0299
var documentTool4 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object7 = new documentTool4();
var document_default4 = object7.getDocument();
// framework/cache/platforms/Windows/Mobile/Dark/elements/option.js?disableCache=0299
var option2 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default4.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/group/user.group.js?disableCache=0299
var visitor4 = class extends option2 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member2 = class extends option2 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin3 = class extends option2 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups2 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member2();
admin = new admin3();
visitor = new visitor4();
};
// framework/cache/platforms/Windows/Mobile/Dark/user/group/user.group.permission.js?disableCache=0299
var user_group_permission_default2 = new groups2();
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0299
var signinPageButton2 = class extends menuButton2 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0299
var signinButton2 = class extends menuButton2 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0299
var visitor5 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager3 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor5();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default3 = new userManager3();
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0299
var signoutButton2 = class extends menuButton2 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default3.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default2.member, "PROCESS");
this.allow(user_group_permission_default2.admin, "PROCESS");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0299
var fileMangerButton2 = class extends menuButton2 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0299
var settingsButton5 = class extends menuButton2 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0299
var usersPageButton2 = class extends menuButton2 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default2.member, "PROCESS");
this.allow(user_group_permission_default2.admin, "PROCESS");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0299
var settingsButton6 = class extends menuButton2 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/header.js?disableCache=0299
var header2 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
fontWeight = "bold";
fontSize = 24;
margin = 0;
color = "white";
//background = "#1c1c1c61";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.header.js?disableCache=0299
var menuHeader2 = class extends header2 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/leftSide/leftSide.js?disableCache=0131
var leftSide2 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader2();
paddingLeft = 4;
paddingRight = 4;
background = "#202020cc";
color = "white";
borderRight = "1px solid black";
fontWeight = "500";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton2();
settingsButton = new settingsButton4();
usersButton = new usersPageButton2();
signinButton = new signinPageButton2();
signoutButton = new signoutButton2();
signupButton = new signinButton2();
animationsButton = new settingsButton5();
gridButton = new settingsButton6();
fileManagerButton = new fileMangerButton2();
};
// framework/unify/table.js?disableCache=0299
var table4 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0299
var column2 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/news.title.js?disableCache=0299
var title4 = class extends column2 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/news.body.js?disableCache=0299
var body3 = class extends column2 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/news.price.js?disableCache=0299
var price2 = class extends column2 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default3.REAL;
};
// framework/cache/platforms/Windows/Mobile/Dark/user/user.username.js?disableCache=0299
var username3 = class extends column2 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0299
var tools4 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll3(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default3 = new tools4();
// framework/cache/platforms/Windows/Mobile/Dark/elements/input.js?disableCache=0299
var input2 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default4.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default4.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default4.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/user.salt.js?disableCache=0299
var salt3 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default3.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/user.hash.js?disableCache=0299
var hash3 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default3.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/user.js?disableCache=0299
var user3 = class _user extends table4 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username3();
salt = new salt3();
hash = new hash3();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups2();
selectedUsers = new collection6(_user);
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/comment.body.js?disableCache=0299
var body4 = class extends column2 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/comment.title.js?disableCache=0299
var title5 = class extends column2 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/comment.js?disableCache=0299
var comment3 = class extends table4 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user3();
title = new title5();
body = new body4();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/news.js?disableCache=0299
var news2 = class extends table4 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title4();
body = new body3();
price = new price2();
comments = new collection6(comment3);
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/tableCell.js?disableCache=0299
var tableCell2 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0299
var sortBy2 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0299
var gridViewRowColumn2 = class extends tableCell2 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
paddingRight = 40;
paddingLeft = 20;
paddingLeft = 30;
//borderLeft = "1px solid #24364e7a";
sortBy = new sortBy2();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/header/news.list.header.body.js?disableCache=0299
var newsListHeaderBody2 = class extends gridViewRowColumn2 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/header/news.list.header.title.js?disableCache=0299
var newsListHeaderTitle2 = class extends gridViewRowColumn2 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/header/news.list.header.price.js?disableCache=0299
var newsListHeaderPrice2 = class extends gridViewRowColumn2 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/header/news.list.header.actions.js?disableCache=0299
var newsListHeaderActions2 = class extends gridViewRowColumn2 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default2.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.header.row.js?disableCache=0299
var gridViewTableRow2 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/header/news.list.header.js?disableCache=0299
var newsListHeader2 = class extends extender4(news2, gridViewTableRow2) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody2();
title = new newsListHeaderTitle2();
price = new newsListHeaderPrice2();
actions = new newsListHeaderActions2();
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.header.js?disableCache=0299
var gridViewHeader2 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/news.list.table.header.js?disableCache=0299
var newsListTableHeader2 = class extends gridViewHeader2 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader2();
};
// framework/unify/renderCollection.js?disableCache=0299
var renderCollection4 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.body.js?disableCache=0299
var gridViewTableHeader2 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
};
// framework/unify/sql/OR.js?disableCache=0299
function OR2(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR2, "OR");
// framework/unify/sql/LIKE.js?disableCache=0299
function LIKE2(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE2, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0299
function GREATER_OR_EQUAL2(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL2, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0299
function SMALLER_OR_EQUAL2(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL2, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/news.list.table.body.js?disableCache=0299
var newsListTableBody2 = class extends extender4(renderCollection4, gridViewTableHeader2) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR2(OR2(LIKE2(filter.title, searchTerm), LIKE2(filter.comments.body, searchTerm)), LIKE2(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL2(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL2(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default2.visitor, "READ");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0299
var gridViewBodyColumn2 = class extends tableCell2 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
paddingLeft = 30;
//borderLeft = "1px solid #24364e7a";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/item/news.list.item.body.js?disableCache=0299
var newsListItemBody2 = class extends extender4(body3, gridViewBodyColumn2) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/item/news.list.item.title.js?disableCache=0299
var newsListItemTitle2 = class extends extender4(title4, gridViewBodyColumn2) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/item/news.list.item.price.js?disableCache=0299
var newsListItemPrice2 = class extends extender4(price2, gridViewBodyColumn2) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0299
var deleteButton4 = class extends button2 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default2.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/item/news.list.item.actions.js?disableCache=0299
var newsListItemActions2 = class extends extender4(gridViewBodyColumn2, gridViewBodyColumn2) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton4();
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.body.row.js?disableCache=0299
var gridViewRow2 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/item/news.list.item.js?disableCache=0299
var newsListItem2 = class extends extender4(news2, gridViewRow2) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody2();
title = new newsListItemTitle2();
price = new newsListItemPrice2();
actions = new newsListItemActions2();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default2.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/gridView/gridView.js?disableCache=0299
var gridView2 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 30;
borderRadius = 4;
background = "#202020";
color = "white";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/list/news.list.table.js?disableCache=0299
var newsListTable2 = class extends gridView2 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader2();
body = new newsListTableBody2(newsListItem2, new collection6(news2));
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/edit/news.edit.title.js?disableCache=0299
var newsEditTitle2 = class extends extender4(input2, title4) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/textarea.js?disableCache=0299
var textarea2 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 12;
padding = 12;
borderWidth = 1;
borderRadius = 6;
borderColor = "#E5E5E5";
borderBottomColor = "#868686";
background = "#2D2D2D";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
focus() {
this.borderBottom = "2px solid #4CC2FF";
this.background = "#1F1F1F";
}
blur() {
this.background = "#2D2D2D";
this.borderBottom = "1px solid #9A9A9A";
}
value = "";
layers = 1;
customElement = document_default4.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/edit/news.edit.body.js?disableCache=0299
var newsPageBody3 = class extends extender4(body3, textarea2) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/edit/news.edit.button.js?disableCache=0299
var editButton3 = class extends button2 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/edit/news.edit.price.js?disableCache=0299
var newsPagePrice2 = class extends extender4(price2, input2) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/label.js?disableCache=0299
var label3 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
fontWeight = "bold";
color = "white";
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/label/left.js?disableCache=0299
var leftLabel2 = class extends label3 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/panel.js?disableCache=0299
var panel2 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
borderRadius = 12;
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/window/draggable.js?disableCache=0299
var vector25 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay4(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay4, "delay");
var draggable3 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector25(0, 0);
grabPosition = new vector25(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector25(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay4(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector25(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/panel/row.js?disableCache=0299
var panelRow2 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
marginTop = 20;
background = "#2b2b2b";
background = "#0c0e165c";
borderRadius = 12;
afterLoad() {
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/window/header.js?disableCache=0299
var maximizeButton2 = class extends icon2 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton2 = class extends icon2 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl2 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton2();
maximizeButton = new maximizeButton2();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title6 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl2 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader2 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl2();
title = new title6();
rightControl = new rightControl2();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
color = "white";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/edit/news.edit.js?disableCache=0299
var newsBodyRow2 = class extends panelRow2 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel2("Message");
body = new newsPageBody3();
};
var newsTitleRow2 = class extends panelRow2 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel2("Title");
title = new newsEditTitle2();
};
var newsPriceRow2 = class extends panelRow2 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel2("Price");
price = new newsPagePrice2();
};
var cancelButton3 = class extends button2 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow2 = class extends panelRow2 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton3();
newsEditbutton = new editButton3();
background = "none";
};
var newsEdit2 = class extends extender4(news2, panel2, draggable3) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader2("News");
layers = 2;
zIndex = 1e3;
fontFamily = "segoe";
fontFamily = "SegoeUI";
width = 600;
background = "#202020cc";
border = "1px solid rgb(44 45 46)";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow2();
newsPriceRow = new newsPriceRow2();
newsBodyRow = new newsBodyRow2();
newsButtonRow = new newsButtonRow2();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
this.allow(user_group_permission_default2.visitor, "READ");
this.allow(user_group_permission_default2.member, "WRITE");
this.allow(user_group_permission_default2.admin, "WRITE");
this.allow(user_group_permission_default2.visitor, "WRITE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsDialogButton.js?disableCache=0299
var newsDialogButton2 = class extends button2 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/search.input.js?disableCache=0299
var searchBar4 = class extends input2 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/select.js?disableCache=0299
var select2 = class extends renderCollection4 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default4.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default2.admin, "READ");
this.allow(user_group_permission_default2.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default4.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/search.select.js?disableCache=0299
var customSelect3 = class extends select2 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/search.widget.js?disableCache=0299
var searchWidget2 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar4();
select = new customSelect3();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0299
var paginationItem2 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0299
var pagination2 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem2();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem2();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem2();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsItemPage.limit.js?disableCache=0299
var limit2 = class extends select2 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0299
var tableControl2 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label3("Select page:");
pagination = new pagination2();
limitLabel = new label3("Select items per page:");
limit = new limit2();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsItemPage.js?disableCache=0299
var testbutton2 = class extends button2 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage2 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#202020cc";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header2("News Items");
searchWidget = new searchWidget2();
newsListTable = new newsListTable2();
tableControl = new tableControl2();
createNews = new newsEdit2();
testbutton = new testbutton2();
newsDialogButton = new newsDialogButton2();
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/flexbox.js?disableCache=0299
var flexbox3 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/page/news.page.title.js?disableCache=0299
var newsPageTitle2 = class extends extender4(title4, flexbox3) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
//background = "#202020cc";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/page/news.page.body.js?disableCache=0299
var newsPageBody4 = class extends extender4(flexbox3, body3) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/comments.messages.js?disableCache=0299
var commentsMessages2 = class extends renderCollection4 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR2(LIKE2(filter.body, this.value), LIKE2(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default2.visitor, "READ");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0299
var saveEditButton2 = class extends button2 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0299
var commentEditTitle3 = class extends title5 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0299
var commentEditBody3 = class extends extender4(body4, flexbox3) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default4.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "#202020cc";
borderRadius = 12;
margin = 16;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0299
var userLabel3 = class extends label3 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0299
var deleteButton5 = class extends button2 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.editButton.js?disableCache=0299
var editButton4 = class extends button2 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.information.js?disableCache=0299
var information2 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
//background = "rgb(48 51 56 / 86%)";
_deleteButton = new deleteButton5();
_editButton = new editButton4();
_userLabel = new userLabel3();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/edit/comment.edit.js?disableCache=0299
var editComment2 = class extends comment3 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information2();
body = new commentEditBody3();
title = new commentEditTitle3();
saveButton = new saveEditButton2();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/create/comment.saveButton.js?disableCache=0299
var saveCommentButton2 = class extends button2 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/create/comment.create.body.js?disableCache=0299
var commentEditBody4 = class extends extender4(body4, textarea2) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/comment/create/comment.create.js?disableCache=0299
var createComment2 = class extends comment3 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody4();
saveButton = new saveCommentButton2();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default2.member, "WRITE");
this.allow(user_group_permission_default2.admin, "WRITE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/page/news.page.backButton.js?disableCache=0299
var backButton3 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/page/news.page.edit.button.js?disableCache=0299
var backButton4 = class extends button2 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/filler.js?disableCache=0299
var filler2 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/page/search.comments.js?disableCache=0299
var searchBar5 = class extends input2 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/page/news.page.js?disableCache=0299
var testDiv2 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle2();
};
var newsPage2 = class extends news2 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#202020cc";
flexDirection = "column";
_backButton = new backButton3();
_testDiv = new testDiv2();
body = new newsPageBody4();
editButton = new backButton4();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar5();
commentsMessages = new commentsMessages2(editComment2, this.comments);
createComment = new createComment2(this.comments);
filler = new filler2();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default2.member, "WRITE");
this.allow(user_group_permission_default2.admin, "WRITE");
this.allow(user_group_permission_default2.visitor, "WRITE");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
this.allow(user_group_permission_default2.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/newsPages.js?disableCache=0299
var newsPages2 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage2();
newsPage = new newsPage2();
newsEdit = new newsEdit2();
width = 1800;
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/preloaders/simpleSpinner.js?disableCache=0299
var line2 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask2 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line2();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox2 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask2();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0299
var themaSelectorImage2 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0299
var selectLabel2 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/themeSelector.js?disableCache=0299
var themeSelector2 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage2();
selectLabel = new selectLabel2();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0299
var themeOSSelectorItem2 = class extends themeSelector2 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default3.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0299
var osSelectorList2 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem2("Windows");
themeMacOS = new themeOSSelectorItem2("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default3.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0299
var osLabel2 = class extends label3 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/os.js?disableCache=0299
var os2 = class extends panelRow2 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel2("Os");
osSelector = new osSelectorList2();
spinner = new preloaderBox2();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0299
var themeTintSelector2 = class extends themeSelector2 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default3.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0299
var themeTintSelectors2 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector2("Light");
themeDark = new themeTintSelector2("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default3.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0299
var customLabel3 = class extends label3 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/rows/tint.js?disableCache=0299
var tint2 = class extends panelRow2 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel3("Appearance");
themeTintSelectors = new themeTintSelectors2();
spinner = new preloaderBox2();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/appearance/panel.js?disableCache=0299
var appearancePanel2 = class extends panel2 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os2();
tint = new tint2();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/pages/settings.js?disableCache=0299
var settings2 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#202020cc";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header2("Appearance");
appearancePanel = new appearancePanel2();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0299
var Console3 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default3 = new Console3();
// framework/unify/promiseManager.js?disableCache=0299
var promiseManager3 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0299
var shared3 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object8 = new shared3();
var shared_default3 = object8.get();
// framework/cache/platforms/Windows/Mobile/Dark/elements/fileUpload.js?disableCache=0299
var fileUpload2 = class extends input2 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager3();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0299
var delay5 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton2 = class extends icon2 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay5(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay5(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.icon.js?disableCache=0299
var fileIcon2 = class extends icon2 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton2();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.upload.js?disableCache=0299
var stream2 = class extends fileUpload2 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon2();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.list.js?disableCache=0299
var fileList2 = class extends panelRow2 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon2();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0299
var removeIcons2 = class extends icon2 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/page.js?disableCache=0299
var page2 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#202020cc";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/image.js?disableCache=0299
var icon_id4 = 0;
var image2 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default4.createElement("img");
useCustomElement = true;
id = icon_id4++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0299
var previewImage2 = class extends image2 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0299
var imagePreviewWindow2 = class extends draggable3 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
background = "#202020cc";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader2();
previewImage = new previewImage2();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0299
var fileChooserFileIcon2 = class extends icon2 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/checkbox.js?disableCache=0299
var checkbox2 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default4.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0299
var file2 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox2();
icon = new fileChooserFileIcon2();
label = new label3();
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0299
var fileChooserFiles2 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file2();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0299
var fileChooserSelectButton2 = class extends button2 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/fileChooser/fileChooser.js?disableCache=0299
var fileChooser2 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles2();
selectButton = new fileChooserSelectButton2();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/fileManager/fileManager.js?disableCache=0299
var fileManager2 = class extends page2 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header2("Upload");
fileupload = new stream2();
filesHeader = new header2("Files");
removeIcons = new removeIcons2();
fileList = new fileList2();
previewWindow = new imagePreviewWindow2();
fileChooser = new fileChooser2();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.move.js?disableCache=0299
var animationBlock8 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel8 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow2 = class extends panelRow2 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel8("Move");
animationBlock = new animationBlock8();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.rotate.js?disableCache=0299
var animationBlock9 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel9 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row7 = class extends panelRow2 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel9("Rotate");
animationBlock = new animationBlock9();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.color.js?disableCache=0299
var animationBlock10 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel10 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row8 = class extends panelRow2 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel10("Background color");
animationBlock = new animationBlock10();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.skewX.js?disableCache=0299
var animationBlock11 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel11 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row9 = class extends panelRow2 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel11("skewX");
animationBlock = new animationBlock11();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0299
var animationBlock12 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel12 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row10 = class extends panelRow2 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel12("Rotate + Move + Background");
animationBlock = new animationBlock12();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.reverse.js?disableCache=0299
var animationBlock13 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton2 = class extends button2 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton2 = class extends button2 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton2 = class extends button2 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton2 = class extends button2 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton2 = class extends button2 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel13 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons3 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton2();
pauseButton = new pauseButton2();
stopButton = new stopButton2();
forwardButton = new forwardButton2();
backwardButton = new backwardButton2();
flexDirection = "column";
};
var row11 = class extends panelRow2 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel13("Reverse");
buttons = new buttons3();
animationBlock = new animationBlock13();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animation.render.js?disableCache=0299
var animationBlock14 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel14 = class extends label3 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row12 = class extends panelRow2 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel14("RenderLoop");
animationBlock = new animationBlock14();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/animations/animations.js?disableCache=0299
var animations2 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#202020cc";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow2();
rotateAnimation = new row7();
backgroundColor = new row8();
skewX = new row9();
rotateMoveColor = new row10();
reverse = new row11();
render = new row12();
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/examples/grids.js?disableCache=0299
var label4 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a2 = class extends input2 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b3 = class extends input2 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c2 = class extends input2 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d2 = class extends input2 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA2 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label4("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a2();
b = new b3();
c = new c2();
d = new d2();
};
var gridB2 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label4("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a2();
b = new b3();
c = new c2();
d = new d2();
};
var gridExample2 = class extends page2 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA2();
gridB = new gridB2();
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/header/user.userList.header.username.js?disableCache=0299
var userListHeaderUsername2 = class extends gridViewRowColumn2 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0299
var userListHeaderActions2 = class extends gridViewRowColumn2 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default2.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/header/user.userList.header.js?disableCache=0299
var userListHeader2 = class extends extender4(user3, gridViewTableRow2) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername2();
actions = new userListHeaderActions2();
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/user.userList.table.header.js?disableCache=0299
var userListTableHeader2 = class extends gridViewHeader2 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader2();
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/user.userList.table.body.js?disableCache=0299
var userListTableBody2 = class extends extender4(renderCollection4, gridViewTableHeader2) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE2(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default2.visitor, "READ");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/item/user.userList.item.username.js?disableCache=0299
var userListItemTitle2 = class extends extender4(username3, gridViewBodyColumn2) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0299
var deleteButton6 = class extends button2 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default2.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0299
var userListItemActions2 = class extends extender4(gridViewBodyColumn2, gridViewBodyColumn2) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton6();
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/item/user.userList.item.js?disableCache=0299
var userListItem2 = class extends extender4(user3, gridViewRow2) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle2();
actions = new userListItemActions2();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default2.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/user.userList.table.js?disableCache=0299
var userListTable2 = class extends gridView2 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader2();
body = new userListTableBody2(userListItem2, new collection6(user3));
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/search.js?disableCache=0299
var searchBar6 = class extends input2 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/userList/user.userList.page.js?disableCache=0299
var editPage2 = class extends page2 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header2("Users");
search = new searchBar6();
userTable = new userListTable2();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.username.js?disableCache=0299
var editUsername2 = class extends extender4(username3, input2) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.username.row.js?disableCache=0299
var usernameRow2 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label3("Username");
username = new editUsername2();
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/empty.js?disableCache=0299
var empty2 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/user.edit.button.js?disableCache=0299
var userEditButton2 = class extends button2 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/user.edit.button.row.js?disableCache=0299
var saveButtonRow2 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty2();
userEditButton = new userEditButton2();
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0299
var checkRenderCollection2 = class extends renderCollection4 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default2.admin, "WRITE");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
this.allow(user_group_permission_default2.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.checkbox.js?disableCache=0299
var customCheckbox3 = class extends checkbox2 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0299
var customCheckbox4 = class extends user3 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label3();
checkbox = new customCheckbox3();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0299
var checkboxRow2 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label3("Select users");
renderCollection = new checkRenderCollection2(customCheckbox4, new collection6(user3));
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.select.option.js?disableCache=0299
var customOption2 = class extends extender4(option2, user3) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0299
var customSelect4 = class extends renderCollection4 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default4.createElement("select");
useCustomElement = true;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
permission() {
this.allow(user_group_permission_default2.admin, "WRITE");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
this.allow(user_group_permission_default2.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.select.row.js?disableCache=0299
var optionRow2 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label3("Select user");
renderCollection = new customSelect4(customOption2, new collection6(user3));
};
// framework/cache/platforms/Windows/Mobile/Dark/user/edit/edit.user.js?disableCache=0299
var editUser2 = class extends extender4(user3, page2) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header2("Edit user");
usernameRow = new usernameRow2();
selectRow = new optionRow2();
checkboxRow = new checkboxRow2();
showSelectedUser = new customSelect4(customOption2, this.selectedUsers);
saveButtonRow = new saveButtonRow2();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default2.admin, "WRITE");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
this.allow(user_group_permission_default2.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signup/signup.username.js?disableCache=0299
var signUpUsername2 = class extends extender4(username3, input2) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/inputPassword.js?disableCache=0299
var inputPassword2 = class extends input2 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signup/signup.password.js?disableCache=0299
var signupPassword2 = class extends inputPassword2 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signup/signup.passwordCheck.js?disableCache=0299
var signupPasswordCheck2 = class extends inputPassword2 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0299
var cookieManager3 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default3 = new cookieManager3();
// framework/cache/platforms/Windows/Mobile/Dark/user/signup/signup.button.js?disableCache=0299
var signupButton2 = class extends button2 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signup/signup.customLabel.js?disableCache=0299
var customLabel4 = class extends label3 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signup/user.signup.js?disableCache=0299
var signup2 = class extends extender4(user3, page2) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default4.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header2("Signup");
// Children
userLabel = new customLabel4("Username");
username = new signUpUsername2();
passwordLabel = new customLabel4("Password");
password = new signupPassword2();
passwordAgainLabel = new customLabel4("Password again");
passwordAgain = new signupPasswordCheck2();
signUpButton = new signupButton2();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default2.visitor, "PROCESS");
this.allow(user_group_permission_default2.member, "PROCESS");
this.allow(user_group_permission_default2.admin, "PROCESS");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signin/signin.username.js?disableCache=0299
var signinUsername2 = class extends extender4(username3, input2) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/user.password.js?disableCache=0299
var password2 = class extends inputPassword2 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signin/signin.password.js?disableCache=0299
var signinPassword2 = class extends password2 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signin/signin.button.js?disableCache=0299
var signinFormButton2 = class extends button2 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0299
var unify3 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default3 = new unify3();
// framework/cache/platforms/Windows/Mobile/Dark/user/signin/signin.cancel.button.js?disableCache=0299
var cancelButton4 = class extends button2 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Windows/Mobile/Dark/user/signin/user.signin.js?disableCache=0299
var tussenObject2 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword2();
width = "100%";
};
var buttons4 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton4();
signinButton = new signinFormButton2();
};
var hint2 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin2 = class extends extender4(user3, page2) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint2();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default4.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header2("Signin");
//userLabel = new label("Username");
username = new signinUsername2();
//passwordLabel = new label("Password");
tussenObject = new tussenObject2();
buttons = new buttons4();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user3();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default3.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user3();
client2.user = visitor62;
client2.user.error = false;
unify_default3.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default3.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default2.visitor, "PROCESS");
this.allow(user_group_permission_default2.member, "PROCESS");
this.allow(user_group_permission_default2.admin, "PROCESS");
this.allow(user_group_permission_default2.member, "READ");
this.allow(user_group_permission_default2.admin, "READ");
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/rightSide/rightSide.js?disableCache=0131
var rightSide2 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages2();
signup = new signup2();
signin = new signin2();
settings = new settings2();
fileManager = new fileManager2();
animations = new animations2();
gridExample = new gridExample2();
userListPage = new editPage2();
editUser = new editUser2();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0131
var documentTool5 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object9 = new documentTool5();
var document_default5 = object9.getDocument();
// framework/unify/math/vector2.js?disableCache=0131
var vector26 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/flexbox.js?disableCache=0131
var flexbox4 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/window/frostedGlass.js?disableCache=0131
var frostedGlass4 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.png')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Windows/Mobile/Dark/elements/window/draggable.js?disableCache=0131
var vector27 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay6(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay6, "delay");
var draggable4 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector27(0, 0);
grabPosition = new vector27(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector27(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay6(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector27(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Mobile/Dark/demo/application.js
var application3 = class extends extender3(frostedGlass4, flexbox4, draggable4) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton2();
leftSide = new leftSide2();
rightSide = new rightSide2();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "SegoeUI";
//boxBackgroundImage = "url('/assets/images/wallpapers/windows/light/2048.png')";
//backgroundImage = "url('/assets/images/wallpapers/windows/light/blur_1024.jpg')";
border = "1px solid rgb(65 84 118 / 32%)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default5.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector26(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0400
function extender5(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender5, "extender");
// framework/unify/extender.js?disableCache=0591
function extender6(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender6, "extender");
// framework/cache/platforms/Windows/Tablet/Light/elements/button.js?disableCache=0591
var button3 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 12;
padding = "8px 40px";
background = "#0067C0";
color = "white";
hoverBackgroundColor = "rgb(86 141 189)";
opaqueBackgroundColor = "#0067C0";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/icon.js?disableCache=0591
var icon_id5 = 0;
var icon3 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id5++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(0)";
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/minimizeButton.js?disableCache=0400
var minimizeButton3 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.js?disableCache=0591
var menuButton3 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
borderRadius = 6;
width = 160;
padding = 10;
marginTop = 2;
marginBottom = 2;
paddingLeft = 30;
activated = false;
propegateEvent = false;
cursor = "pointer";
hightlightBackgroundColor = "rgb(141 180 189 / 12%)";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.news.js?disableCache=0591
var newsButton3 = class extends menuButton3 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0591
var settingsButton7 = class extends menuButton3 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0591
var collection7 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0591
var datatype_default4 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0591
var documentTool6 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object10 = new documentTool6();
var document_default6 = object10.getDocument();
// framework/cache/platforms/Windows/Tablet/Light/elements/option.js?disableCache=0591
var option3 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default6.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/group/user.group.js?disableCache=0591
var visitor6 = class extends option3 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member3 = class extends option3 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin5 = class extends option3 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups3 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member3();
admin = new admin5();
visitor = new visitor6();
};
// framework/cache/platforms/Windows/Tablet/Light/user/group/user.group.permission.js?disableCache=0591
var user_group_permission_default3 = new groups3();
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0591
var signinPageButton3 = class extends menuButton3 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0591
var signinButton3 = class extends menuButton3 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0591
var visitor7 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager4 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor7();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default4 = new userManager4();
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0591
var signoutButton3 = class extends menuButton3 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default4.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default3.member, "PROCESS");
this.allow(user_group_permission_default3.admin, "PROCESS");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0591
var fileMangerButton3 = class extends menuButton3 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0591
var settingsButton8 = class extends menuButton3 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.users.js?disableCache=0591
var usersPageButton3 = class extends menuButton3 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default3.member, "PROCESS");
this.allow(user_group_permission_default3.admin, "PROCESS");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0591
var settingsButton9 = class extends menuButton3 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/header.js?disableCache=0591
var header3 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
fontWeight = "bold";
fontSize = 24;
margin = 0;
color = "#282626";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.header.js?disableCache=0591
var menuHeader3 = class extends header3 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/leftSide/leftSide.js?disableCache=0400
var leftSide3 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader3();
paddingLeft = 4;
paddingRight = 4;
background = "rgb(255 255 255 / 75%)";
color = "black";
fontWeight = "200";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton3();
settingsButton = new settingsButton7();
usersButton = new usersPageButton3();
signinButton = new signinPageButton3();
signoutButton = new signoutButton3();
signupButton = new signinButton3();
animationsButton = new settingsButton8();
gridButton = new settingsButton9();
fileManagerButton = new fileMangerButton3();
};
// framework/unify/table.js?disableCache=0591
var table5 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0591
var column3 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/news.title.js?disableCache=0591
var title7 = class extends column3 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/news.body.js?disableCache=0591
var body5 = class extends column3 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/news.price.js?disableCache=0591
var price3 = class extends column3 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default4.REAL;
};
// framework/cache/platforms/Windows/Tablet/Light/user/user.username.js?disableCache=0591
var username4 = class extends column3 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0591
var tools5 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll4(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default4 = new tools5();
// framework/cache/platforms/Windows/Tablet/Light/elements/input.js?disableCache=0591
var input3 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default6.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default6.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default6.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/user.salt.js?disableCache=0591
var salt4 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default4.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Light/user/user.hash.js?disableCache=0591
var hash4 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default4.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Light/user/user.js?disableCache=0591
var user4 = class _user extends table5 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username4();
salt = new salt4();
hash = new hash4();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups3();
selectedUsers = new collection7(_user);
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/comment.body.js?disableCache=0591
var body6 = class extends column3 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/comment.title.js?disableCache=0591
var title8 = class extends column3 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/comment.js?disableCache=0591
var comment4 = class extends table5 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user4();
title = new title8();
body = new body6();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/news.js?disableCache=0591
var news3 = class extends table5 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title7();
body = new body5();
price = new price3();
comments = new collection7(comment4);
};
// framework/cache/platforms/Windows/Tablet/Light/elements/tableCell.js?disableCache=0591
var tableCell3 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0591
var sortBy3 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.header.row.column.js?disableCache=0591
var gridViewRowColumn3 = class extends tableCell3 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
paddingRight = 40;
paddingLeft = 20;
sortBy = new sortBy3();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/header/news.list.header.body.js?disableCache=0591
var newsListHeaderBody3 = class extends gridViewRowColumn3 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/header/news.list.header.title.js?disableCache=0591
var newsListHeaderTitle3 = class extends gridViewRowColumn3 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/header/news.list.header.price.js?disableCache=0591
var newsListHeaderPrice3 = class extends gridViewRowColumn3 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/header/news.list.header.actions.js?disableCache=0591
var newsListHeaderActions3 = class extends gridViewRowColumn3 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default3.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.header.row.js?disableCache=0591
var gridViewTableRow3 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/header/news.list.header.js?disableCache=0591
var newsListHeader3 = class extends extender6(news3, gridViewTableRow3) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody3();
title = new newsListHeaderTitle3();
price = new newsListHeaderPrice3();
actions = new newsListHeaderActions3();
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.header.js?disableCache=0591
var gridViewHeader3 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "#ffffffa8";
borderBottom = "1px solid rgb(0 0 0 / 5%)";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/news.list.table.header.js?disableCache=0591
var newsListTableHeader3 = class extends gridViewHeader3 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader3();
};
// framework/unify/renderCollection.js?disableCache=0591
var renderCollection5 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.body.js?disableCache=0591
var gridViewTableHeader3 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "white";
};
// framework/unify/sql/OR.js?disableCache=0591
function OR3(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR3, "OR");
// framework/unify/sql/LIKE.js?disableCache=0591
function LIKE3(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE3, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0591
function GREATER_OR_EQUAL3(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL3, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0591
function SMALLER_OR_EQUAL3(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL3, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Windows/Tablet/Light/demo/list/news.list.table.body.js?disableCache=0591
var newsListTableBody3 = class extends extender6(renderCollection5, gridViewTableHeader3) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR3(OR3(LIKE3(filter.title, searchTerm), LIKE3(filter.comments.body, searchTerm)), LIKE3(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL3(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL3(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default3.visitor, "READ");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.body.row.column.js?disableCache=0591
var gridViewBodyColumn3 = class extends tableCell3 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/item/news.list.item.body.js?disableCache=0591
var newsListItemBody3 = class extends extender6(body5, gridViewBodyColumn3) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/item/news.list.item.title.js?disableCache=0591
var newsListItemTitle3 = class extends extender6(title7, gridViewBodyColumn3) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/item/news.list.item.price.js?disableCache=0591
var newsListItemPrice3 = class extends extender6(price3, gridViewBodyColumn3) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0591
var deleteButton7 = class extends button3 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default3.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/item/news.list.item.actions.js?disableCache=0591
var newsListItemActions3 = class extends extender6(gridViewBodyColumn3, gridViewBodyColumn3) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton7();
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.body.row.js?disableCache=0591
var gridViewRow3 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/item/news.list.item.js?disableCache=0591
var newsListItem3 = class extends extender6(news3, gridViewRow3) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody3();
title = new newsListItemTitle3();
price = new newsListItemPrice3();
actions = new newsListItemActions3();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default3.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/gridView/gridView.js?disableCache=0591
var gridView3 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 30;
borderRadius = 4;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/list/news.list.table.js?disableCache=0591
var newsListTable3 = class extends gridView3 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader3();
body = new newsListTableBody3(newsListItem3, new collection7(news3));
};
// framework/cache/platforms/Windows/Tablet/Light/demo/edit/news.edit.title.js?disableCache=0591
var newsEditTitle3 = class extends extender6(input3, title7) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Windows/Tablet/Light/elements/textarea.js?disableCache=0591
var textarea3 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 12;
padding = 12;
borderWidth = 1;
borderRadius = 6;
borderColor = "#E5E5E5";
borderBottomColor = "#868686";
background = "#F7FAFC";
border = "1px solid #E5E5E5";
focus() {
this.borderBottom = "2px solid #0067C0";
this.background = "white";
}
blur() {
this.background = "#fbfbfb";
this.borderBottom = "2px solid #868686";
}
value = "";
layers = 1;
customElement = document_default6.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/edit/news.edit.body.js?disableCache=0591
var newsPageBody5 = class extends extender6(body5, textarea3) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/edit/news.edit.button.js?disableCache=0591
var editButton5 = class extends button3 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/edit/news.edit.price.js?disableCache=0591
var newsPagePrice3 = class extends extender6(price3, input3) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/label.js?disableCache=0591
var label5 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
fontWeight = "bold";
color = "#282626";
};
// framework/cache/platforms/Windows/Tablet/Light/elements/label/left.js?disableCache=0591
var leftLabel3 = class extends label5 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Windows/Tablet/Light/elements/panel.js?disableCache=0591
var panel3 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
borderRadius = 12;
};
// framework/cache/platforms/Windows/Tablet/Light/elements/window/draggable.js?disableCache=0591
var vector28 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay7(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay7, "delay");
var draggable5 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector28(0, 0);
grabPosition = new vector28(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector28(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay7(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector28(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/panel/row.js?disableCache=0591
var panelRow3 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
marginTop = 20;
background = "#F7FAFC";
borderRadius = 12;
afterLoad() {
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/window/header.js?disableCache=0591
var maximizeButton3 = class extends icon3 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton3 = class extends icon3 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl3 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton3();
maximizeButton = new maximizeButton3();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title9 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl3 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader3 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl3();
title = new title9();
rightControl = new rightControl3();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/edit/news.edit.js?disableCache=0591
var newsBodyRow3 = class extends panelRow3 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel3("Message");
body = new newsPageBody5();
};
var newsTitleRow3 = class extends panelRow3 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel3("Title");
title = new newsEditTitle3();
};
var newsPriceRow3 = class extends panelRow3 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel3("Price");
price = new newsPagePrice3();
};
var cancelButton5 = class extends button3 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow3 = class extends panelRow3 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton5();
newsEditbutton = new editButton5();
background = "none";
};
var newsEdit3 = class extends extender6(news3, panel3, draggable5) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader3("News");
layers = 2;
zIndex = 1e3;
fontFamily = "segoe";
fontFamily = "SegoeUI";
width = 600;
//background = "white";
background = "#fdfdfdbf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow3();
newsPriceRow = new newsPriceRow3();
newsBodyRow = new newsBodyRow3();
newsButtonRow = new newsButtonRow3();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
this.allow(user_group_permission_default3.visitor, "READ");
this.allow(user_group_permission_default3.member, "WRITE");
this.allow(user_group_permission_default3.admin, "WRITE");
this.allow(user_group_permission_default3.visitor, "WRITE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsDialogButton.js?disableCache=0591
var newsDialogButton3 = class extends button3 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/search.input.js?disableCache=0591
var searchBar7 = class extends input3 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/select.js?disableCache=0591
var select3 = class extends renderCollection5 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default6.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default3.admin, "READ");
this.allow(user_group_permission_default3.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default6.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/search.select.js?disableCache=0591
var customSelect5 = class extends select3 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/search.widget.js?disableCache=0591
var searchWidget3 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar7();
select = new customSelect5();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0591
var paginationItem3 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsItemPage.pagination.js?disableCache=0591
var pagination3 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem3();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem3();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem3();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsItemPage.limit.js?disableCache=0591
var limit3 = class extends select3 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0591
var tableControl3 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label5("Select page:");
pagination = new pagination3();
limitLabel = new label5("Select items per page:");
limit = new limit3();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsItemPage.js?disableCache=0591
var testbutton3 = class extends button3 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage3 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "rgb(255 255 255 / 75%)";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header3("News Items");
searchWidget = new searchWidget3();
newsListTable = new newsListTable3();
tableControl = new tableControl3();
createNews = new newsEdit3();
testbutton = new testbutton3();
newsDialogButton = new newsDialogButton3();
};
// framework/cache/platforms/Windows/Tablet/Light/elements/flexbox.js?disableCache=0591
var flexbox5 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/page/news.page.title.js?disableCache=0591
var newsPageTitle3 = class extends extender6(title7, flexbox5) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
//background = "rgb(255 255 255 / 75%)";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/page/news.page.body.js?disableCache=0591
var newsPageBody6 = class extends extender6(flexbox5, body5) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/comments.messages.js?disableCache=0591
var commentsMessages3 = class extends renderCollection5 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR3(LIKE3(filter.body, this.value), LIKE3(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default3.visitor, "READ");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.saveButton.js?disableCache=0591
var saveEditButton3 = class extends button3 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.edit.title.js?disableCache=0591
var commentEditTitle5 = class extends title8 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.edit.body.js?disableCache=0591
var commentEditBody5 = class extends extender6(body6, flexbox5) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default6.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "none";
color = "black";
margin = 16;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.userLabel.js?disableCache=0591
var userLabel5 = class extends label5 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0591
var deleteButton8 = class extends button3 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.editButton.js?disableCache=0591
var editButton6 = class extends button3 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.information.js?disableCache=0591
var information3 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
background = "#4b94d31f";
_deleteButton = new deleteButton8();
_editButton = new editButton6();
_userLabel = new userLabel5();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/edit/comment.edit.js?disableCache=0591
var editComment3 = class extends comment4 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information3();
body = new commentEditBody5();
title = new commentEditTitle5();
saveButton = new saveEditButton3();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/create/comment.saveButton.js?disableCache=0591
var saveCommentButton3 = class extends button3 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/create/comment.create.body.js?disableCache=0591
var commentEditBody6 = class extends extender6(body6, textarea3) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/comment/create/comment.create.js?disableCache=0591
var createComment3 = class extends comment4 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody6();
saveButton = new saveCommentButton3();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default3.member, "WRITE");
this.allow(user_group_permission_default3.admin, "WRITE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/page/news.page.backButton.js?disableCache=0591
var backButton5 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/page/news.page.edit.button.js?disableCache=0591
var backButton6 = class extends button3 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/filler.js?disableCache=0591
var filler3 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
color = "black";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/page/search.comments.js?disableCache=0591
var searchBar8 = class extends input3 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/page/news.page.js?disableCache=0591
var testDiv3 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle3();
};
var newsPage3 = class extends news3 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "rgb(255 255 255 / 75%)";
flexDirection = "column";
_backButton = new backButton5();
_testDiv = new testDiv3();
body = new newsPageBody6();
editButton = new backButton6();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar8();
commentsMessages = new commentsMessages3(editComment3, this.comments);
createComment = new createComment3(this.comments);
filler = new filler3();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default3.member, "WRITE");
this.allow(user_group_permission_default3.admin, "WRITE");
this.allow(user_group_permission_default3.visitor, "WRITE");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
this.allow(user_group_permission_default3.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/newsPages.js?disableCache=0591
var newsPages3 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage3();
newsPage = new newsPage3();
newsEdit = new newsEdit3();
width = 1800;
};
// framework/cache/platforms/Windows/Tablet/Light/elements/preloaders/simpleSpinner.js?disableCache=0591
var line3 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask3 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line3();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox3 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask3();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0591
var themaSelectorImage3 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0591
var selectLabel3 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/themeSelector.js?disableCache=0591
var themeSelector3 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage3();
selectLabel = new selectLabel3();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0591
var themeOSSelectorItem3 = class extends themeSelector3 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default4.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0591
var osSelectorList3 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem3("Windows");
themeMacOS = new themeOSSelectorItem3("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default4.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/os.label.js?disableCache=0591
var osLabel3 = class extends label5 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/os.js?disableCache=0591
var os3 = class extends panelRow3 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel3("Os");
osSelector = new osSelectorList3();
spinner = new preloaderBox3();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0591
var themeTintSelector3 = class extends themeSelector3 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default4.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0591
var themeTintSelectors3 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector3("Light");
themeDark = new themeTintSelector3("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default4.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0591
var customLabel5 = class extends label5 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/rows/tint.js?disableCache=0591
var tint3 = class extends panelRow3 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel5("Appearance");
themeTintSelectors = new themeTintSelectors3();
spinner = new preloaderBox3();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/appearance/panel.js?disableCache=0591
var appearancePanel3 = class extends panel3 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os3();
tint = new tint3();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/pages/settings.js?disableCache=0591
var settings3 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "rgb(255 255 255 / 75%)";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header3("Appearance");
appearancePanel = new appearancePanel3();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0591
var Console4 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default4 = new Console4();
// framework/unify/promiseManager.js?disableCache=0591
var promiseManager4 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0591
var shared4 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object11 = new shared4();
var shared_default4 = object11.get();
// framework/cache/platforms/Windows/Tablet/Light/elements/fileUpload.js?disableCache=0591
var fileUpload3 = class extends input3 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager4();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0591
var delay8 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton3 = class extends icon3 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay8(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay8(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.icon.js?disableCache=0591
var fileIcon3 = class extends icon3 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton3();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.upload.js?disableCache=0591
var stream3 = class extends fileUpload3 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon3();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.list.js?disableCache=0591
var fileList3 = class extends panelRow3 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon3();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0591
var removeIcons3 = class extends icon3 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/page.js?disableCache=0591
var page3 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "rgb(255 255 255 / 75%)";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Windows/Tablet/Light/elements/image.js?disableCache=0591
var icon_id6 = 0;
var image3 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default6.createElement("img");
useCustomElement = true;
id = icon_id6++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0591
var previewImage3 = class extends image3 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0591
var imagePreviewWindow3 = class extends draggable5 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
background = "rgb(255 255 255 / 75%)";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader3();
previewImage = new previewImage3();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0591
var fileChooserFileIcon3 = class extends icon3 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/checkbox.js?disableCache=0591
var checkbox3 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default6.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/fileChooser/fileChooser.file.js?disableCache=0591
var file3 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox3();
icon = new fileChooserFileIcon3();
label = new label5();
};
// framework/cache/platforms/Windows/Tablet/Light/elements/fileChooser/fileChooser.files.js?disableCache=0591
var fileChooserFiles3 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file3();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0591
var fileChooserSelectButton3 = class extends button3 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/fileChooser/fileChooser.js?disableCache=0591
var fileChooser3 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles3();
selectButton = new fileChooserSelectButton3();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/fileManager/fileManager.js?disableCache=0591
var fileManager3 = class extends page3 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header3("Upload");
fileupload = new stream3();
filesHeader = new header3("Files");
removeIcons = new removeIcons3();
fileList = new fileList3();
previewWindow = new imagePreviewWindow3();
fileChooser = new fileChooser3();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.move.js?disableCache=0591
var animationBlock15 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel15 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow3 = class extends panelRow3 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel15("Move");
animationBlock = new animationBlock15();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.rotate.js?disableCache=0591
var animationBlock16 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel16 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row13 = class extends panelRow3 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel16("Rotate");
animationBlock = new animationBlock16();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.color.js?disableCache=0591
var animationBlock17 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel17 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row14 = class extends panelRow3 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel17("Background color");
animationBlock = new animationBlock17();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.skewX.js?disableCache=0591
var animationBlock18 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel18 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row15 = class extends panelRow3 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel18("skewX");
animationBlock = new animationBlock18();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0591
var animationBlock19 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel19 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row16 = class extends panelRow3 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel19("Rotate + Move + Background");
animationBlock = new animationBlock19();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.reverse.js?disableCache=0591
var animationBlock20 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton3 = class extends button3 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton3 = class extends button3 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton3 = class extends button3 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton3 = class extends button3 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton3 = class extends button3 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel20 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons5 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton3();
pauseButton = new pauseButton3();
stopButton = new stopButton3();
forwardButton = new forwardButton3();
backwardButton = new backwardButton3();
flexDirection = "column";
};
var row17 = class extends panelRow3 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel20("Reverse");
buttons = new buttons5();
animationBlock = new animationBlock20();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animation.render.js?disableCache=0591
var animationBlock21 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel21 = class extends label5 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row18 = class extends panelRow3 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel21("RenderLoop");
animationBlock = new animationBlock21();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/animations/animations.js?disableCache=0591
var animations3 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "rgb(255 255 255 / 75%)";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow3();
rotateAnimation = new row13();
backgroundColor = new row14();
skewX = new row15();
rotateMoveColor = new row16();
reverse = new row17();
render = new row18();
};
// framework/cache/platforms/Windows/Tablet/Light/demo/examples/grids.js?disableCache=0591
var label6 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a3 = class extends input3 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b4 = class extends input3 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c3 = class extends input3 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d3 = class extends input3 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA3 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label6("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a3();
b = new b4();
c = new c3();
d = new d3();
};
var gridB3 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label6("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a3();
b = new b4();
c = new c3();
d = new d3();
};
var gridExample3 = class extends page3 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA3();
gridB = new gridB3();
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/header/user.userList.header.username.js?disableCache=0591
var userListHeaderUsername3 = class extends gridViewRowColumn3 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/header/user.userList.header.actions.js?disableCache=0591
var userListHeaderActions3 = class extends gridViewRowColumn3 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default3.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/header/user.userList.header.js?disableCache=0591
var userListHeader3 = class extends extender6(user4, gridViewTableRow3) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername3();
actions = new userListHeaderActions3();
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/user.userList.table.header.js?disableCache=0591
var userListTableHeader3 = class extends gridViewHeader3 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader3();
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/user.userList.table.body.js?disableCache=0591
var userListTableBody3 = class extends extender6(renderCollection5, gridViewTableHeader3) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE3(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default3.visitor, "READ");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/item/user.userList.item.username.js?disableCache=0591
var userListItemTitle3 = class extends extender6(username4, gridViewBodyColumn3) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0591
var deleteButton9 = class extends button3 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default3.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/item/user.userList.item.actions.js?disableCache=0591
var userListItemActions3 = class extends extender6(gridViewBodyColumn3, gridViewBodyColumn3) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton9();
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/item/user.userList.item.js?disableCache=0591
var userListItem3 = class extends extender6(user4, gridViewRow3) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle3();
actions = new userListItemActions3();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default3.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/user.userList.table.js?disableCache=0591
var userListTable3 = class extends gridView3 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader3();
body = new userListTableBody3(userListItem3, new collection7(user4));
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/search.js?disableCache=0591
var searchBar9 = class extends input3 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/userList/user.userList.page.js?disableCache=0591
var editPage3 = class extends page3 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header3("Users");
search = new searchBar9();
userTable = new userListTable3();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.username.js?disableCache=0591
var editUsername3 = class extends extender6(username4, input3) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.username.row.js?disableCache=0591
var usernameRow3 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label5("Username");
username = new editUsername3();
};
// framework/cache/platforms/Windows/Tablet/Light/elements/empty.js?disableCache=0591
var empty3 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/user.edit.button.js?disableCache=0591
var userEditButton3 = class extends button3 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/user.edit.button.row.js?disableCache=0591
var saveButtonRow3 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty3();
userEditButton = new userEditButton3();
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0591
var checkRenderCollection3 = class extends renderCollection5 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default3.admin, "WRITE");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
this.allow(user_group_permission_default3.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.checkbox.js?disableCache=0591
var customCheckbox5 = class extends checkbox3 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0591
var customCheckbox6 = class extends user4 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label5();
checkbox = new customCheckbox5();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.checkbox.row.js?disableCache=0591
var checkboxRow3 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label5("Select users");
renderCollection = new checkRenderCollection3(customCheckbox6, new collection7(user4));
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.select.option.js?disableCache=0591
var customOption3 = class extends extender6(option3, user4) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0591
var customSelect6 = class extends renderCollection5 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default6.createElement("select");
useCustomElement = true;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
permission() {
this.allow(user_group_permission_default3.admin, "WRITE");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
this.allow(user_group_permission_default3.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.select.row.js?disableCache=0591
var optionRow3 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label5("Select user");
renderCollection = new customSelect6(customOption3, new collection7(user4));
};
// framework/cache/platforms/Windows/Tablet/Light/user/edit/edit.user.js?disableCache=0591
var editUser3 = class extends extender6(user4, page3) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header3("Edit user");
usernameRow = new usernameRow3();
selectRow = new optionRow3();
checkboxRow = new checkboxRow3();
showSelectedUser = new customSelect6(customOption3, this.selectedUsers);
saveButtonRow = new saveButtonRow3();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default3.admin, "WRITE");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
this.allow(user_group_permission_default3.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/signup/signup.username.js?disableCache=0591
var signUpUsername3 = class extends extender6(username4, input3) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Light/elements/inputPassword.js?disableCache=0591
var inputPassword3 = class extends input3 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/signup/signup.password.js?disableCache=0591
var signupPassword3 = class extends inputPassword3 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Windows/Tablet/Light/user/signup/signup.passwordCheck.js?disableCache=0591
var signupPasswordCheck3 = class extends inputPassword3 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0591
var cookieManager4 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default4 = new cookieManager4();
// framework/cache/platforms/Windows/Tablet/Light/user/signup/signup.button.js?disableCache=0591
var signupButton3 = class extends button3 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/signup/signup.customLabel.js?disableCache=0591
var customLabel6 = class extends label5 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Windows/Tablet/Light/user/signup/user.signup.js?disableCache=0591
var signup3 = class extends extender6(user4, page3) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default6.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header3("Signup");
// Children
userLabel = new customLabel6("Username");
username = new signUpUsername3();
passwordLabel = new customLabel6("Password");
password = new signupPassword3();
passwordAgainLabel = new customLabel6("Password again");
passwordAgain = new signupPasswordCheck3();
signUpButton = new signupButton3();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default3.visitor, "PROCESS");
this.allow(user_group_permission_default3.member, "PROCESS");
this.allow(user_group_permission_default3.admin, "PROCESS");
}
};
// framework/cache/platforms/Windows/Tablet/Light/user/signin/signin.username.js?disableCache=0591
var signinUsername3 = class extends extender6(username4, input3) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Windows/Tablet/Light/user/user.password.js?disableCache=0591
var password3 = class extends inputPassword3 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Windows/Tablet/Light/user/signin/signin.password.js?disableCache=0591
var signinPassword3 = class extends password3 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Windows/Tablet/Light/user/signin/signin.button.js?disableCache=0591
var signinFormButton3 = class extends button3 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0591
var unify4 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default4 = new unify4();
// framework/cache/platforms/Windows/Tablet/Light/user/signin/signin.cancel.button.js?disableCache=0591
var cancelButton6 = class extends button3 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Light/user/signin/user.signin.js?disableCache=0591
var tussenObject3 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword3();
width = "100%";
};
var buttons6 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton6();
signinButton = new signinFormButton3();
};
var hint3 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin3 = class extends extender6(user4, page3) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint3();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default6.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header3("Signin");
//userLabel = new label("Username");
username = new signinUsername3();
//passwordLabel = new label("Password");
tussenObject = new tussenObject3();
buttons = new buttons6();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user4();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default4.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user4();
client2.user = visitor62;
client2.user.error = false;
unify_default4.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default4.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default3.visitor, "PROCESS");
this.allow(user_group_permission_default3.member, "PROCESS");
this.allow(user_group_permission_default3.admin, "PROCESS");
this.allow(user_group_permission_default3.member, "READ");
this.allow(user_group_permission_default3.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/rightSide/rightSide.js?disableCache=0400
var rightSide3 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages3();
signup = new signup3();
signin = new signin3();
settings = new settings3();
fileManager = new fileManager3();
animations = new animations3();
gridExample = new gridExample3();
userListPage = new editPage3();
editUser = new editUser3();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0400
var documentTool7 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object12 = new documentTool7();
var document_default7 = object12.getDocument();
// framework/unify/math/vector2.js?disableCache=0400
var vector29 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Windows/Tablet/Light/elements/flexbox.js?disableCache=0400
var flexbox6 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Windows/Tablet/Light/elements/window/frostedGlass.js?disableCache=0400
var frostedGlass6 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/windows/lightBlur.png')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Windows/Tablet/Light/elements/window/draggable.js?disableCache=0400
var vector210 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay9(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay9, "delay");
var draggable6 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector210(0, 0);
grabPosition = new vector210(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector210(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay9(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector210(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Tablet/Light/demo/application.js
var application4 = class extends extender5(frostedGlass6, flexbox6, draggable6) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton3();
leftSide = new leftSide3();
rightSide = new rightSide3();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "SegoeUI";
//boxBackgroundImage = "url('/assets/images/wallpapers/windows/light/2048.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/windows/light/blur_1024.jpg')";
border = "1px solid rgb(65 84 118 / 32%)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default7.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector29(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0879
function extender7(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender7, "extender");
// framework/unify/extender.js?disableCache=0114
function extender8(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender8, "extender");
// framework/cache/platforms/Windows/Tablet/Dark/elements/button.js?disableCache=0114
var button4 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 12;
padding = "8px 40px";
background = "#323232";
color = "white";
border = "1px solid #3d3a3a";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#323232";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/icon.js?disableCache=0114
var icon_id7 = 0;
var icon4 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id7++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/minimizeButton.js?disableCache=0879
var minimizeButton4 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.js?disableCache=0114
var menuButton4 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
borderRadius = 6;
width = 160;
padding = 10;
marginTop = 2;
marginBottom = 2;
paddingLeft = 30;
activated = false;
propegateEvent = false;
cursor = "pointer";
hightlightBackgroundColor = "#2d2d2d";
hightlightBackgroundColor = "#0c0e165c";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0114
var newsButton4 = class extends menuButton4 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0114
var settingsButton10 = class extends menuButton4 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0114
var collection8 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0114
var datatype_default5 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0114
var documentTool8 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object13 = new documentTool8();
var document_default8 = object13.getDocument();
// framework/cache/platforms/Windows/Tablet/Dark/elements/option.js?disableCache=0114
var option4 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default8.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/group/user.group.js?disableCache=0114
var visitor8 = class extends option4 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member4 = class extends option4 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin7 = class extends option4 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups4 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member4();
admin = new admin7();
visitor = new visitor8();
};
// framework/cache/platforms/Windows/Tablet/Dark/user/group/user.group.permission.js?disableCache=0114
var user_group_permission_default4 = new groups4();
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0114
var signinPageButton4 = class extends menuButton4 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0114
var signinButton4 = class extends menuButton4 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0114
var visitor9 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager5 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor9();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default5 = new userManager5();
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0114
var signoutButton4 = class extends menuButton4 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default5.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default4.member, "PROCESS");
this.allow(user_group_permission_default4.admin, "PROCESS");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0114
var fileMangerButton4 = class extends menuButton4 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0114
var settingsButton11 = class extends menuButton4 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0114
var usersPageButton4 = class extends menuButton4 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default4.member, "PROCESS");
this.allow(user_group_permission_default4.admin, "PROCESS");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0114
var settingsButton12 = class extends menuButton4 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/header.js?disableCache=0114
var header4 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
fontWeight = "bold";
fontSize = 24;
margin = 0;
color = "white";
//background = "#1c1c1c61";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.header.js?disableCache=0114
var menuHeader4 = class extends header4 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/leftSide/leftSide.js?disableCache=0879
var leftSide4 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader4();
paddingLeft = 4;
paddingRight = 4;
background = "#202020cc";
color = "white";
borderRight = "1px solid black";
fontWeight = "500";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton4();
settingsButton = new settingsButton10();
usersButton = new usersPageButton4();
signinButton = new signinPageButton4();
signoutButton = new signoutButton4();
signupButton = new signinButton4();
animationsButton = new settingsButton11();
gridButton = new settingsButton12();
fileManagerButton = new fileMangerButton4();
};
// framework/unify/table.js?disableCache=0114
var table6 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0114
var column4 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/news.title.js?disableCache=0114
var title10 = class extends column4 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/news.body.js?disableCache=0114
var body7 = class extends column4 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/news.price.js?disableCache=0114
var price4 = class extends column4 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default5.REAL;
};
// framework/cache/platforms/Windows/Tablet/Dark/user/user.username.js?disableCache=0114
var username5 = class extends column4 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0114
var tools6 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll5(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default5 = new tools6();
// framework/cache/platforms/Windows/Tablet/Dark/elements/input.js?disableCache=0114
var input4 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default8.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default8.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default8.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/user.salt.js?disableCache=0114
var salt5 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default5.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/user.hash.js?disableCache=0114
var hash5 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default5.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/user.js?disableCache=0114
var user5 = class _user extends table6 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username5();
salt = new salt5();
hash = new hash5();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups4();
selectedUsers = new collection8(_user);
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/comment.body.js?disableCache=0114
var body8 = class extends column4 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/comment.title.js?disableCache=0114
var title11 = class extends column4 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/comment.js?disableCache=0114
var comment5 = class extends table6 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user5();
title = new title11();
body = new body8();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/news.js?disableCache=0114
var news4 = class extends table6 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title10();
body = new body7();
price = new price4();
comments = new collection8(comment5);
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/tableCell.js?disableCache=0114
var tableCell4 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0114
var sortBy4 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0114
var gridViewRowColumn4 = class extends tableCell4 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
paddingRight = 40;
paddingLeft = 20;
paddingLeft = 30;
//borderLeft = "1px solid #24364e7a";
sortBy = new sortBy4();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/header/news.list.header.body.js?disableCache=0114
var newsListHeaderBody4 = class extends gridViewRowColumn4 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/header/news.list.header.title.js?disableCache=0114
var newsListHeaderTitle4 = class extends gridViewRowColumn4 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/header/news.list.header.price.js?disableCache=0114
var newsListHeaderPrice4 = class extends gridViewRowColumn4 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/header/news.list.header.actions.js?disableCache=0114
var newsListHeaderActions4 = class extends gridViewRowColumn4 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default4.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.header.row.js?disableCache=0114
var gridViewTableRow4 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/header/news.list.header.js?disableCache=0114
var newsListHeader4 = class extends extender8(news4, gridViewTableRow4) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody4();
title = new newsListHeaderTitle4();
price = new newsListHeaderPrice4();
actions = new newsListHeaderActions4();
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.header.js?disableCache=0114
var gridViewHeader4 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/news.list.table.header.js?disableCache=0114
var newsListTableHeader4 = class extends gridViewHeader4 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader4();
};
// framework/unify/renderCollection.js?disableCache=0114
var renderCollection6 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.body.js?disableCache=0114
var gridViewTableHeader4 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
};
// framework/unify/sql/OR.js?disableCache=0114
function OR4(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR4, "OR");
// framework/unify/sql/LIKE.js?disableCache=0114
function LIKE4(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE4, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0114
function GREATER_OR_EQUAL4(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL4, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0114
function SMALLER_OR_EQUAL4(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL4, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/news.list.table.body.js?disableCache=0114
var newsListTableBody4 = class extends extender8(renderCollection6, gridViewTableHeader4) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR4(OR4(LIKE4(filter.title, searchTerm), LIKE4(filter.comments.body, searchTerm)), LIKE4(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL4(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL4(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default4.visitor, "READ");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0114
var gridViewBodyColumn4 = class extends tableCell4 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
paddingLeft = 30;
//borderLeft = "1px solid #24364e7a";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/item/news.list.item.body.js?disableCache=0114
var newsListItemBody4 = class extends extender8(body7, gridViewBodyColumn4) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/item/news.list.item.title.js?disableCache=0114
var newsListItemTitle4 = class extends extender8(title10, gridViewBodyColumn4) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/item/news.list.item.price.js?disableCache=0114
var newsListItemPrice4 = class extends extender8(price4, gridViewBodyColumn4) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0114
var deleteButton10 = class extends button4 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default4.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/item/news.list.item.actions.js?disableCache=0114
var newsListItemActions4 = class extends extender8(gridViewBodyColumn4, gridViewBodyColumn4) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton10();
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.body.row.js?disableCache=0114
var gridViewRow4 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/item/news.list.item.js?disableCache=0114
var newsListItem4 = class extends extender8(news4, gridViewRow4) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody4();
title = new newsListItemTitle4();
price = new newsListItemPrice4();
actions = new newsListItemActions4();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default4.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/gridView/gridView.js?disableCache=0114
var gridView4 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 30;
borderRadius = 4;
background = "#202020";
color = "white";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/list/news.list.table.js?disableCache=0114
var newsListTable4 = class extends gridView4 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader4();
body = new newsListTableBody4(newsListItem4, new collection8(news4));
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/edit/news.edit.title.js?disableCache=0114
var newsEditTitle4 = class extends extender8(input4, title10) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/textarea.js?disableCache=0114
var textarea4 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 12;
padding = 12;
borderWidth = 1;
borderRadius = 6;
borderColor = "#E5E5E5";
borderBottomColor = "#868686";
background = "#2D2D2D";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
focus() {
this.borderBottom = "2px solid #4CC2FF";
this.background = "#1F1F1F";
}
blur() {
this.background = "#2D2D2D";
this.borderBottom = "1px solid #9A9A9A";
}
value = "";
layers = 1;
customElement = document_default8.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/edit/news.edit.body.js?disableCache=0114
var newsPageBody7 = class extends extender8(body7, textarea4) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/edit/news.edit.button.js?disableCache=0114
var editButton7 = class extends button4 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/edit/news.edit.price.js?disableCache=0114
var newsPagePrice4 = class extends extender8(price4, input4) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/label.js?disableCache=0114
var label7 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
fontWeight = "bold";
color = "white";
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/label/left.js?disableCache=0114
var leftLabel4 = class extends label7 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/panel.js?disableCache=0114
var panel4 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
borderRadius = 12;
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/window/draggable.js?disableCache=0114
var vector211 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay10(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay10, "delay");
var draggable7 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector211(0, 0);
grabPosition = new vector211(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector211(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay10(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector211(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/panel/row.js?disableCache=0114
var panelRow4 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
marginTop = 20;
background = "#2b2b2b";
background = "#0c0e165c";
borderRadius = 12;
afterLoad() {
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/window/header.js?disableCache=0114
var maximizeButton4 = class extends icon4 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton4 = class extends icon4 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl4 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton4();
maximizeButton = new maximizeButton4();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title12 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl4 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader4 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl4();
title = new title12();
rightControl = new rightControl4();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
color = "white";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/edit/news.edit.js?disableCache=0114
var newsBodyRow4 = class extends panelRow4 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel4("Message");
body = new newsPageBody7();
};
var newsTitleRow4 = class extends panelRow4 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel4("Title");
title = new newsEditTitle4();
};
var newsPriceRow4 = class extends panelRow4 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel4("Price");
price = new newsPagePrice4();
};
var cancelButton7 = class extends button4 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow4 = class extends panelRow4 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton7();
newsEditbutton = new editButton7();
background = "none";
};
var newsEdit4 = class extends extender8(news4, panel4, draggable7) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader4("News");
layers = 2;
zIndex = 1e3;
fontFamily = "segoe";
fontFamily = "SegoeUI";
width = 600;
background = "#202020cc";
border = "1px solid rgb(44 45 46)";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow4();
newsPriceRow = new newsPriceRow4();
newsBodyRow = new newsBodyRow4();
newsButtonRow = new newsButtonRow4();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
this.allow(user_group_permission_default4.visitor, "READ");
this.allow(user_group_permission_default4.member, "WRITE");
this.allow(user_group_permission_default4.admin, "WRITE");
this.allow(user_group_permission_default4.visitor, "WRITE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsDialogButton.js?disableCache=0114
var newsDialogButton4 = class extends button4 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/search.input.js?disableCache=0114
var searchBar10 = class extends input4 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/select.js?disableCache=0114
var select4 = class extends renderCollection6 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default8.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default4.admin, "READ");
this.allow(user_group_permission_default4.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default8.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/search.select.js?disableCache=0114
var customSelect7 = class extends select4 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/search.widget.js?disableCache=0114
var searchWidget4 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar10();
select = new customSelect7();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0114
var paginationItem4 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0114
var pagination4 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem4();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem4();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem4();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsItemPage.limit.js?disableCache=0114
var limit4 = class extends select4 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0114
var tableControl4 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label7("Select page:");
pagination = new pagination4();
limitLabel = new label7("Select items per page:");
limit = new limit4();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsItemPage.js?disableCache=0114
var testbutton4 = class extends button4 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage4 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#202020cc";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header4("News Items");
searchWidget = new searchWidget4();
newsListTable = new newsListTable4();
tableControl = new tableControl4();
createNews = new newsEdit4();
testbutton = new testbutton4();
newsDialogButton = new newsDialogButton4();
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/flexbox.js?disableCache=0114
var flexbox7 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/page/news.page.title.js?disableCache=0114
var newsPageTitle4 = class extends extender8(title10, flexbox7) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
//background = "#202020cc";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/page/news.page.body.js?disableCache=0114
var newsPageBody8 = class extends extender8(flexbox7, body7) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/comments.messages.js?disableCache=0114
var commentsMessages4 = class extends renderCollection6 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR4(LIKE4(filter.body, this.value), LIKE4(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default4.visitor, "READ");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0114
var saveEditButton4 = class extends button4 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0114
var commentEditTitle7 = class extends title11 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0114
var commentEditBody7 = class extends extender8(body8, flexbox7) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default8.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "#202020cc";
borderRadius = 12;
margin = 16;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0114
var userLabel7 = class extends label7 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0114
var deleteButton11 = class extends button4 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.editButton.js?disableCache=0114
var editButton8 = class extends button4 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.information.js?disableCache=0114
var information4 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
//background = "rgb(48 51 56 / 86%)";
_deleteButton = new deleteButton11();
_editButton = new editButton8();
_userLabel = new userLabel7();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/edit/comment.edit.js?disableCache=0114
var editComment4 = class extends comment5 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information4();
body = new commentEditBody7();
title = new commentEditTitle7();
saveButton = new saveEditButton4();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/create/comment.saveButton.js?disableCache=0114
var saveCommentButton4 = class extends button4 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/create/comment.create.body.js?disableCache=0114
var commentEditBody8 = class extends extender8(body8, textarea4) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/comment/create/comment.create.js?disableCache=0114
var createComment4 = class extends comment5 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody8();
saveButton = new saveCommentButton4();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default4.member, "WRITE");
this.allow(user_group_permission_default4.admin, "WRITE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/page/news.page.backButton.js?disableCache=0114
var backButton7 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/page/news.page.edit.button.js?disableCache=0114
var backButton8 = class extends button4 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/filler.js?disableCache=0114
var filler4 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/page/search.comments.js?disableCache=0114
var searchBar11 = class extends input4 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/page/news.page.js?disableCache=0114
var testDiv4 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle4();
};
var newsPage4 = class extends news4 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#202020cc";
flexDirection = "column";
_backButton = new backButton7();
_testDiv = new testDiv4();
body = new newsPageBody8();
editButton = new backButton8();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar11();
commentsMessages = new commentsMessages4(editComment4, this.comments);
createComment = new createComment4(this.comments);
filler = new filler4();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default4.member, "WRITE");
this.allow(user_group_permission_default4.admin, "WRITE");
this.allow(user_group_permission_default4.visitor, "WRITE");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
this.allow(user_group_permission_default4.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/newsPages.js?disableCache=0114
var newsPages4 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage4();
newsPage = new newsPage4();
newsEdit = new newsEdit4();
width = 1800;
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/preloaders/simpleSpinner.js?disableCache=0114
var line4 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask4 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line4();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox4 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask4();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0114
var themaSelectorImage4 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0114
var selectLabel4 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/themeSelector.js?disableCache=0114
var themeSelector4 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage4();
selectLabel = new selectLabel4();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0114
var themeOSSelectorItem4 = class extends themeSelector4 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default5.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0114
var osSelectorList4 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem4("Windows");
themeMacOS = new themeOSSelectorItem4("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default5.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0114
var osLabel4 = class extends label7 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/os.js?disableCache=0114
var os4 = class extends panelRow4 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel4("Os");
osSelector = new osSelectorList4();
spinner = new preloaderBox4();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0114
var themeTintSelector4 = class extends themeSelector4 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default5.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0114
var themeTintSelectors4 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector4("Light");
themeDark = new themeTintSelector4("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default5.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0114
var customLabel7 = class extends label7 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/rows/tint.js?disableCache=0114
var tint4 = class extends panelRow4 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel7("Appearance");
themeTintSelectors = new themeTintSelectors4();
spinner = new preloaderBox4();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/appearance/panel.js?disableCache=0114
var appearancePanel4 = class extends panel4 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os4();
tint = new tint4();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/pages/settings.js?disableCache=0114
var settings4 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#202020cc";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header4("Appearance");
appearancePanel = new appearancePanel4();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0114
var Console5 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default5 = new Console5();
// framework/unify/promiseManager.js?disableCache=0114
var promiseManager5 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0114
var shared5 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object14 = new shared5();
var shared_default5 = object14.get();
// framework/cache/platforms/Windows/Tablet/Dark/elements/fileUpload.js?disableCache=0114
var fileUpload4 = class extends input4 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager5();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0114
var delay11 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton4 = class extends icon4 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay11(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay11(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.icon.js?disableCache=0114
var fileIcon4 = class extends icon4 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton4();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.upload.js?disableCache=0114
var stream4 = class extends fileUpload4 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon4();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.list.js?disableCache=0114
var fileList4 = class extends panelRow4 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon4();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0114
var removeIcons4 = class extends icon4 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/page.js?disableCache=0114
var page4 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#202020cc";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/image.js?disableCache=0114
var icon_id8 = 0;
var image4 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default8.createElement("img");
useCustomElement = true;
id = icon_id8++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0114
var previewImage4 = class extends image4 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0114
var imagePreviewWindow4 = class extends draggable7 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
background = "#202020cc";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader4();
previewImage = new previewImage4();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0114
var fileChooserFileIcon4 = class extends icon4 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/checkbox.js?disableCache=0114
var checkbox4 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default8.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0114
var file4 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox4();
icon = new fileChooserFileIcon4();
label = new label7();
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0114
var fileChooserFiles4 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file4();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0114
var fileChooserSelectButton4 = class extends button4 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/fileChooser/fileChooser.js?disableCache=0114
var fileChooser4 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles4();
selectButton = new fileChooserSelectButton4();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/fileManager/fileManager.js?disableCache=0114
var fileManager4 = class extends page4 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header4("Upload");
fileupload = new stream4();
filesHeader = new header4("Files");
removeIcons = new removeIcons4();
fileList = new fileList4();
previewWindow = new imagePreviewWindow4();
fileChooser = new fileChooser4();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.move.js?disableCache=0114
var animationBlock22 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel22 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow4 = class extends panelRow4 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel22("Move");
animationBlock = new animationBlock22();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.rotate.js?disableCache=0114
var animationBlock23 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel23 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row19 = class extends panelRow4 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel23("Rotate");
animationBlock = new animationBlock23();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.color.js?disableCache=0114
var animationBlock24 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel24 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row20 = class extends panelRow4 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel24("Background color");
animationBlock = new animationBlock24();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.skewX.js?disableCache=0114
var animationBlock25 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel25 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row21 = class extends panelRow4 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel25("skewX");
animationBlock = new animationBlock25();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0114
var animationBlock26 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel26 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row22 = class extends panelRow4 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel26("Rotate + Move + Background");
animationBlock = new animationBlock26();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.reverse.js?disableCache=0114
var animationBlock27 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton4 = class extends button4 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton4 = class extends button4 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton4 = class extends button4 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton4 = class extends button4 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton4 = class extends button4 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel27 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons7 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton4();
pauseButton = new pauseButton4();
stopButton = new stopButton4();
forwardButton = new forwardButton4();
backwardButton = new backwardButton4();
flexDirection = "column";
};
var row23 = class extends panelRow4 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel27("Reverse");
buttons = new buttons7();
animationBlock = new animationBlock27();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animation.render.js?disableCache=0114
var animationBlock28 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel28 = class extends label7 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row24 = class extends panelRow4 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel28("RenderLoop");
animationBlock = new animationBlock28();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/animations/animations.js?disableCache=0114
var animations4 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#202020cc";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow4();
rotateAnimation = new row19();
backgroundColor = new row20();
skewX = new row21();
rotateMoveColor = new row22();
reverse = new row23();
render = new row24();
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/examples/grids.js?disableCache=0114
var label8 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a4 = class extends input4 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b5 = class extends input4 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c4 = class extends input4 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d4 = class extends input4 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA4 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label8("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a4();
b = new b5();
c = new c4();
d = new d4();
};
var gridB4 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label8("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a4();
b = new b5();
c = new c4();
d = new d4();
};
var gridExample4 = class extends page4 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA4();
gridB = new gridB4();
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/header/user.userList.header.username.js?disableCache=0114
var userListHeaderUsername4 = class extends gridViewRowColumn4 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0114
var userListHeaderActions4 = class extends gridViewRowColumn4 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default4.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/header/user.userList.header.js?disableCache=0114
var userListHeader4 = class extends extender8(user5, gridViewTableRow4) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername4();
actions = new userListHeaderActions4();
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/user.userList.table.header.js?disableCache=0114
var userListTableHeader4 = class extends gridViewHeader4 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader4();
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/user.userList.table.body.js?disableCache=0114
var userListTableBody4 = class extends extender8(renderCollection6, gridViewTableHeader4) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE4(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default4.visitor, "READ");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/item/user.userList.item.username.js?disableCache=0114
var userListItemTitle4 = class extends extender8(username5, gridViewBodyColumn4) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0114
var deleteButton12 = class extends button4 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default4.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0114
var userListItemActions4 = class extends extender8(gridViewBodyColumn4, gridViewBodyColumn4) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton12();
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/item/user.userList.item.js?disableCache=0114
var userListItem4 = class extends extender8(user5, gridViewRow4) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle4();
actions = new userListItemActions4();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default4.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/user.userList.table.js?disableCache=0114
var userListTable4 = class extends gridView4 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader4();
body = new userListTableBody4(userListItem4, new collection8(user5));
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/search.js?disableCache=0114
var searchBar12 = class extends input4 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/userList/user.userList.page.js?disableCache=0114
var editPage4 = class extends page4 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header4("Users");
search = new searchBar12();
userTable = new userListTable4();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.username.js?disableCache=0114
var editUsername4 = class extends extender8(username5, input4) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.username.row.js?disableCache=0114
var usernameRow4 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label7("Username");
username = new editUsername4();
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/empty.js?disableCache=0114
var empty4 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/user.edit.button.js?disableCache=0114
var userEditButton4 = class extends button4 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/user.edit.button.row.js?disableCache=0114
var saveButtonRow4 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty4();
userEditButton = new userEditButton4();
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0114
var checkRenderCollection4 = class extends renderCollection6 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default4.admin, "WRITE");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
this.allow(user_group_permission_default4.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.checkbox.js?disableCache=0114
var customCheckbox7 = class extends checkbox4 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0114
var customCheckbox8 = class extends user5 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label7();
checkbox = new customCheckbox7();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0114
var checkboxRow4 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label7("Select users");
renderCollection = new checkRenderCollection4(customCheckbox8, new collection8(user5));
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.select.option.js?disableCache=0114
var customOption4 = class extends extender8(option4, user5) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0114
var customSelect8 = class extends renderCollection6 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default8.createElement("select");
useCustomElement = true;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
permission() {
this.allow(user_group_permission_default4.admin, "WRITE");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
this.allow(user_group_permission_default4.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.select.row.js?disableCache=0114
var optionRow4 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label7("Select user");
renderCollection = new customSelect8(customOption4, new collection8(user5));
};
// framework/cache/platforms/Windows/Tablet/Dark/user/edit/edit.user.js?disableCache=0114
var editUser4 = class extends extender8(user5, page4) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header4("Edit user");
usernameRow = new usernameRow4();
selectRow = new optionRow4();
checkboxRow = new checkboxRow4();
showSelectedUser = new customSelect8(customOption4, this.selectedUsers);
saveButtonRow = new saveButtonRow4();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default4.admin, "WRITE");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
this.allow(user_group_permission_default4.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signup/signup.username.js?disableCache=0114
var signUpUsername4 = class extends extender8(username5, input4) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/inputPassword.js?disableCache=0114
var inputPassword4 = class extends input4 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signup/signup.password.js?disableCache=0114
var signupPassword4 = class extends inputPassword4 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signup/signup.passwordCheck.js?disableCache=0114
var signupPasswordCheck4 = class extends inputPassword4 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0114
var cookieManager5 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default5 = new cookieManager5();
// framework/cache/platforms/Windows/Tablet/Dark/user/signup/signup.button.js?disableCache=0114
var signupButton4 = class extends button4 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signup/signup.customLabel.js?disableCache=0114
var customLabel8 = class extends label7 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signup/user.signup.js?disableCache=0114
var signup4 = class extends extender8(user5, page4) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default8.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header4("Signup");
// Children
userLabel = new customLabel8("Username");
username = new signUpUsername4();
passwordLabel = new customLabel8("Password");
password = new signupPassword4();
passwordAgainLabel = new customLabel8("Password again");
passwordAgain = new signupPasswordCheck4();
signUpButton = new signupButton4();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default4.visitor, "PROCESS");
this.allow(user_group_permission_default4.member, "PROCESS");
this.allow(user_group_permission_default4.admin, "PROCESS");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signin/signin.username.js?disableCache=0114
var signinUsername4 = class extends extender8(username5, input4) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/user.password.js?disableCache=0114
var password4 = class extends inputPassword4 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signin/signin.password.js?disableCache=0114
var signinPassword4 = class extends password4 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signin/signin.button.js?disableCache=0114
var signinFormButton4 = class extends button4 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0114
var unify5 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default5 = new unify5();
// framework/cache/platforms/Windows/Tablet/Dark/user/signin/signin.cancel.button.js?disableCache=0114
var cancelButton8 = class extends button4 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Windows/Tablet/Dark/user/signin/user.signin.js?disableCache=0114
var tussenObject4 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword4();
width = "100%";
};
var buttons8 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton8();
signinButton = new signinFormButton4();
};
var hint4 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin4 = class extends extender8(user5, page4) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint4();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default8.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header4("Signin");
//userLabel = new label("Username");
username = new signinUsername4();
//passwordLabel = new label("Password");
tussenObject = new tussenObject4();
buttons = new buttons8();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user5();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default5.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user5();
client2.user = visitor62;
client2.user.error = false;
unify_default5.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default5.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default4.visitor, "PROCESS");
this.allow(user_group_permission_default4.member, "PROCESS");
this.allow(user_group_permission_default4.admin, "PROCESS");
this.allow(user_group_permission_default4.member, "READ");
this.allow(user_group_permission_default4.admin, "READ");
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/rightSide/rightSide.js?disableCache=0879
var rightSide4 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages4();
signup = new signup4();
signin = new signin4();
settings = new settings4();
fileManager = new fileManager4();
animations = new animations4();
gridExample = new gridExample4();
userListPage = new editPage4();
editUser = new editUser4();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0879
var documentTool9 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object15 = new documentTool9();
var document_default9 = object15.getDocument();
// framework/unify/math/vector2.js?disableCache=0879
var vector212 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/flexbox.js?disableCache=0879
var flexbox8 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/window/frostedGlass.js?disableCache=0879
var frostedGlass8 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.png')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Windows/Tablet/Dark/elements/window/draggable.js?disableCache=0879
var vector213 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay12(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay12, "delay");
var draggable8 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector213(0, 0);
grabPosition = new vector213(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector213(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay12(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector213(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Tablet/Dark/demo/application.js
var application5 = class extends extender7(frostedGlass8, flexbox8, draggable8) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton4();
leftSide = new leftSide4();
rightSide = new rightSide4();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "SegoeUI";
//boxBackgroundImage = "url('/assets/images/wallpapers/windows/light/2048.png')";
//backgroundImage = "url('/assets/images/wallpapers/windows/light/blur_1024.jpg')";
border = "1px solid rgb(65 84 118 / 32%)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default9.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector212(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0424
function extender9(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender9, "extender");
// framework/unify/extender.js?disableCache=0823
function extender10(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender10, "extender");
// framework/cache/platforms/Windows/Pc/Light/elements/button.js?disableCache=0823
var button5 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 12;
padding = "8px 40px";
background = "#0067C0";
color = "white";
hoverBackgroundColor = "rgb(86 141 189)";
opaqueBackgroundColor = "#0067C0";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/icon.js?disableCache=0823
var icon_id9 = 0;
var icon5 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id9++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(0)";
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Windows/Pc/Light/demo/minimizeButton.js?disableCache=0424
var minimizeButton5 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.js?disableCache=0823
var menuButton5 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
borderRadius = 6;
width = 160;
padding = 10;
marginTop = 2;
marginBottom = 2;
paddingLeft = 30;
activated = false;
propegateEvent = false;
cursor = "pointer";
hightlightBackgroundColor = "rgb(141 180 189 / 12%)";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.news.js?disableCache=0823
var newsButton5 = class extends menuButton5 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0823
var settingsButton13 = class extends menuButton5 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0823
var collection9 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0823
var datatype_default6 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0823
var documentTool10 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object16 = new documentTool10();
var document_default10 = object16.getDocument();
// framework/cache/platforms/Windows/Pc/Light/elements/option.js?disableCache=0823
var option5 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default10.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Windows/Pc/Light/user/group/user.group.js?disableCache=0823
var visitor10 = class extends option5 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member5 = class extends option5 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin9 = class extends option5 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups5 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member5();
admin = new admin9();
visitor = new visitor10();
};
// framework/cache/platforms/Windows/Pc/Light/user/group/user.group.permission.js?disableCache=0823
var user_group_permission_default5 = new groups5();
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0823
var signinPageButton5 = class extends menuButton5 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0823
var signinButton5 = class extends menuButton5 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0823
var visitor11 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager6 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor11();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default6 = new userManager6();
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0823
var signoutButton5 = class extends menuButton5 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default6.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default5.member, "PROCESS");
this.allow(user_group_permission_default5.admin, "PROCESS");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0823
var fileMangerButton5 = class extends menuButton5 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0823
var settingsButton14 = class extends menuButton5 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.users.js?disableCache=0823
var usersPageButton5 = class extends menuButton5 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default5.member, "PROCESS");
this.allow(user_group_permission_default5.admin, "PROCESS");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0823
var settingsButton15 = class extends menuButton5 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/header.js?disableCache=0823
var header5 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
fontWeight = "bold";
fontSize = 24;
margin = 0;
color = "#282626";
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.header.js?disableCache=0823
var menuHeader5 = class extends header5 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Light/demo/leftSide/leftSide.js?disableCache=0424
var leftSide5 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader5();
paddingLeft = 4;
paddingRight = 4;
background = "rgb(255 255 255 / 75%)";
color = "black";
fontWeight = "200";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton5();
settingsButton = new settingsButton13();
usersButton = new usersPageButton5();
signinButton = new signinPageButton5();
signoutButton = new signoutButton5();
signupButton = new signinButton5();
animationsButton = new settingsButton14();
gridButton = new settingsButton15();
fileManagerButton = new fileMangerButton5();
};
// framework/unify/table.js?disableCache=0823
var table7 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0823
var column5 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/news.title.js?disableCache=0823
var title13 = class extends column5 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/demo/news.body.js?disableCache=0823
var body9 = class extends column5 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/demo/news.price.js?disableCache=0823
var price5 = class extends column5 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default6.REAL;
};
// framework/cache/platforms/Windows/Pc/Light/user/user.username.js?disableCache=0823
var username6 = class extends column5 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0823
var tools7 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll6(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default6 = new tools7();
// framework/cache/platforms/Windows/Pc/Light/elements/input.js?disableCache=0823
var input5 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default10.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default10.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default10.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Windows/Pc/Light/user/user.salt.js?disableCache=0823
var salt6 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default6.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Light/user/user.hash.js?disableCache=0823
var hash6 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default6.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Light/user/user.js?disableCache=0823
var user6 = class _user extends table7 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username6();
salt = new salt6();
hash = new hash6();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups5();
selectedUsers = new collection9(_user);
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/comment.body.js?disableCache=0823
var body10 = class extends column5 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/comment.title.js?disableCache=0823
var title14 = class extends column5 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/comment.js?disableCache=0823
var comment6 = class extends table7 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user6();
title = new title14();
body = new body10();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Pc/Light/demo/news.js?disableCache=0823
var news5 = class extends table7 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title13();
body = new body9();
price = new price5();
comments = new collection9(comment6);
};
// framework/cache/platforms/Windows/Pc/Light/elements/tableCell.js?disableCache=0823
var tableCell5 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0823
var sortBy5 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.header.row.column.js?disableCache=0823
var gridViewRowColumn5 = class extends tableCell5 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
paddingRight = 40;
paddingLeft = 20;
sortBy = new sortBy5();
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/header/news.list.header.body.js?disableCache=0823
var newsListHeaderBody5 = class extends gridViewRowColumn5 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/header/news.list.header.title.js?disableCache=0823
var newsListHeaderTitle5 = class extends gridViewRowColumn5 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/header/news.list.header.price.js?disableCache=0823
var newsListHeaderPrice5 = class extends gridViewRowColumn5 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/header/news.list.header.actions.js?disableCache=0823
var newsListHeaderActions5 = class extends gridViewRowColumn5 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default5.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.header.row.js?disableCache=0823
var gridViewTableRow5 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/header/news.list.header.js?disableCache=0823
var newsListHeader5 = class extends extender10(news5, gridViewTableRow5) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody5();
title = new newsListHeaderTitle5();
price = new newsListHeaderPrice5();
actions = new newsListHeaderActions5();
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.header.js?disableCache=0823
var gridViewHeader5 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "#ffffffa8";
borderBottom = "1px solid rgb(0 0 0 / 5%)";
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/news.list.table.header.js?disableCache=0823
var newsListTableHeader5 = class extends gridViewHeader5 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader5();
};
// framework/unify/renderCollection.js?disableCache=0823
var renderCollection7 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.body.js?disableCache=0823
var gridViewTableHeader5 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "white";
};
// framework/unify/sql/OR.js?disableCache=0823
function OR5(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR5, "OR");
// framework/unify/sql/LIKE.js?disableCache=0823
function LIKE5(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE5, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0823
function GREATER_OR_EQUAL5(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL5, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0823
function SMALLER_OR_EQUAL5(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL5, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Windows/Pc/Light/demo/list/news.list.table.body.js?disableCache=0823
var newsListTableBody5 = class extends extender10(renderCollection7, gridViewTableHeader5) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR5(OR5(LIKE5(filter.title, searchTerm), LIKE5(filter.comments.body, searchTerm)), LIKE5(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL5(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL5(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default5.visitor, "READ");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.body.row.column.js?disableCache=0823
var gridViewBodyColumn5 = class extends tableCell5 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/item/news.list.item.body.js?disableCache=0823
var newsListItemBody5 = class extends extender10(body9, gridViewBodyColumn5) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/item/news.list.item.title.js?disableCache=0823
var newsListItemTitle5 = class extends extender10(title13, gridViewBodyColumn5) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/item/news.list.item.price.js?disableCache=0823
var newsListItemPrice5 = class extends extender10(price5, gridViewBodyColumn5) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0823
var deleteButton13 = class extends button5 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default5.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/item/news.list.item.actions.js?disableCache=0823
var newsListItemActions5 = class extends extender10(gridViewBodyColumn5, gridViewBodyColumn5) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton13();
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.body.row.js?disableCache=0823
var gridViewRow5 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/item/news.list.item.js?disableCache=0823
var newsListItem5 = class extends extender10(news5, gridViewRow5) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody5();
title = new newsListItemTitle5();
price = new newsListItemPrice5();
actions = new newsListItemActions5();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default5.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/gridView/gridView.js?disableCache=0823
var gridView5 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 30;
borderRadius = 4;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Light/demo/list/news.list.table.js?disableCache=0823
var newsListTable5 = class extends gridView5 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader5();
body = new newsListTableBody5(newsListItem5, new collection9(news5));
};
// framework/cache/platforms/Windows/Pc/Light/demo/edit/news.edit.title.js?disableCache=0823
var newsEditTitle5 = class extends extender10(input5, title13) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Windows/Pc/Light/elements/textarea.js?disableCache=0823
var textarea5 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 12;
padding = 12;
borderWidth = 1;
borderRadius = 6;
borderColor = "#E5E5E5";
borderBottomColor = "#868686";
background = "#F7FAFC";
border = "1px solid #E5E5E5";
focus() {
this.borderBottom = "2px solid #0067C0";
this.background = "white";
}
blur() {
this.background = "#fbfbfb";
this.borderBottom = "2px solid #868686";
}
value = "";
layers = 1;
customElement = document_default10.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/edit/news.edit.body.js?disableCache=0823
var newsPageBody9 = class extends extender10(body9, textarea5) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/edit/news.edit.button.js?disableCache=0823
var editButton9 = class extends button5 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/edit/news.edit.price.js?disableCache=0823
var newsPagePrice5 = class extends extender10(price5, input5) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/label.js?disableCache=0823
var label9 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
fontWeight = "bold";
color = "#282626";
};
// framework/cache/platforms/Windows/Pc/Light/elements/label/left.js?disableCache=0823
var leftLabel5 = class extends label9 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Windows/Pc/Light/elements/panel.js?disableCache=0823
var panel5 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
borderRadius = 12;
};
// framework/cache/platforms/Windows/Pc/Light/elements/window/draggable.js?disableCache=0823
var vector214 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay13(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay13, "delay");
var draggable9 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector214(0, 0);
grabPosition = new vector214(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector214(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay13(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector214(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/panel/row.js?disableCache=0823
var panelRow5 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
marginTop = 20;
background = "#F7FAFC";
borderRadius = 12;
afterLoad() {
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/window/header.js?disableCache=0823
var maximizeButton5 = class extends icon5 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton5 = class extends icon5 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl5 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton5();
maximizeButton = new maximizeButton5();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title15 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl5 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader5 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl5();
title = new title15();
rightControl = new rightControl5();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Windows/Pc/Light/demo/edit/news.edit.js?disableCache=0823
var newsBodyRow5 = class extends panelRow5 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel5("Message");
body = new newsPageBody9();
};
var newsTitleRow5 = class extends panelRow5 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel5("Title");
title = new newsEditTitle5();
};
var newsPriceRow5 = class extends panelRow5 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel5("Price");
price = new newsPagePrice5();
};
var cancelButton9 = class extends button5 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow5 = class extends panelRow5 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton9();
newsEditbutton = new editButton9();
background = "none";
};
var newsEdit5 = class extends extender10(news5, panel5, draggable9) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader5("News");
layers = 2;
zIndex = 1e3;
fontFamily = "segoe";
fontFamily = "SegoeUI";
width = 600;
//background = "white";
background = "#fdfdfdbf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow5();
newsPriceRow = new newsPriceRow5();
newsBodyRow = new newsBodyRow5();
newsButtonRow = new newsButtonRow5();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
this.allow(user_group_permission_default5.visitor, "READ");
this.allow(user_group_permission_default5.member, "WRITE");
this.allow(user_group_permission_default5.admin, "WRITE");
this.allow(user_group_permission_default5.visitor, "WRITE");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsDialogButton.js?disableCache=0823
var newsDialogButton5 = class extends button5 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/search.input.js?disableCache=0823
var searchBar13 = class extends input5 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/select.js?disableCache=0823
var select5 = class extends renderCollection7 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default10.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default5.admin, "READ");
this.allow(user_group_permission_default5.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default10.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/search.select.js?disableCache=0823
var customSelect9 = class extends select5 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/search.widget.js?disableCache=0823
var searchWidget5 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar13();
select = new customSelect9();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0823
var paginationItem5 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsItemPage.pagination.js?disableCache=0823
var pagination5 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem5();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem5();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem5();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsItemPage.limit.js?disableCache=0823
var limit5 = class extends select5 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0823
var tableControl5 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label9("Select page:");
pagination = new pagination5();
limitLabel = new label9("Select items per page:");
limit = new limit5();
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsItemPage.js?disableCache=0823
var testbutton5 = class extends button5 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage5 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "rgb(255 255 255 / 75%)";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header5("News Items");
searchWidget = new searchWidget5();
newsListTable = new newsListTable5();
tableControl = new tableControl5();
createNews = new newsEdit5();
testbutton = new testbutton5();
newsDialogButton = new newsDialogButton5();
};
// framework/cache/platforms/Windows/Pc/Light/elements/flexbox.js?disableCache=0823
var flexbox9 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Windows/Pc/Light/demo/page/news.page.title.js?disableCache=0823
var newsPageTitle5 = class extends extender10(title13, flexbox9) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
//background = "rgb(255 255 255 / 75%)";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Windows/Pc/Light/demo/page/news.page.body.js?disableCache=0823
var newsPageBody10 = class extends extender10(flexbox9, body9) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/comments.messages.js?disableCache=0823
var commentsMessages5 = class extends renderCollection7 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR5(LIKE5(filter.body, this.value), LIKE5(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default5.visitor, "READ");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.saveButton.js?disableCache=0823
var saveEditButton5 = class extends button5 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.edit.title.js?disableCache=0823
var commentEditTitle9 = class extends title14 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.edit.body.js?disableCache=0823
var commentEditBody9 = class extends extender10(body10, flexbox9) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default10.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "none";
color = "black";
margin = 16;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.userLabel.js?disableCache=0823
var userLabel9 = class extends label9 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0823
var deleteButton14 = class extends button5 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.editButton.js?disableCache=0823
var editButton10 = class extends button5 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.information.js?disableCache=0823
var information5 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
background = "#4b94d31f";
_deleteButton = new deleteButton14();
_editButton = new editButton10();
_userLabel = new userLabel9();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/edit/comment.edit.js?disableCache=0823
var editComment5 = class extends comment6 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information5();
body = new commentEditBody9();
title = new commentEditTitle9();
saveButton = new saveEditButton5();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/create/comment.saveButton.js?disableCache=0823
var saveCommentButton5 = class extends button5 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/create/comment.create.body.js?disableCache=0823
var commentEditBody10 = class extends extender10(body10, textarea5) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Windows/Pc/Light/demo/comment/create/comment.create.js?disableCache=0823
var createComment5 = class extends comment6 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody10();
saveButton = new saveCommentButton5();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default5.member, "WRITE");
this.allow(user_group_permission_default5.admin, "WRITE");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/page/news.page.backButton.js?disableCache=0823
var backButton9 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/page/news.page.edit.button.js?disableCache=0823
var backButton10 = class extends button5 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/filler.js?disableCache=0823
var filler5 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
color = "black";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Pc/Light/demo/page/search.comments.js?disableCache=0823
var searchBar14 = class extends input5 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/page/news.page.js?disableCache=0823
var testDiv5 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle5();
};
var newsPage5 = class extends news5 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "rgb(255 255 255 / 75%)";
flexDirection = "column";
_backButton = new backButton9();
_testDiv = new testDiv5();
body = new newsPageBody10();
editButton = new backButton10();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar14();
commentsMessages = new commentsMessages5(editComment5, this.comments);
createComment = new createComment5(this.comments);
filler = new filler5();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default5.member, "WRITE");
this.allow(user_group_permission_default5.admin, "WRITE");
this.allow(user_group_permission_default5.visitor, "WRITE");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
this.allow(user_group_permission_default5.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/newsPages.js?disableCache=0823
var newsPages5 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage5();
newsPage = new newsPage5();
newsEdit = new newsEdit5();
width = 1800;
};
// framework/cache/platforms/Windows/Pc/Light/elements/preloaders/simpleSpinner.js?disableCache=0823
var line5 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask5 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line5();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox5 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask5();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0823
var themaSelectorImage5 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0823
var selectLabel5 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/themeSelector.js?disableCache=0823
var themeSelector5 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage5();
selectLabel = new selectLabel5();
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0823
var themeOSSelectorItem5 = class extends themeSelector5 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default6.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0823
var osSelectorList5 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem5("Windows");
themeMacOS = new themeOSSelectorItem5("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default6.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/os.label.js?disableCache=0823
var osLabel5 = class extends label9 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/os.js?disableCache=0823
var os5 = class extends panelRow5 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel5("Os");
osSelector = new osSelectorList5();
spinner = new preloaderBox5();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0823
var themeTintSelector5 = class extends themeSelector5 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default6.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0823
var themeTintSelectors5 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector5("Light");
themeDark = new themeTintSelector5("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default6.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0823
var customLabel9 = class extends label9 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/rows/tint.js?disableCache=0823
var tint5 = class extends panelRow5 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel9("Appearance");
themeTintSelectors = new themeTintSelectors5();
spinner = new preloaderBox5();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/appearance/panel.js?disableCache=0823
var appearancePanel5 = class extends panel5 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os5();
tint = new tint5();
};
// framework/cache/platforms/Windows/Pc/Light/demo/pages/settings.js?disableCache=0823
var settings5 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "rgb(255 255 255 / 75%)";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header5("Appearance");
appearancePanel = new appearancePanel5();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0823
var Console6 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default6 = new Console6();
// framework/unify/promiseManager.js?disableCache=0823
var promiseManager6 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0823
var shared6 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object17 = new shared6();
var shared_default6 = object17.get();
// framework/cache/platforms/Windows/Pc/Light/elements/fileUpload.js?disableCache=0823
var fileUpload5 = class extends input5 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager6();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0823
var delay14 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton5 = class extends icon5 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay14(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay14(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.icon.js?disableCache=0823
var fileIcon5 = class extends icon5 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton5();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.upload.js?disableCache=0823
var stream5 = class extends fileUpload5 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon5();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.list.js?disableCache=0823
var fileList5 = class extends panelRow5 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon5();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0823
var removeIcons5 = class extends icon5 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/page.js?disableCache=0823
var page5 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "rgb(255 255 255 / 75%)";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Windows/Pc/Light/elements/image.js?disableCache=0823
var icon_id10 = 0;
var image5 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default10.createElement("img");
useCustomElement = true;
id = icon_id10++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0823
var previewImage5 = class extends image5 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0823
var imagePreviewWindow5 = class extends draggable9 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
background = "rgb(255 255 255 / 75%)";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader5();
previewImage = new previewImage5();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0823
var fileChooserFileIcon5 = class extends icon5 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/checkbox.js?disableCache=0823
var checkbox5 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default10.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/fileChooser/fileChooser.file.js?disableCache=0823
var file5 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox5();
icon = new fileChooserFileIcon5();
label = new label9();
};
// framework/cache/platforms/Windows/Pc/Light/elements/fileChooser/fileChooser.files.js?disableCache=0823
var fileChooserFiles5 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file5();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0823
var fileChooserSelectButton5 = class extends button5 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/fileChooser/fileChooser.js?disableCache=0823
var fileChooser5 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles5();
selectButton = new fileChooserSelectButton5();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/fileManager/fileManager.js?disableCache=0823
var fileManager5 = class extends page5 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header5("Upload");
fileupload = new stream5();
filesHeader = new header5("Files");
removeIcons = new removeIcons5();
fileList = new fileList5();
previewWindow = new imagePreviewWindow5();
fileChooser = new fileChooser5();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.move.js?disableCache=0823
var animationBlock29 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel29 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow5 = class extends panelRow5 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel29("Move");
animationBlock = new animationBlock29();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.rotate.js?disableCache=0823
var animationBlock30 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel30 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row25 = class extends panelRow5 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel30("Rotate");
animationBlock = new animationBlock30();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.color.js?disableCache=0823
var animationBlock31 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel31 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row26 = class extends panelRow5 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel31("Background color");
animationBlock = new animationBlock31();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.skewX.js?disableCache=0823
var animationBlock32 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel32 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row27 = class extends panelRow5 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel32("skewX");
animationBlock = new animationBlock32();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0823
var animationBlock33 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel33 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row28 = class extends panelRow5 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel33("Rotate + Move + Background");
animationBlock = new animationBlock33();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.reverse.js?disableCache=0823
var animationBlock34 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton5 = class extends button5 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton5 = class extends button5 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton5 = class extends button5 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton5 = class extends button5 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton5 = class extends button5 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel34 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons9 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton5();
pauseButton = new pauseButton5();
stopButton = new stopButton5();
forwardButton = new forwardButton5();
backwardButton = new backwardButton5();
flexDirection = "column";
};
var row29 = class extends panelRow5 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel34("Reverse");
buttons = new buttons9();
animationBlock = new animationBlock34();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animation.render.js?disableCache=0823
var animationBlock35 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel35 = class extends label9 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row30 = class extends panelRow5 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel35("RenderLoop");
animationBlock = new animationBlock35();
};
// framework/cache/platforms/Windows/Pc/Light/demo/animations/animations.js?disableCache=0823
var animations5 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "rgb(255 255 255 / 75%)";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow5();
rotateAnimation = new row25();
backgroundColor = new row26();
skewX = new row27();
rotateMoveColor = new row28();
reverse = new row29();
render = new row30();
};
// framework/cache/platforms/Windows/Pc/Light/demo/examples/grids.js?disableCache=0823
var label10 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a5 = class extends input5 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b6 = class extends input5 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c5 = class extends input5 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d5 = class extends input5 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA5 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label10("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a5();
b = new b6();
c = new c5();
d = new d5();
};
var gridB5 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label10("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a5();
b = new b6();
c = new c5();
d = new d5();
};
var gridExample5 = class extends page5 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA5();
gridB = new gridB5();
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/header/user.userList.header.username.js?disableCache=0823
var userListHeaderUsername5 = class extends gridViewRowColumn5 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/header/user.userList.header.actions.js?disableCache=0823
var userListHeaderActions5 = class extends gridViewRowColumn5 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default5.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/header/user.userList.header.js?disableCache=0823
var userListHeader5 = class extends extender10(user6, gridViewTableRow5) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername5();
actions = new userListHeaderActions5();
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/user.userList.table.header.js?disableCache=0823
var userListTableHeader5 = class extends gridViewHeader5 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader5();
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/user.userList.table.body.js?disableCache=0823
var userListTableBody5 = class extends extender10(renderCollection7, gridViewTableHeader5) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE5(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default5.visitor, "READ");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/item/user.userList.item.username.js?disableCache=0823
var userListItemTitle5 = class extends extender10(username6, gridViewBodyColumn5) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0823
var deleteButton15 = class extends button5 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default5.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/item/user.userList.item.actions.js?disableCache=0823
var userListItemActions5 = class extends extender10(gridViewBodyColumn5, gridViewBodyColumn5) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton15();
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/item/user.userList.item.js?disableCache=0823
var userListItem5 = class extends extender10(user6, gridViewRow5) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle5();
actions = new userListItemActions5();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default5.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/user.userList.table.js?disableCache=0823
var userListTable5 = class extends gridView5 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader5();
body = new userListTableBody5(userListItem5, new collection9(user6));
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/search.js?disableCache=0823
var searchBar15 = class extends input5 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Pc/Light/user/userList/user.userList.page.js?disableCache=0823
var editPage5 = class extends page5 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header5("Users");
search = new searchBar15();
userTable = new userListTable5();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.username.js?disableCache=0823
var editUsername5 = class extends extender10(username6, input5) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.username.row.js?disableCache=0823
var usernameRow5 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label9("Username");
username = new editUsername5();
};
// framework/cache/platforms/Windows/Pc/Light/elements/empty.js?disableCache=0823
var empty5 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/user.edit.button.js?disableCache=0823
var userEditButton5 = class extends button5 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/user.edit.button.row.js?disableCache=0823
var saveButtonRow5 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty5();
userEditButton = new userEditButton5();
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0823
var checkRenderCollection5 = class extends renderCollection7 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default5.admin, "WRITE");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
this.allow(user_group_permission_default5.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.checkbox.js?disableCache=0823
var customCheckbox9 = class extends checkbox5 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0823
var customCheckbox10 = class extends user6 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label9();
checkbox = new customCheckbox9();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.checkbox.row.js?disableCache=0823
var checkboxRow5 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label9("Select users");
renderCollection = new checkRenderCollection5(customCheckbox10, new collection9(user6));
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.select.option.js?disableCache=0823
var customOption5 = class extends extender10(option5, user6) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0823
var customSelect10 = class extends renderCollection7 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default10.createElement("select");
useCustomElement = true;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#F7FAFC";
border = "1px solid #E5E5E5";
opaqueBackgroundColor = "#F7FAFC";
focusBackgroundColor = "white";
focusBorderBottom = "2px solid #4CC2FF";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
permission() {
this.allow(user_group_permission_default5.admin, "WRITE");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
this.allow(user_group_permission_default5.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.select.row.js?disableCache=0823
var optionRow5 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label9("Select user");
renderCollection = new customSelect10(customOption5, new collection9(user6));
};
// framework/cache/platforms/Windows/Pc/Light/user/edit/edit.user.js?disableCache=0823
var editUser5 = class extends extender10(user6, page5) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header5("Edit user");
usernameRow = new usernameRow5();
selectRow = new optionRow5();
checkboxRow = new checkboxRow5();
showSelectedUser = new customSelect10(customOption5, this.selectedUsers);
saveButtonRow = new saveButtonRow5();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default5.admin, "WRITE");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
this.allow(user_group_permission_default5.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/signup/signup.username.js?disableCache=0823
var signUpUsername5 = class extends extender10(username6, input5) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Light/elements/inputPassword.js?disableCache=0823
var inputPassword5 = class extends input5 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Pc/Light/user/signup/signup.password.js?disableCache=0823
var signupPassword5 = class extends inputPassword5 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Windows/Pc/Light/user/signup/signup.passwordCheck.js?disableCache=0823
var signupPasswordCheck5 = class extends inputPassword5 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0823
var cookieManager6 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default6 = new cookieManager6();
// framework/cache/platforms/Windows/Pc/Light/user/signup/signup.button.js?disableCache=0823
var signupButton5 = class extends button5 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Windows/Pc/Light/user/signup/signup.customLabel.js?disableCache=0823
var customLabel10 = class extends label9 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Windows/Pc/Light/user/signup/user.signup.js?disableCache=0823
var signup5 = class extends extender10(user6, page5) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default10.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header5("Signup");
// Children
userLabel = new customLabel10("Username");
username = new signUpUsername5();
passwordLabel = new customLabel10("Password");
password = new signupPassword5();
passwordAgainLabel = new customLabel10("Password again");
passwordAgain = new signupPasswordCheck5();
signUpButton = new signupButton5();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default5.visitor, "PROCESS");
this.allow(user_group_permission_default5.member, "PROCESS");
this.allow(user_group_permission_default5.admin, "PROCESS");
}
};
// framework/cache/platforms/Windows/Pc/Light/user/signin/signin.username.js?disableCache=0823
var signinUsername5 = class extends extender10(username6, input5) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Windows/Pc/Light/user/user.password.js?disableCache=0823
var password5 = class extends inputPassword5 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Windows/Pc/Light/user/signin/signin.password.js?disableCache=0823
var signinPassword5 = class extends password5 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Windows/Pc/Light/user/signin/signin.button.js?disableCache=0823
var signinFormButton5 = class extends button5 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0823
var unify6 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default6 = new unify6();
// framework/cache/platforms/Windows/Pc/Light/user/signin/signin.cancel.button.js?disableCache=0823
var cancelButton10 = class extends button5 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Light/user/signin/user.signin.js?disableCache=0823
var tussenObject5 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword5();
width = "100%";
};
var buttons10 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton10();
signinButton = new signinFormButton5();
};
var hint5 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin5 = class extends extender10(user6, page5) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint5();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default10.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header5("Signin");
//userLabel = new label("Username");
username = new signinUsername5();
//passwordLabel = new label("Password");
tussenObject = new tussenObject5();
buttons = new buttons10();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user6();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default6.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user6();
client2.user = visitor62;
client2.user.error = false;
unify_default6.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default6.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default5.visitor, "PROCESS");
this.allow(user_group_permission_default5.member, "PROCESS");
this.allow(user_group_permission_default5.admin, "PROCESS");
this.allow(user_group_permission_default5.member, "READ");
this.allow(user_group_permission_default5.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/rightSide/rightSide.js?disableCache=0424
var rightSide5 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages5();
signup = new signup5();
signin = new signin5();
settings = new settings5();
fileManager = new fileManager5();
animations = new animations5();
gridExample = new gridExample5();
userListPage = new editPage5();
editUser = new editUser5();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0424
var documentTool11 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object18 = new documentTool11();
var document_default11 = object18.getDocument();
// framework/unify/math/vector2.js?disableCache=0424
var vector215 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Windows/Pc/Light/elements/flexbox.js?disableCache=0424
var flexbox10 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Windows/Pc/Light/elements/window/frostedGlass.js?disableCache=0424
var frostedGlass10 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/windows/lightBlur.png')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Windows/Pc/Light/elements/window/draggable.js?disableCache=0424
var vector216 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay15(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay15, "delay");
var draggable10 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector216(0, 0);
grabPosition = new vector216(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector216(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay15(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector216(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Pc/Light/demo/application.js
var application6 = class extends extender9(frostedGlass10, flexbox10, draggable10) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton5();
leftSide = new leftSide5();
rightSide = new rightSide5();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "SegoeUI";
//boxBackgroundImage = "url('/assets/images/wallpapers/windows/light/2048.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/windows/light/blur_1024.jpg')";
border = "1px solid rgb(65 84 118 / 32%)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default11.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector215(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0616
function extender11(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender11, "extender");
// framework/unify/extender.js?disableCache=0995
function extender12(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender12, "extender");
// framework/cache/platforms/Windows/Pc/Dark/elements/button.js?disableCache=0995
var button6 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 12;
padding = "8px 40px";
background = "#323232";
color = "white";
border = "1px solid #3d3a3a";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#323232";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/icon.js?disableCache=0995
var icon_id11 = 0;
var icon6 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id11++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/minimizeButton.js?disableCache=0616
var minimizeButton6 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.js?disableCache=0995
var menuButton6 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
borderRadius = 6;
width = 160;
padding = 10;
marginTop = 2;
marginBottom = 2;
paddingLeft = 30;
activated = false;
propegateEvent = false;
cursor = "pointer";
hightlightBackgroundColor = "#2d2d2d";
hightlightBackgroundColor = "#0c0e165c";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0995
var newsButton6 = class extends menuButton6 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0995
var settingsButton16 = class extends menuButton6 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0995
var collection10 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0995
var datatype_default7 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0995
var documentTool12 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object19 = new documentTool12();
var document_default12 = object19.getDocument();
// framework/cache/platforms/Windows/Pc/Dark/elements/option.js?disableCache=0995
var option6 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default12.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/group/user.group.js?disableCache=0995
var visitor12 = class extends option6 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member6 = class extends option6 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin11 = class extends option6 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups6 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member6();
admin = new admin11();
visitor = new visitor12();
};
// framework/cache/platforms/Windows/Pc/Dark/user/group/user.group.permission.js?disableCache=0995
var user_group_permission_default6 = new groups6();
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0995
var signinPageButton6 = class extends menuButton6 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0995
var signinButton6 = class extends menuButton6 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0995
var visitor13 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager7 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor13();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default7 = new userManager7();
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0995
var signoutButton6 = class extends menuButton6 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default7.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default6.member, "PROCESS");
this.allow(user_group_permission_default6.admin, "PROCESS");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0995
var fileMangerButton6 = class extends menuButton6 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0995
var settingsButton17 = class extends menuButton6 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0995
var usersPageButton6 = class extends menuButton6 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default6.member, "PROCESS");
this.allow(user_group_permission_default6.admin, "PROCESS");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0995
var settingsButton18 = class extends menuButton6 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/header.js?disableCache=0995
var header6 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
fontWeight = "bold";
fontSize = 24;
margin = 0;
color = "white";
//background = "#1c1c1c61";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.header.js?disableCache=0995
var menuHeader6 = class extends header6 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/leftSide/leftSide.js?disableCache=0616
var leftSide6 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader6();
paddingLeft = 4;
paddingRight = 4;
background = "#202020cc";
color = "white";
borderRight = "1px solid black";
fontWeight = "500";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton6();
settingsButton = new settingsButton16();
usersButton = new usersPageButton6();
signinButton = new signinPageButton6();
signoutButton = new signoutButton6();
signupButton = new signinButton6();
animationsButton = new settingsButton17();
gridButton = new settingsButton18();
fileManagerButton = new fileMangerButton6();
};
// framework/unify/table.js?disableCache=0995
var table8 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0995
var column6 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/news.title.js?disableCache=0995
var title16 = class extends column6 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/news.body.js?disableCache=0995
var body11 = class extends column6 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/news.price.js?disableCache=0995
var price6 = class extends column6 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default7.REAL;
};
// framework/cache/platforms/Windows/Pc/Dark/user/user.username.js?disableCache=0995
var username7 = class extends column6 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0995
var tools8 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll7(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default7 = new tools8();
// framework/cache/platforms/Windows/Pc/Dark/elements/input.js?disableCache=0995
var input6 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default12.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default12.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default12.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/user.salt.js?disableCache=0995
var salt7 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default7.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Dark/user/user.hash.js?disableCache=0995
var hash7 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default7.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Dark/user/user.js?disableCache=0995
var user7 = class _user extends table8 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username7();
salt = new salt7();
hash = new hash7();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups6();
selectedUsers = new collection10(_user);
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/comment.body.js?disableCache=0995
var body12 = class extends column6 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/comment.title.js?disableCache=0995
var title17 = class extends column6 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/comment.js?disableCache=0995
var comment7 = class extends table8 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user7();
title = new title17();
body = new body12();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/news.js?disableCache=0995
var news6 = class extends table8 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title16();
body = new body11();
price = new price6();
comments = new collection10(comment7);
};
// framework/cache/platforms/Windows/Pc/Dark/elements/tableCell.js?disableCache=0995
var tableCell6 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0995
var sortBy6 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0995
var gridViewRowColumn6 = class extends tableCell6 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
paddingRight = 40;
paddingLeft = 20;
paddingLeft = 30;
//borderLeft = "1px solid #24364e7a";
sortBy = new sortBy6();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/header/news.list.header.body.js?disableCache=0995
var newsListHeaderBody6 = class extends gridViewRowColumn6 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/header/news.list.header.title.js?disableCache=0995
var newsListHeaderTitle6 = class extends gridViewRowColumn6 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/header/news.list.header.price.js?disableCache=0995
var newsListHeaderPrice6 = class extends gridViewRowColumn6 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/header/news.list.header.actions.js?disableCache=0995
var newsListHeaderActions6 = class extends gridViewRowColumn6 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default6.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.header.row.js?disableCache=0995
var gridViewTableRow6 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/header/news.list.header.js?disableCache=0995
var newsListHeader6 = class extends extender12(news6, gridViewTableRow6) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody6();
title = new newsListHeaderTitle6();
price = new newsListHeaderPrice6();
actions = new newsListHeaderActions6();
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.header.js?disableCache=0995
var gridViewHeader6 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/news.list.table.header.js?disableCache=0995
var newsListTableHeader6 = class extends gridViewHeader6 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader6();
};
// framework/unify/renderCollection.js?disableCache=0995
var renderCollection8 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.body.js?disableCache=0995
var gridViewTableHeader6 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
};
// framework/unify/sql/OR.js?disableCache=0995
function OR6(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR6, "OR");
// framework/unify/sql/LIKE.js?disableCache=0995
function LIKE6(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE6, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0995
function GREATER_OR_EQUAL6(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL6, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0995
function SMALLER_OR_EQUAL6(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL6, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Windows/Pc/Dark/demo/list/news.list.table.body.js?disableCache=0995
var newsListTableBody6 = class extends extender12(renderCollection8, gridViewTableHeader6) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR6(OR6(LIKE6(filter.title, searchTerm), LIKE6(filter.comments.body, searchTerm)), LIKE6(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL6(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL6(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default6.visitor, "READ");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0995
var gridViewBodyColumn6 = class extends tableCell6 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
paddingLeft = 30;
//borderLeft = "1px solid #24364e7a";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/item/news.list.item.body.js?disableCache=0995
var newsListItemBody6 = class extends extender12(body11, gridViewBodyColumn6) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/item/news.list.item.title.js?disableCache=0995
var newsListItemTitle6 = class extends extender12(title16, gridViewBodyColumn6) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/item/news.list.item.price.js?disableCache=0995
var newsListItemPrice6 = class extends extender12(price6, gridViewBodyColumn6) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0995
var deleteButton16 = class extends button6 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default6.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/item/news.list.item.actions.js?disableCache=0995
var newsListItemActions6 = class extends extender12(gridViewBodyColumn6, gridViewBodyColumn6) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton16();
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.body.row.js?disableCache=0995
var gridViewRow6 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/item/news.list.item.js?disableCache=0995
var newsListItem6 = class extends extender12(news6, gridViewRow6) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody6();
title = new newsListItemTitle6();
price = new newsListItemPrice6();
actions = new newsListItemActions6();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default6.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/gridView/gridView.js?disableCache=0995
var gridView6 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 30;
borderRadius = 4;
background = "#202020";
color = "white";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/list/news.list.table.js?disableCache=0995
var newsListTable6 = class extends gridView6 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader6();
body = new newsListTableBody6(newsListItem6, new collection10(news6));
};
// framework/cache/platforms/Windows/Pc/Dark/demo/edit/news.edit.title.js?disableCache=0995
var newsEditTitle6 = class extends extender12(input6, title16) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Windows/Pc/Dark/elements/textarea.js?disableCache=0995
var textarea6 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 12;
padding = 12;
borderWidth = 1;
borderRadius = 6;
borderColor = "#E5E5E5";
borderBottomColor = "#868686";
background = "#2D2D2D";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
focus() {
this.borderBottom = "2px solid #4CC2FF";
this.background = "#1F1F1F";
}
blur() {
this.background = "#2D2D2D";
this.borderBottom = "1px solid #9A9A9A";
}
value = "";
layers = 1;
customElement = document_default12.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/edit/news.edit.body.js?disableCache=0995
var newsPageBody11 = class extends extender12(body11, textarea6) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/edit/news.edit.button.js?disableCache=0995
var editButton11 = class extends button6 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/edit/news.edit.price.js?disableCache=0995
var newsPagePrice6 = class extends extender12(price6, input6) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/label.js?disableCache=0995
var label11 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
fontWeight = "bold";
color = "white";
};
// framework/cache/platforms/Windows/Pc/Dark/elements/label/left.js?disableCache=0995
var leftLabel6 = class extends label11 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Windows/Pc/Dark/elements/panel.js?disableCache=0995
var panel6 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
borderRadius = 12;
};
// framework/cache/platforms/Windows/Pc/Dark/elements/window/draggable.js?disableCache=0995
var vector217 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay16(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay16, "delay");
var draggable11 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector217(0, 0);
grabPosition = new vector217(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector217(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay16(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector217(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/panel/row.js?disableCache=0995
var panelRow6 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
marginTop = 20;
background = "#2b2b2b";
background = "#0c0e165c";
borderRadius = 12;
afterLoad() {
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/window/header.js?disableCache=0995
var maximizeButton6 = class extends icon6 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton6 = class extends icon6 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl6 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton6();
maximizeButton = new maximizeButton6();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title18 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl6 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader6 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl6();
title = new title18();
rightControl = new rightControl6();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
color = "white";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/edit/news.edit.js?disableCache=0995
var newsBodyRow6 = class extends panelRow6 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel6("Message");
body = new newsPageBody11();
};
var newsTitleRow6 = class extends panelRow6 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel6("Title");
title = new newsEditTitle6();
};
var newsPriceRow6 = class extends panelRow6 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
background = "none";
border = "none";
label = new leftLabel6("Price");
price = new newsPagePrice6();
};
var cancelButton11 = class extends button6 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow6 = class extends panelRow6 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton11();
newsEditbutton = new editButton11();
background = "none";
};
var newsEdit6 = class extends extender12(news6, panel6, draggable11) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader6("News");
layers = 2;
zIndex = 1e3;
fontFamily = "segoe";
fontFamily = "SegoeUI";
width = 600;
background = "#202020cc";
border = "1px solid rgb(44 45 46)";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow6();
newsPriceRow = new newsPriceRow6();
newsBodyRow = new newsBodyRow6();
newsButtonRow = new newsButtonRow6();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
this.allow(user_group_permission_default6.visitor, "READ");
this.allow(user_group_permission_default6.member, "WRITE");
this.allow(user_group_permission_default6.admin, "WRITE");
this.allow(user_group_permission_default6.visitor, "WRITE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsDialogButton.js?disableCache=0995
var newsDialogButton6 = class extends button6 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/search.input.js?disableCache=0995
var searchBar16 = class extends input6 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/select.js?disableCache=0995
var select6 = class extends renderCollection8 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default12.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default6.admin, "READ");
this.allow(user_group_permission_default6.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default12.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/search.select.js?disableCache=0995
var customSelect11 = class extends select6 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/search.widget.js?disableCache=0995
var searchWidget6 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar16();
select = new customSelect11();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0995
var paginationItem6 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0995
var pagination6 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem6();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem6();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem6();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsItemPage.limit.js?disableCache=0995
var limit6 = class extends select6 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0995
var tableControl6 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label11("Select page:");
pagination = new pagination6();
limitLabel = new label11("Select items per page:");
limit = new limit6();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsItemPage.js?disableCache=0995
var testbutton6 = class extends button6 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage6 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#202020cc";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header6("News Items");
searchWidget = new searchWidget6();
newsListTable = new newsListTable6();
tableControl = new tableControl6();
createNews = new newsEdit6();
testbutton = new testbutton6();
newsDialogButton = new newsDialogButton6();
};
// framework/cache/platforms/Windows/Pc/Dark/elements/flexbox.js?disableCache=0995
var flexbox11 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/page/news.page.title.js?disableCache=0995
var newsPageTitle6 = class extends extender12(title16, flexbox11) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
//background = "#202020cc";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/page/news.page.body.js?disableCache=0995
var newsPageBody12 = class extends extender12(flexbox11, body11) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/comments.messages.js?disableCache=0995
var commentsMessages6 = class extends renderCollection8 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR6(LIKE6(filter.body, this.value), LIKE6(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default6.visitor, "READ");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0995
var saveEditButton6 = class extends button6 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0995
var commentEditTitle11 = class extends title17 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0995
var commentEditBody11 = class extends extender12(body12, flexbox11) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default12.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "#202020cc";
borderRadius = 12;
margin = 16;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0995
var userLabel11 = class extends label11 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0995
var deleteButton17 = class extends button6 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.editButton.js?disableCache=0995
var editButton12 = class extends button6 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.information.js?disableCache=0995
var information6 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
//background = "rgb(48 51 56 / 86%)";
_deleteButton = new deleteButton17();
_editButton = new editButton12();
_userLabel = new userLabel11();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/edit/comment.edit.js?disableCache=0995
var editComment6 = class extends comment7 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information6();
body = new commentEditBody11();
title = new commentEditTitle11();
saveButton = new saveEditButton6();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/create/comment.saveButton.js?disableCache=0995
var saveCommentButton6 = class extends button6 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/create/comment.create.body.js?disableCache=0995
var commentEditBody12 = class extends extender12(body12, textarea6) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/comment/create/comment.create.js?disableCache=0995
var createComment6 = class extends comment7 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody12();
saveButton = new saveCommentButton6();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default6.member, "WRITE");
this.allow(user_group_permission_default6.admin, "WRITE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/page/news.page.backButton.js?disableCache=0995
var backButton11 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/page/news.page.edit.button.js?disableCache=0995
var backButton12 = class extends button6 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/filler.js?disableCache=0995
var filler6 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/page/search.comments.js?disableCache=0995
var searchBar17 = class extends input6 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/page/news.page.js?disableCache=0995
var testDiv6 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle6();
};
var newsPage6 = class extends news6 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#202020cc";
flexDirection = "column";
_backButton = new backButton11();
_testDiv = new testDiv6();
body = new newsPageBody12();
editButton = new backButton12();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar17();
commentsMessages = new commentsMessages6(editComment6, this.comments);
createComment = new createComment6(this.comments);
filler = new filler6();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default6.member, "WRITE");
this.allow(user_group_permission_default6.admin, "WRITE");
this.allow(user_group_permission_default6.visitor, "WRITE");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
this.allow(user_group_permission_default6.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/newsPages.js?disableCache=0995
var newsPages6 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage6();
newsPage = new newsPage6();
newsEdit = new newsEdit6();
width = 1800;
};
// framework/cache/platforms/Windows/Pc/Dark/elements/preloaders/simpleSpinner.js?disableCache=0995
var line6 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask6 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line6();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox6 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask6();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0995
var themaSelectorImage6 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0995
var selectLabel6 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/themeSelector.js?disableCache=0995
var themeSelector6 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage6();
selectLabel = new selectLabel6();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0995
var themeOSSelectorItem6 = class extends themeSelector6 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default7.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0995
var osSelectorList6 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem6("Windows");
themeMacOS = new themeOSSelectorItem6("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default7.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0995
var osLabel6 = class extends label11 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/os.js?disableCache=0995
var os6 = class extends panelRow6 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel6("Os");
osSelector = new osSelectorList6();
spinner = new preloaderBox6();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0995
var themeTintSelector6 = class extends themeSelector6 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default7.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0995
var themeTintSelectors6 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector6("Light");
themeDark = new themeTintSelector6("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default7.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0995
var customLabel11 = class extends label11 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/rows/tint.js?disableCache=0995
var tint6 = class extends panelRow6 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel11("Appearance");
themeTintSelectors = new themeTintSelectors6();
spinner = new preloaderBox6();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/appearance/panel.js?disableCache=0995
var appearancePanel6 = class extends panel6 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os6();
tint = new tint6();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/pages/settings.js?disableCache=0995
var settings6 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#202020cc";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header6("Appearance");
appearancePanel = new appearancePanel6();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0995
var Console7 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default7 = new Console7();
// framework/unify/promiseManager.js?disableCache=0995
var promiseManager7 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0995
var shared7 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object20 = new shared7();
var shared_default7 = object20.get();
// framework/cache/platforms/Windows/Pc/Dark/elements/fileUpload.js?disableCache=0995
var fileUpload6 = class extends input6 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager7();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0995
var delay17 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton6 = class extends icon6 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay17(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay17(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.icon.js?disableCache=0995
var fileIcon6 = class extends icon6 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton6();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.upload.js?disableCache=0995
var stream6 = class extends fileUpload6 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon6();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.list.js?disableCache=0995
var fileList6 = class extends panelRow6 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon6();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0995
var removeIcons6 = class extends icon6 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/page.js?disableCache=0995
var page6 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#202020cc";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Windows/Pc/Dark/elements/image.js?disableCache=0995
var icon_id12 = 0;
var image6 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default12.createElement("img");
useCustomElement = true;
id = icon_id12++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0995
var previewImage6 = class extends image6 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0995
var imagePreviewWindow6 = class extends draggable11 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
background = "#202020cc";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader6();
previewImage = new previewImage6();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0995
var fileChooserFileIcon6 = class extends icon6 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/checkbox.js?disableCache=0995
var checkbox6 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default12.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0995
var file6 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox6();
icon = new fileChooserFileIcon6();
label = new label11();
};
// framework/cache/platforms/Windows/Pc/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0995
var fileChooserFiles6 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file6();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0995
var fileChooserSelectButton6 = class extends button6 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/fileChooser/fileChooser.js?disableCache=0995
var fileChooser6 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles6();
selectButton = new fileChooserSelectButton6();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/fileManager/fileManager.js?disableCache=0995
var fileManager6 = class extends page6 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header6("Upload");
fileupload = new stream6();
filesHeader = new header6("Files");
removeIcons = new removeIcons6();
fileList = new fileList6();
previewWindow = new imagePreviewWindow6();
fileChooser = new fileChooser6();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.move.js?disableCache=0995
var animationBlock36 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel36 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow6 = class extends panelRow6 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel36("Move");
animationBlock = new animationBlock36();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.rotate.js?disableCache=0995
var animationBlock37 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel37 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row31 = class extends panelRow6 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel37("Rotate");
animationBlock = new animationBlock37();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.color.js?disableCache=0995
var animationBlock38 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel38 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row32 = class extends panelRow6 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel38("Background color");
animationBlock = new animationBlock38();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.skewX.js?disableCache=0995
var animationBlock39 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel39 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row33 = class extends panelRow6 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel39("skewX");
animationBlock = new animationBlock39();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0995
var animationBlock40 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel40 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row34 = class extends panelRow6 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel40("Rotate + Move + Background");
animationBlock = new animationBlock40();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.reverse.js?disableCache=0995
var animationBlock41 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton6 = class extends button6 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton6 = class extends button6 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton6 = class extends button6 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton6 = class extends button6 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton6 = class extends button6 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel41 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons11 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton6();
pauseButton = new pauseButton6();
stopButton = new stopButton6();
forwardButton = new forwardButton6();
backwardButton = new backwardButton6();
flexDirection = "column";
};
var row35 = class extends panelRow6 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel41("Reverse");
buttons = new buttons11();
animationBlock = new animationBlock41();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animation.render.js?disableCache=0995
var animationBlock42 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel42 = class extends label11 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row36 = class extends panelRow6 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel42("RenderLoop");
animationBlock = new animationBlock42();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/animations/animations.js?disableCache=0995
var animations6 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#202020cc";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow6();
rotateAnimation = new row31();
backgroundColor = new row32();
skewX = new row33();
rotateMoveColor = new row34();
reverse = new row35();
render = new row36();
};
// framework/cache/platforms/Windows/Pc/Dark/demo/examples/grids.js?disableCache=0995
var label12 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a6 = class extends input6 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b7 = class extends input6 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c6 = class extends input6 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d6 = class extends input6 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA6 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label12("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a6();
b = new b7();
c = new c6();
d = new d6();
};
var gridB6 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label12("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a6();
b = new b7();
c = new c6();
d = new d6();
};
var gridExample6 = class extends page6 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA6();
gridB = new gridB6();
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/header/user.userList.header.username.js?disableCache=0995
var userListHeaderUsername6 = class extends gridViewRowColumn6 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0995
var userListHeaderActions6 = class extends gridViewRowColumn6 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default6.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/header/user.userList.header.js?disableCache=0995
var userListHeader6 = class extends extender12(user7, gridViewTableRow6) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername6();
actions = new userListHeaderActions6();
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/user.userList.table.header.js?disableCache=0995
var userListTableHeader6 = class extends gridViewHeader6 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader6();
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/user.userList.table.body.js?disableCache=0995
var userListTableBody6 = class extends extender12(renderCollection8, gridViewTableHeader6) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE6(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default6.visitor, "READ");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/item/user.userList.item.username.js?disableCache=0995
var userListItemTitle6 = class extends extender12(username7, gridViewBodyColumn6) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0995
var deleteButton18 = class extends button6 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default6.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0995
var userListItemActions6 = class extends extender12(gridViewBodyColumn6, gridViewBodyColumn6) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton18();
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/item/user.userList.item.js?disableCache=0995
var userListItem6 = class extends extender12(user7, gridViewRow6) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle6();
actions = new userListItemActions6();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default6.admin, "DELETE");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/user.userList.table.js?disableCache=0995
var userListTable6 = class extends gridView6 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader6();
body = new userListTableBody6(userListItem6, new collection10(user7));
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/search.js?disableCache=0995
var searchBar18 = class extends input6 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/userList/user.userList.page.js?disableCache=0995
var editPage6 = class extends page6 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header6("Users");
search = new searchBar18();
userTable = new userListTable6();
flexDirection = "column";
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.username.js?disableCache=0995
var editUsername6 = class extends extender12(username7, input6) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.username.row.js?disableCache=0995
var usernameRow6 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label11("Username");
username = new editUsername6();
};
// framework/cache/platforms/Windows/Pc/Dark/elements/empty.js?disableCache=0995
var empty6 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/user.edit.button.js?disableCache=0995
var userEditButton6 = class extends button6 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/user.edit.button.row.js?disableCache=0995
var saveButtonRow6 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty6();
userEditButton = new userEditButton6();
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0995
var checkRenderCollection6 = class extends renderCollection8 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default6.admin, "WRITE");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
this.allow(user_group_permission_default6.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.checkbox.js?disableCache=0995
var customCheckbox11 = class extends checkbox6 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0995
var customCheckbox12 = class extends user7 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label11();
checkbox = new customCheckbox11();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0995
var checkboxRow6 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label11("Select users");
renderCollection = new checkRenderCollection6(customCheckbox12, new collection10(user7));
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.select.option.js?disableCache=0995
var customOption6 = class extends extender12(option6, user7) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0995
var customSelect12 = class extends renderCollection8 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default12.createElement("select");
useCustomElement = true;
debug = true;
borderBottom = "2px solid #868686";
borderRadius = 6;
padding = 8;
margin = 12;
background = "#2D2D2D!important";
webkitBoxShadow = "0 0 0px 30px #2D2D2D inset!important";
webkitTextFillColor = "white";
color = "white";
transition = "background-color 5000s ease-in-out 0s";
border = "1px solid #303030";
borderBottom = "2px solid #9A9A9A";
color = "WHITE";
opaqueBackgroundColor = "#2D2D2D!important";
focusBackgroundColor = "#1F1F1F";
focusBorderBottom = "2px solid #0067C0";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "1px solid #9A9A9A";
permission() {
this.allow(user_group_permission_default6.admin, "WRITE");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
this.allow(user_group_permission_default6.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.select.row.js?disableCache=0995
var optionRow6 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label11("Select user");
renderCollection = new customSelect12(customOption6, new collection10(user7));
};
// framework/cache/platforms/Windows/Pc/Dark/user/edit/edit.user.js?disableCache=0995
var editUser6 = class extends extender12(user7, page6) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header6("Edit user");
usernameRow = new usernameRow6();
selectRow = new optionRow6();
checkboxRow = new checkboxRow6();
showSelectedUser = new customSelect12(customOption6, this.selectedUsers);
saveButtonRow = new saveButtonRow6();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default6.admin, "WRITE");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
this.allow(user_group_permission_default6.visitor, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/signup/signup.username.js?disableCache=0995
var signUpUsername6 = class extends extender12(username7, input6) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Windows/Pc/Dark/elements/inputPassword.js?disableCache=0995
var inputPassword6 = class extends input6 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/signup/signup.password.js?disableCache=0995
var signupPassword6 = class extends inputPassword6 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Windows/Pc/Dark/user/signup/signup.passwordCheck.js?disableCache=0995
var signupPasswordCheck6 = class extends inputPassword6 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0995
var cookieManager7 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default7 = new cookieManager7();
// framework/cache/platforms/Windows/Pc/Dark/user/signup/signup.button.js?disableCache=0995
var signupButton6 = class extends button6 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/signup/signup.customLabel.js?disableCache=0995
var customLabel12 = class extends label11 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Windows/Pc/Dark/user/signup/user.signup.js?disableCache=0995
var signup6 = class extends extender12(user7, page6) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default12.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header6("Signup");
// Children
userLabel = new customLabel12("Username");
username = new signUpUsername6();
passwordLabel = new customLabel12("Password");
password = new signupPassword6();
passwordAgainLabel = new customLabel12("Password again");
passwordAgain = new signupPasswordCheck6();
signUpButton = new signupButton6();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default6.visitor, "PROCESS");
this.allow(user_group_permission_default6.member, "PROCESS");
this.allow(user_group_permission_default6.admin, "PROCESS");
}
};
// framework/cache/platforms/Windows/Pc/Dark/user/signin/signin.username.js?disableCache=0995
var signinUsername6 = class extends extender12(username7, input6) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Windows/Pc/Dark/user/user.password.js?disableCache=0995
var password6 = class extends inputPassword6 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Windows/Pc/Dark/user/signin/signin.password.js?disableCache=0995
var signinPassword6 = class extends password6 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Windows/Pc/Dark/user/signin/signin.button.js?disableCache=0995
var signinFormButton6 = class extends button6 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0995
var unify7 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default7 = new unify7();
// framework/cache/platforms/Windows/Pc/Dark/user/signin/signin.cancel.button.js?disableCache=0995
var cancelButton12 = class extends button6 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Windows/Pc/Dark/user/signin/user.signin.js?disableCache=0995
var tussenObject6 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword6();
width = "100%";
};
var buttons12 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton12();
signinButton = new signinFormButton6();
};
var hint6 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin6 = class extends extender12(user7, page6) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint6();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default12.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header6("Signin");
//userLabel = new label("Username");
username = new signinUsername6();
//passwordLabel = new label("Password");
tussenObject = new tussenObject6();
buttons = new buttons12();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user7();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default7.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user7();
client2.user = visitor62;
client2.user.error = false;
unify_default7.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default7.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default6.visitor, "PROCESS");
this.allow(user_group_permission_default6.member, "PROCESS");
this.allow(user_group_permission_default6.admin, "PROCESS");
this.allow(user_group_permission_default6.member, "READ");
this.allow(user_group_permission_default6.admin, "READ");
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/rightSide/rightSide.js?disableCache=0616
var rightSide6 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages6();
signup = new signup6();
signin = new signin6();
settings = new settings6();
fileManager = new fileManager6();
animations = new animations6();
gridExample = new gridExample6();
userListPage = new editPage6();
editUser = new editUser6();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0616
var documentTool13 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object21 = new documentTool13();
var document_default13 = object21.getDocument();
// framework/unify/math/vector2.js?disableCache=0616
var vector218 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Windows/Pc/Dark/elements/flexbox.js?disableCache=0616
var flexbox12 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Windows/Pc/Dark/elements/window/frostedGlass.js?disableCache=0616
var frostedGlass12 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.png')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Windows/Pc/Dark/elements/window/draggable.js?disableCache=0616
var vector219 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay18(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay18, "delay");
var draggable12 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector219(0, 0);
grabPosition = new vector219(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector219(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay18(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector219(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Windows/Pc/Dark/demo/application.js
var application7 = class extends extender11(frostedGlass12, flexbox12, draggable12) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton6();
leftSide = new leftSide6();
rightSide = new rightSide6();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "SegoeUI";
//boxBackgroundImage = "url('/assets/images/wallpapers/windows/light/2048.png')";
//backgroundImage = "url('/assets/images/wallpapers/windows/light/blur_1024.jpg')";
border = "1px solid rgb(65 84 118 / 32%)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default13.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector218(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0509
function extender13(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender13, "extender");
// framework/unify/extender.js?disableCache=0269
function extender14(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender14, "extender");
// framework/cache/platforms/Android/Mobile/Light/elements/button.js?disableCache=0269
var button7 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
borderRadius = 40;
fontSize = 15;
margin = 20;
width = "-webkit-fill-available";
fontSize = 22;
fontWeight = "bold";
textAlign = "center";
padding = 20;
background = "#f2f2f2";
color = "#019e7c";
hoverBackgroundColor = "#d9d9d9";
opaqueBackgroundColor = "#f2f2f2";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/icon.js?disableCache=0269
var icon_id13 = 0;
var icon7 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id13++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Android/Mobile/Light/demo/minimizeButton.js?disableCache=0509
var minimizeButton7 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
top = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxHeight = "100vh";
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxHeight = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.js?disableCache=0269
var menuButton7 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
width = "80vw";
borderRadius = 18;
textAlign = "center";
padding = 20;
margin = "0 auto";
marginTop = 8;
fontSize = 20;
height = 24;
fontWeight = "600";
fontColor = "#313131";
borderBottom = "1px solid #ececec";
background = "white";
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.news.js?disableCache=0269
var newsButton7 = class extends menuButton7 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
application32.minimizeButton.close();
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0269
var settingsButton19 = class extends menuButton7 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
application32.minimizeButton.close();
}
};
// framework/unify/collection.js?disableCache=0269
var collection11 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0269
var datatype_default8 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0269
var documentTool14 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object22 = new documentTool14();
var document_default14 = object22.getDocument();
// framework/cache/platforms/Android/Mobile/Light/elements/option.js?disableCache=0269
var option7 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default14.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Android/Mobile/Light/user/group/user.group.js?disableCache=0269
var visitor14 = class extends option7 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member7 = class extends option7 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin13 = class extends option7 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups7 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member7();
admin = new admin13();
visitor = new visitor14();
};
// framework/cache/platforms/Android/Mobile/Light/user/group/user.group.permission.js?disableCache=0269
var user_group_permission_default7 = new groups7();
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0269
var signinPageButton7 = class extends menuButton7 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
application32.minimizeButton.close();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0269
var signinButton7 = class extends menuButton7 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
application32.minimizeButton.close();
}
};
// framework/server/userManager.js?disableCache=0269
var visitor15 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager8 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor15();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default8 = new userManager8();
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0269
var signoutButton7 = class extends menuButton7 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default8.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default7.member, "PROCESS");
this.allow(user_group_permission_default7.admin, "PROCESS");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0269
var fileMangerButton7 = class extends menuButton7 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0269
var settingsButton20 = class extends menuButton7 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.users.js?disableCache=0269
var usersPageButton7 = class extends menuButton7 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
application32.minimizeButton.close();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default7.member, "PROCESS");
this.allow(user_group_permission_default7.admin, "PROCESS");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0269
var settingsButton21 = class extends menuButton7 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/header.js?disableCache=0269
var header7 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
padding = "0";
margin = 0;
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.header.js?disableCache=0269
var menuHeader7 = class extends header7 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "flex";
};
// framework/cache/platforms/Android/Mobile/Light/demo/leftSide/leftSide.js?disableCache=0509
var leftSide7 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "100vh";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader7();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
boxBackground = "#f2f2f2";
//background = "white";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton7();
settingsButton = new settingsButton19();
usersButton = new usersPageButton7();
signinButton = new signinPageButton7();
signoutButton = new signoutButton7();
signupButton = new signinButton7();
animationsButton = new settingsButton20();
gridButton = new settingsButton21();
fileManagerButton = new fileMangerButton7();
};
// framework/unify/table.js?disableCache=0269
var table9 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0269
var column7 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/news.title.js?disableCache=0269
var title19 = class extends column7 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/demo/news.body.js?disableCache=0269
var body13 = class extends column7 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/demo/news.price.js?disableCache=0269
var price7 = class extends column7 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default8.REAL;
};
// framework/cache/platforms/Android/Mobile/Light/user/user.username.js?disableCache=0269
var username8 = class extends column7 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0269
var tools9 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll8(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default8 = new tools9();
// framework/cache/platforms/Android/Mobile/Light/elements/input.js?disableCache=0269
var input7 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default14.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
background = "white";
borderRadius = 16;
padding = 8;
paddingLeft = 16;
margin = 4;
fontSize = 18;
boxSizing = "border-box";
width = "92%";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default14.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default14.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Android/Mobile/Light/user/user.salt.js?disableCache=0269
var salt8 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default8.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Android/Mobile/Light/user/user.hash.js?disableCache=0269
var hash8 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default8.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Android/Mobile/Light/user/user.js?disableCache=0269
var user8 = class _user extends table9 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username8();
salt = new salt8();
hash = new hash8();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups7();
selectedUsers = new collection11(_user);
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/comment.body.js?disableCache=0269
var body14 = class extends column7 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/comment.title.js?disableCache=0269
var title20 = class extends column7 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/comment.js?disableCache=0269
var comment8 = class extends table9 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user8();
title = new title20();
body = new body14();
flexDirection = "column";
};
// framework/cache/platforms/Android/Mobile/Light/demo/news.js?disableCache=0269
var news7 = class extends table9 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title19();
body = new body13();
price = new price7();
comments = new collection11(comment8);
};
// framework/cache/platforms/Android/Mobile/Light/elements/tableCell.js?disableCache=0269
var tableCell7 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0269
var sortBy7 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.header.row.column.js?disableCache=0269
var gridViewRowColumn7 = class extends tableCell7 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 20;
sortBy = new sortBy7();
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/header/news.list.header.body.js?disableCache=0269
var newsListHeaderBody7 = class extends gridViewRowColumn7 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/header/news.list.header.title.js?disableCache=0269
var newsListHeaderTitle7 = class extends gridViewRowColumn7 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/header/news.list.header.price.js?disableCache=0269
var newsListHeaderPrice7 = class extends gridViewRowColumn7 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/header/news.list.header.actions.js?disableCache=0269
var newsListHeaderActions7 = class extends gridViewRowColumn7 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default7.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.header.row.js?disableCache=0269
var gridViewTableRow7 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/header/news.list.header.js?disableCache=0269
var newsListHeader7 = class extends extender14(news7, gridViewTableRow7) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody7();
title = new newsListHeaderTitle7();
price = new newsListHeaderPrice7();
actions = new newsListHeaderActions7();
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.header.js?disableCache=0269
var gridViewHeader7 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/news.list.table.header.js?disableCache=0269
var newsListTableHeader7 = class extends gridViewHeader7 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader7();
};
// framework/unify/renderCollection.js?disableCache=0269
var renderCollection9 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.body.js?disableCache=0269
var gridViewTableHeader7 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0269
function OR7(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR7, "OR");
// framework/unify/sql/LIKE.js?disableCache=0269
function LIKE7(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE7, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0269
function GREATER_OR_EQUAL7(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL7, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0269
function SMALLER_OR_EQUAL7(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL7, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Android/Mobile/Light/demo/list/news.list.table.body.js?disableCache=0269
var newsListTableBody7 = class extends extender14(renderCollection9, gridViewTableHeader7) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR7(OR7(LIKE7(filter.title, searchTerm), LIKE7(filter.comments.body, searchTerm)), LIKE7(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL7(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL7(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default7.visitor, "READ");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.body.row.column.js?disableCache=0269
var gridViewBodyColumn7 = class extends tableCell7 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/item/news.list.item.body.js?disableCache=0269
var newsListItemBody7 = class extends extender14(body13, gridViewBodyColumn7) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/item/news.list.item.title.js?disableCache=0269
var newsListItemTitle7 = class extends extender14(title19, gridViewBodyColumn7) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/item/news.list.item.price.js?disableCache=0269
var newsListItemPrice7 = class extends extender14(price7, gridViewBodyColumn7) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0269
var deleteButton19 = class extends button7 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default7.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/item/news.list.item.actions.js?disableCache=0269
var newsListItemActions7 = class extends extender14(gridViewBodyColumn7, gridViewBodyColumn7) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton19();
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.body.row.js?disableCache=0269
var gridViewRow7 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/item/news.list.item.js?disableCache=0269
var newsListItem7 = class extends extender14(news7, gridViewRow7) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody7();
title = new newsListItemTitle7();
price = new newsListItemPrice7();
actions = new newsListItemActions7();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default7.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/gridView/gridView.js?disableCache=0269
var gridView7 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
background = "white";
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Light/demo/list/news.list.table.js?disableCache=0269
var newsListTable7 = class extends gridView7 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader7();
body = new newsListTableBody7(newsListItem7, new collection11(news7));
};
// framework/cache/platforms/Android/Mobile/Light/demo/edit/news.edit.title.js?disableCache=0269
var newsEditTitle7 = class extends extender14(input7, title19) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Android/Mobile/Light/elements/textarea.js?disableCache=0269
var textarea7 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 4;
height = "auto";
border = "1px solid #E5E5E5";
borderRadius = 20;
background = "white";
padding = 6;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default14.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/edit/news.edit.body.js?disableCache=0269
var newsPageBody13 = class extends extender14(body13, textarea7) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/edit/news.edit.button.js?disableCache=0269
var editButton13 = class extends button7 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/edit/news.edit.price.js?disableCache=0269
var newsPagePrice7 = class extends extender14(price7, input7) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/label.js?disableCache=0269
var label13 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Android/Mobile/Light/elements/label/left.js?disableCache=0269
var leftLabel7 = class extends label13 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Android/Mobile/Light/elements/panel.js?disableCache=0269
var panel7 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Android/Mobile/Light/elements/window/draggable.js?disableCache=0269
var vector220 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay19(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay19, "delay");
var draggable13 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector220(0, 0);
grabPosition = new vector220(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector220(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay19(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector220(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/panel/row.js?disableCache=0269
var panelRow7 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/window/header.js?disableCache=0269
var maximizeButton7 = class extends icon7 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton7 = class extends icon7 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl7 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton7();
maximizeButton = new maximizeButton7();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title21 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl7 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader7 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl7();
title = new title21();
rightControl = new rightControl7();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Android/Mobile/Light/demo/edit/news.edit.js?disableCache=0269
var newsBodyRow7 = class extends panelRow7 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel7("Message");
body = new newsPageBody13();
};
var newsTitleRow7 = class extends panelRow7 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel7("Title");
title = new newsEditTitle7();
};
var newsPriceRow7 = class extends panelRow7 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel7("Price");
price = new newsPagePrice7();
};
var cancelButton13 = class extends button7 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow7 = class extends panelRow7 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton13();
newsEditbutton = new editButton13();
};
var newsEdit7 = class extends extender14(news7, panel7, draggable13) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader7("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow7();
newsPriceRow = new newsPriceRow7();
newsBodyRow = new newsBodyRow7();
newsButtonRow = new newsButtonRow7();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
this.allow(user_group_permission_default7.visitor, "READ");
this.allow(user_group_permission_default7.member, "WRITE");
this.allow(user_group_permission_default7.admin, "WRITE");
this.allow(user_group_permission_default7.visitor, "WRITE");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsDialogButton.js?disableCache=0269
var newsDialogButton7 = class extends button7 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/search.input.js?disableCache=0269
var searchBar19 = class extends input7 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/select.js?disableCache=0269
var select7 = class extends renderCollection9 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default14.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default7.admin, "READ");
this.allow(user_group_permission_default7.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default14.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/search.select.js?disableCache=0269
var customSelect13 = class extends select7 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/search.widget.js?disableCache=0269
var searchWidget7 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar19();
select = new customSelect13();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0269
var paginationItem7 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsItemPage.pagination.js?disableCache=0269
var pagination7 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem7();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem7();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem7();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsItemPage.limit.js?disableCache=0269
var limit7 = class extends select7 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0269
var tableControl7 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label13("Select page:");
pagination = new pagination7();
limitLabel = new label13("Select items per page:");
limit = new limit7();
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsItemPage.js?disableCache=0269
var testbutton7 = class extends button7 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage7 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = "100vw";
padding = "0";
newsListHeader = new header7("News Items");
searchWidget = new searchWidget7();
newsListTable = new newsListTable7();
tableControl = new tableControl7();
createNews = new newsEdit7();
testbutton = new testbutton7();
newsDialogButton = new newsDialogButton7();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
background = "#f2f2f2";
};
// framework/cache/platforms/Android/Mobile/Light/elements/flexbox.js?disableCache=0269
var flexbox13 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Mobile/Light/demo/page/news.page.title.js?disableCache=0269
var newsPageTitle7 = class extends extender14(title19, flexbox13) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
borderRadius = "18px 18px 0 0";
width = "100%";
background = "white";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Android/Mobile/Light/demo/page/news.page.body.js?disableCache=0269
var newsPageBody14 = class extends extender14(flexbox13, body13) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
borderRadius = "0 0 18px 18px";
background = "white";
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/comments.messages.js?disableCache=0269
var commentsMessages7 = class extends renderCollection9 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR7(LIKE7(filter.body, this.value), LIKE7(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default7.visitor, "READ");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.saveButton.js?disableCache=0269
var saveEditButton7 = class extends button7 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.edit.title.js?disableCache=0269
var commentEditTitle13 = class extends title20 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.edit.body.js?disableCache=0269
var commentEditBody13 = class extends extender14(body14, flexbox13) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default14.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.userLabel.js?disableCache=0269
var userLabel13 = class extends label13 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0269
var deleteButton20 = class extends button7 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.editButton.js?disableCache=0269
var editButton14 = class extends button7 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.information.js?disableCache=0269
var information7 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton20();
_editButton = new editButton14();
_userLabel = new userLabel13();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/edit/comment.edit.js?disableCache=0269
var editComment7 = class extends comment8 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information7();
body = new commentEditBody13();
title = new commentEditTitle13();
saveButton = new saveEditButton7();
width = "-webkit-fill-available";
width = "100vw";
borderRadius = 18;
margin = 4;
background = "white";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/create/comment.saveButton.js?disableCache=0269
var saveCommentButton7 = class extends button7 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/create/comment.create.body.js?disableCache=0269
var commentEditBody14 = class extends extender14(body14, textarea7) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Android/Mobile/Light/demo/comment/create/comment.create.js?disableCache=0269
var createComment7 = class extends comment8 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody14();
saveButton = new saveCommentButton7();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default7.member, "WRITE");
this.allow(user_group_permission_default7.admin, "WRITE");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/page/news.page.backButton.js?disableCache=0269
var backButton13 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/page/news.page.edit.button.js?disableCache=0269
var backButton14 = class extends button7 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/filler.js?disableCache=0269
var filler7 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Android/Mobile/Light/demo/page/search.comments.js?disableCache=0269
var searchBar20 = class extends input7 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/page/news.page.js?disableCache=0269
var testDiv7 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle7();
};
var newsPage7 = class extends news7 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
background = "#f2f2f2";
flexDirection = "column";
_backButton = new backButton13();
_testDiv = new testDiv7();
body = new newsPageBody14();
editButton = new backButton14();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar20();
commentsMessages = new commentsMessages7(editComment7, this.comments);
createComment = new createComment7(this.comments);
filler = new filler7();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default7.member, "WRITE");
this.allow(user_group_permission_default7.admin, "WRITE");
this.allow(user_group_permission_default7.visitor, "WRITE");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
this.allow(user_group_permission_default7.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/newsPages.js?disableCache=0269
var newsPages7 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage7();
newsPage = new newsPage7();
newsEdit = new newsEdit7();
width = 1800;
};
// framework/cache/platforms/Android/Mobile/Light/elements/preloaders/simpleSpinner.js?disableCache=0269
var line7 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask7 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line7();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox7 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask7();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0269
var themaSelectorImage7 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0269
var selectLabel7 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/themeSelector.js?disableCache=0269
var themeSelector7 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage7();
selectLabel = new selectLabel7();
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0269
var themeOSSelectorItem7 = class extends themeSelector7 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default8.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0269
var osSelectorList7 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem7("Windows");
themeMacOS = new themeOSSelectorItem7("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default8.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/os.label.js?disableCache=0269
var osLabel7 = class extends label13 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/os.js?disableCache=0269
var os7 = class extends panelRow7 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel7("Os");
osSelector = new osSelectorList7();
spinner = new preloaderBox7();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0269
var themeTintSelector7 = class extends themeSelector7 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default8.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0269
var themeTintSelectors7 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector7("Light");
themeDark = new themeTintSelector7("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default8.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0269
var customLabel13 = class extends label13 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/rows/tint.js?disableCache=0269
var tint7 = class extends panelRow7 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel13("Appearance");
themeTintSelectors = new themeTintSelectors7();
spinner = new preloaderBox7();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/appearance/panel.js?disableCache=0269
var appearancePanel7 = class extends panel7 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os7();
tint = new tint7();
};
// framework/cache/platforms/Android/Mobile/Light/demo/pages/settings.js?disableCache=0269
var settings7 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header7("Appearance");
appearancePanel = new appearancePanel7();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0269
var Console8 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default8 = new Console8();
// framework/unify/promiseManager.js?disableCache=0269
var promiseManager8 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0269
var shared8 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object23 = new shared8();
var shared_default8 = object23.get();
// framework/cache/platforms/Android/Mobile/Light/elements/fileUpload.js?disableCache=0269
var fileUpload7 = class extends input7 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager8();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0269
var delay20 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton7 = class extends icon7 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay20(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay20(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.icon.js?disableCache=0269
var fileIcon7 = class extends icon7 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton7();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.upload.js?disableCache=0269
var stream7 = class extends fileUpload7 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon7();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.list.js?disableCache=0269
var fileList7 = class extends panelRow7 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon7();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0269
var removeIcons7 = class extends icon7 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/page.js?disableCache=0269
var page7 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
height = "100vh";
padding = 0;
borderRadius = 0;
background = "#f2f2f2";
// background = "#000000";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Android/Mobile/Light/elements/image.js?disableCache=0269
var icon_id14 = 0;
var image7 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default14.createElement("img");
useCustomElement = true;
id = icon_id14++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0269
var previewImage7 = class extends image7 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0269
var imagePreviewWindow7 = class extends draggable13 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader7();
previewImage = new previewImage7();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0269
var fileChooserFileIcon7 = class extends icon7 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/checkbox.js?disableCache=0269
var checkbox7 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default14.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/fileChooser/fileChooser.file.js?disableCache=0269
var file7 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox7();
icon = new fileChooserFileIcon7();
label = new label13();
};
// framework/cache/platforms/Android/Mobile/Light/elements/fileChooser/fileChooser.files.js?disableCache=0269
var fileChooserFiles7 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file7();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0269
var fileChooserSelectButton7 = class extends button7 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/fileChooser/fileChooser.js?disableCache=0269
var fileChooser7 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles7();
selectButton = new fileChooserSelectButton7();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/fileManager/fileManager.js?disableCache=0269
var fileManager7 = class extends page7 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header7("Upload");
fileupload = new stream7();
filesHeader = new header7("Files");
removeIcons = new removeIcons7();
fileList = new fileList7();
previewWindow = new imagePreviewWindow7();
fileChooser = new fileChooser7();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.move.js?disableCache=0269
var animationBlock43 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel43 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow7 = class extends panelRow7 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel43("Move");
animationBlock = new animationBlock43();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.rotate.js?disableCache=0269
var animationBlock44 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel44 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row37 = class extends panelRow7 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel44("Rotate");
animationBlock = new animationBlock44();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.color.js?disableCache=0269
var animationBlock45 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel45 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row38 = class extends panelRow7 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel45("Background color");
animationBlock = new animationBlock45();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.skewX.js?disableCache=0269
var animationBlock46 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel46 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row39 = class extends panelRow7 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel46("skewX");
animationBlock = new animationBlock46();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0269
var animationBlock47 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel47 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row40 = class extends panelRow7 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel47("Rotate + Move + Background");
animationBlock = new animationBlock47();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.reverse.js?disableCache=0269
var animationBlock48 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton7 = class extends button7 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton7 = class extends button7 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton7 = class extends button7 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton7 = class extends button7 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton7 = class extends button7 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel48 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons13 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton7();
pauseButton = new pauseButton7();
stopButton = new stopButton7();
forwardButton = new forwardButton7();
backwardButton = new backwardButton7();
flexDirection = "column";
};
var row41 = class extends panelRow7 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel48("Reverse");
buttons = new buttons13();
animationBlock = new animationBlock48();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animation.render.js?disableCache=0269
var animationBlock49 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel49 = class extends label13 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row42 = class extends panelRow7 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel49("RenderLoop");
animationBlock = new animationBlock49();
};
// framework/cache/platforms/Android/Mobile/Light/demo/animations/animations.js?disableCache=0269
var animations7 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow7();
rotateAnimation = new row37();
backgroundColor = new row38();
skewX = new row39();
rotateMoveColor = new row40();
reverse = new row41();
render = new row42();
};
// framework/cache/platforms/Android/Mobile/Light/demo/examples/grids.js?disableCache=0269
var label14 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a7 = class extends input7 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b8 = class extends input7 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c7 = class extends input7 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d7 = class extends input7 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA7 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label14("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a7();
b = new b8();
c = new c7();
d = new d7();
};
var gridB7 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label14("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a7();
b = new b8();
c = new c7();
d = new d7();
};
var gridExample7 = class extends page7 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA7();
gridB = new gridB7();
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/header/user.userList.header.username.js?disableCache=0269
var userListHeaderUsername7 = class extends gridViewRowColumn7 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/header/user.userList.header.actions.js?disableCache=0269
var userListHeaderActions7 = class extends gridViewRowColumn7 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default7.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/header/user.userList.header.js?disableCache=0269
var userListHeader7 = class extends extender14(user8, gridViewTableRow7) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername7();
actions = new userListHeaderActions7();
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/user.userList.table.header.js?disableCache=0269
var userListTableHeader7 = class extends gridViewHeader7 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader7();
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/user.userList.table.body.js?disableCache=0269
var userListTableBody7 = class extends extender14(renderCollection9, gridViewTableHeader7) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE7(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default7.visitor, "READ");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/item/user.userList.item.username.js?disableCache=0269
var userListItemTitle7 = class extends extender14(username8, gridViewBodyColumn7) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0269
var deleteButton21 = class extends button7 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default7.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/item/user.userList.item.actions.js?disableCache=0269
var userListItemActions7 = class extends extender14(gridViewBodyColumn7, gridViewBodyColumn7) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton21();
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/item/user.userList.item.js?disableCache=0269
var userListItem7 = class extends extender14(user8, gridViewRow7) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle7();
actions = new userListItemActions7();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default7.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/user.userList.table.js?disableCache=0269
var userListTable7 = class extends gridView7 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader7();
body = new userListTableBody7(userListItem7, new collection11(user8));
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/search.js?disableCache=0269
var searchBar21 = class extends input7 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Mobile/Light/user/userList/user.userList.page.js?disableCache=0269
var editPage7 = class extends page7 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header7("Users");
search = new searchBar21();
userTable = new userListTable7();
flexDirection = "column";
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.username.js?disableCache=0269
var editUsername7 = class extends extender14(username8, input7) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.username.row.js?disableCache=0269
var usernameRow7 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label13("Username");
username = new editUsername7();
};
// framework/cache/platforms/Android/Mobile/Light/elements/empty.js?disableCache=0269
var empty7 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/user.edit.button.js?disableCache=0269
var userEditButton7 = class extends button7 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/user.edit.button.row.js?disableCache=0269
var saveButtonRow7 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty7();
userEditButton = new userEditButton7();
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0269
var checkRenderCollection7 = class extends renderCollection9 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default7.admin, "WRITE");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
this.allow(user_group_permission_default7.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.checkbox.js?disableCache=0269
var customCheckbox13 = class extends checkbox7 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0269
var customCheckbox14 = class extends user8 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label13();
checkbox = new customCheckbox13();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.checkbox.row.js?disableCache=0269
var checkboxRow7 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label13("Select users");
renderCollection = new checkRenderCollection7(customCheckbox14, new collection11(user8));
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.select.option.js?disableCache=0269
var customOption7 = class extends extender14(option7, user8) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0269
var customSelect14 = class extends renderCollection9 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default14.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default7.admin, "WRITE");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
this.allow(user_group_permission_default7.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.select.row.js?disableCache=0269
var optionRow7 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label13("Select user");
renderCollection = new customSelect14(customOption7, new collection11(user8));
};
// framework/cache/platforms/Android/Mobile/Light/user/edit/edit.user.js?disableCache=0269
var editUser7 = class extends extender14(user8, page7) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header7("Edit user");
usernameRow = new usernameRow7();
selectRow = new optionRow7();
checkboxRow = new checkboxRow7();
showSelectedUser = new customSelect14(customOption7, this.selectedUsers);
saveButtonRow = new saveButtonRow7();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default7.admin, "WRITE");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
this.allow(user_group_permission_default7.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/signup/signup.username.js?disableCache=0269
var signUpUsername7 = class extends extender14(username8, input7) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Light/elements/inputPassword.js?disableCache=0269
var inputPassword7 = class extends input7 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Mobile/Light/user/signup/signup.password.js?disableCache=0269
var signupPassword7 = class extends inputPassword7 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Android/Mobile/Light/user/signup/signup.passwordCheck.js?disableCache=0269
var signupPasswordCheck7 = class extends inputPassword7 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0269
var cookieManager8 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default8 = new cookieManager8();
// framework/cache/platforms/Android/Mobile/Light/user/signup/signup.button.js?disableCache=0269
var signupButton7 = class extends button7 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Android/Mobile/Light/user/signup/signup.customLabel.js?disableCache=0269
var customLabel14 = class extends label13 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Android/Mobile/Light/user/signup/user.signup.js?disableCache=0269
var signup7 = class extends extender14(user8, page7) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default14.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header7("Signup");
// Children
userLabel = new customLabel14("Username");
username = new signUpUsername7();
passwordLabel = new customLabel14("Password");
password = new signupPassword7();
passwordAgainLabel = new customLabel14("Password again");
passwordAgain = new signupPasswordCheck7();
signUpButton = new signupButton7();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default7.visitor, "PROCESS");
this.allow(user_group_permission_default7.member, "PROCESS");
this.allow(user_group_permission_default7.admin, "PROCESS");
}
};
// framework/cache/platforms/Android/Mobile/Light/user/signin/signin.username.js?disableCache=0269
var signinUsername7 = class extends extender14(username8, input7) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Android/Mobile/Light/user/user.password.js?disableCache=0269
var password7 = class extends inputPassword7 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Android/Mobile/Light/user/signin/signin.password.js?disableCache=0269
var signinPassword7 = class extends password7 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Android/Mobile/Light/user/signin/signin.button.js?disableCache=0269
var signinFormButton7 = class extends button7 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
//display = "none";
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0269
var unify8 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default8 = new unify8();
// framework/cache/platforms/Android/Mobile/Light/user/signin/signin.cancel.button.js?disableCache=0269
var cancelButton14 = class extends button7 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
};
// framework/cache/platforms/Android/Mobile/Light/user/signin/user.signin.js?disableCache=0269
var tussenObject7 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword7();
width = "100%";
};
var buttons14 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
width = "100vw";
position = "absolute";
bottom = "0";
cancelButton = new cancelButton14();
signinButton = new signinFormButton7();
};
var hint7 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin7 = class extends extender14(user8, page7) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint7();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default14.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header7("Signin");
//userLabel = new label("Username");
username = new signinUsername7();
//passwordLabel = new label("Password");
tussenObject = new tussenObject7();
buttons = new buttons14();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user8();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default8.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user8();
client2.user = visitor62;
client2.user.error = false;
unify_default8.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default8.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default7.visitor, "PROCESS");
this.allow(user_group_permission_default7.member, "PROCESS");
this.allow(user_group_permission_default7.admin, "PROCESS");
this.allow(user_group_permission_default7.member, "READ");
this.allow(user_group_permission_default7.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/rightSide/rightSide.js?disableCache=0509
var rightSide7 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages7();
signup = new signup7();
signin = new signin7();
settings = new settings7();
fileManager = new fileManager7();
animations = new animations7();
gridExample = new gridExample7();
userListPage = new editPage7();
editUser = new editUser7();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0509
var documentTool15 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object24 = new documentTool15();
var document_default15 = object24.getDocument();
// framework/unify/math/vector2.js?disableCache=0509
var vector221 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Android/Mobile/Light/elements/flexbox.js?disableCache=0509
var flexbox14 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Mobile/Light/elements/window/frostedGlass.js?disableCache=0509
var frostedGlass14 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Android/Mobile/Light/elements/window/draggable.js?disableCache=0509
var vector222 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay21(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay21, "delay");
var draggable14 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector222(0, 0);
grabPosition = new vector222(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector222(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay21(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector222(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Mobile/Light/demo/application.js
var application8 = class extends extender13(frostedGlass14, flexbox14, draggable14) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton7();
leftSide = new leftSide7();
rightSide = new rightSide7();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "column";
// Pragma's
lastPosition = new vector221(0, 0);
fontFamily = "android";
transform = "translate(0px, 0px)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default15.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector221(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0041
function extender15(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender15, "extender");
// framework/unify/extender.js?disableCache=0474
function extender16(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender16, "extender");
// framework/cache/platforms/Android/Mobile/Dark/elements/button.js?disableCache=0474
var button8 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
borderRadius = 40;
fontSize = 15;
margin = 20;
width = "-webkit-fill-available";
fontSize = 22;
fontWeight = "bold";
textAlign = "center";
padding = 20;
background = "#323232";
color = "white";
//border = "1px solid #3d3a3a";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#323232";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/icon.js?disableCache=0474
var icon_id15 = 0;
var icon8 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id15++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/minimizeButton.js?disableCache=0041
var minimizeButton8 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
top = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxHeight = "100vh";
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxHeight = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.js?disableCache=0474
var menuButton8 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
width = "80vw";
borderRadius = 18;
textAlign = "center";
padding = 20;
margin = "0 auto";
marginTop = 8;
fontSize = 20;
height = 24;
fontWeight = "600";
fontColor = "#313131";
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0474
var newsButton8 = class extends menuButton8 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
application32.minimizeButton.close();
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0474
var settingsButton22 = class extends menuButton8 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
application32.minimizeButton.close();
}
};
// framework/unify/collection.js?disableCache=0474
var collection12 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0474
var datatype_default9 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0474
var documentTool16 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object25 = new documentTool16();
var document_default16 = object25.getDocument();
// framework/cache/platforms/Android/Mobile/Dark/elements/option.js?disableCache=0474
var option8 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default16.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/group/user.group.js?disableCache=0474
var visitor16 = class extends option8 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member8 = class extends option8 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin15 = class extends option8 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups8 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member8();
admin = new admin15();
visitor = new visitor16();
};
// framework/cache/platforms/Android/Mobile/Dark/user/group/user.group.permission.js?disableCache=0474
var user_group_permission_default8 = new groups8();
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0474
var signinPageButton8 = class extends menuButton8 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
application32.minimizeButton.close();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0474
var signinButton8 = class extends menuButton8 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
application32.minimizeButton.close();
}
};
// framework/server/userManager.js?disableCache=0474
var visitor17 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager9 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor17();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default9 = new userManager9();
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0474
var signoutButton8 = class extends menuButton8 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default9.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default8.member, "PROCESS");
this.allow(user_group_permission_default8.admin, "PROCESS");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0474
var fileMangerButton8 = class extends menuButton8 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0474
var settingsButton23 = class extends menuButton8 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0474
var usersPageButton8 = class extends menuButton8 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
application32.minimizeButton.close();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default8.member, "PROCESS");
this.allow(user_group_permission_default8.admin, "PROCESS");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0474
var settingsButton24 = class extends menuButton8 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/header.js?disableCache=0474
var header8 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
padding = "0";
margin = 0;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.header.js?disableCache=0474
var menuHeader8 = class extends header8 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "flex";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/leftSide/leftSide.js?disableCache=0041
var leftSide8 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "100vh";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader8();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton8();
settingsButton = new settingsButton22();
usersButton = new usersPageButton8();
signinButton = new signinPageButton8();
signoutButton = new signoutButton8();
signupButton = new signinButton8();
animationsButton = new settingsButton23();
gridButton = new settingsButton24();
fileManagerButton = new fileMangerButton8();
};
// framework/unify/table.js?disableCache=0474
var table10 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0474
var column8 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/news.title.js?disableCache=0474
var title22 = class extends column8 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/news.body.js?disableCache=0474
var body15 = class extends column8 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/news.price.js?disableCache=0474
var price8 = class extends column8 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default9.REAL;
};
// framework/cache/platforms/Android/Mobile/Dark/user/user.username.js?disableCache=0474
var username9 = class extends column8 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0474
var tools10 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll9(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default9 = new tools10();
// framework/cache/platforms/Android/Mobile/Dark/elements/input.js?disableCache=0474
var input8 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default16.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
background = "white";
borderRadius = 16;
padding = 8;
paddingLeft = 16;
margin = 4;
fontSize = 18;
boxSizing = "border-box";
width = "92%";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default16.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default16.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/user.salt.js?disableCache=0474
var salt9 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default9.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Android/Mobile/Dark/user/user.hash.js?disableCache=0474
var hash9 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default9.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Android/Mobile/Dark/user/user.js?disableCache=0474
var user9 = class _user extends table10 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username9();
salt = new salt9();
hash = new hash9();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups8();
selectedUsers = new collection12(_user);
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/comment.body.js?disableCache=0474
var body16 = class extends column8 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/comment.title.js?disableCache=0474
var title23 = class extends column8 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/comment.js?disableCache=0474
var comment9 = class extends table10 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user9();
title = new title23();
body = new body16();
flexDirection = "column";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/news.js?disableCache=0474
var news8 = class extends table10 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title22();
body = new body15();
price = new price8();
comments = new collection12(comment9);
};
// framework/cache/platforms/Android/Mobile/Dark/elements/tableCell.js?disableCache=0474
var tableCell8 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0474
var sortBy8 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0474
var gridViewRowColumn8 = class extends tableCell8 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 20;
sortBy = new sortBy8();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/header/news.list.header.body.js?disableCache=0474
var newsListHeaderBody8 = class extends gridViewRowColumn8 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/header/news.list.header.title.js?disableCache=0474
var newsListHeaderTitle8 = class extends gridViewRowColumn8 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/header/news.list.header.price.js?disableCache=0474
var newsListHeaderPrice8 = class extends gridViewRowColumn8 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/header/news.list.header.actions.js?disableCache=0474
var newsListHeaderActions8 = class extends gridViewRowColumn8 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default8.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.header.row.js?disableCache=0474
var gridViewTableRow8 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/header/news.list.header.js?disableCache=0474
var newsListHeader8 = class extends extender16(news8, gridViewTableRow8) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody8();
title = new newsListHeaderTitle8();
price = new newsListHeaderPrice8();
actions = new newsListHeaderActions8();
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.header.js?disableCache=0474
var gridViewHeader8 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/news.list.table.header.js?disableCache=0474
var newsListTableHeader8 = class extends gridViewHeader8 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader8();
};
// framework/unify/renderCollection.js?disableCache=0474
var renderCollection10 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.body.js?disableCache=0474
var gridViewTableHeader8 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0474
function OR8(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR8, "OR");
// framework/unify/sql/LIKE.js?disableCache=0474
function LIKE8(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE8, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0474
function GREATER_OR_EQUAL8(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL8, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0474
function SMALLER_OR_EQUAL8(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL8, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Android/Mobile/Dark/demo/list/news.list.table.body.js?disableCache=0474
var newsListTableBody8 = class extends extender16(renderCollection10, gridViewTableHeader8) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR8(OR8(LIKE8(filter.title, searchTerm), LIKE8(filter.comments.body, searchTerm)), LIKE8(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL8(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL8(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default8.visitor, "READ");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0474
var gridViewBodyColumn8 = class extends tableCell8 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/item/news.list.item.body.js?disableCache=0474
var newsListItemBody8 = class extends extender16(body15, gridViewBodyColumn8) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/item/news.list.item.title.js?disableCache=0474
var newsListItemTitle8 = class extends extender16(title22, gridViewBodyColumn8) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/item/news.list.item.price.js?disableCache=0474
var newsListItemPrice8 = class extends extender16(price8, gridViewBodyColumn8) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0474
var deleteButton22 = class extends button8 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default8.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/item/news.list.item.actions.js?disableCache=0474
var newsListItemActions8 = class extends extender16(gridViewBodyColumn8, gridViewBodyColumn8) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton22();
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.body.row.js?disableCache=0474
var gridViewRow8 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/item/news.list.item.js?disableCache=0474
var newsListItem8 = class extends extender16(news8, gridViewRow8) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody8();
title = new newsListItemTitle8();
price = new newsListItemPrice8();
actions = new newsListItemActions8();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default8.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/gridView/gridView.js?disableCache=0474
var gridView8 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/list/news.list.table.js?disableCache=0474
var newsListTable8 = class extends gridView8 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader8();
body = new newsListTableBody8(newsListItem8, new collection12(news8));
};
// framework/cache/platforms/Android/Mobile/Dark/demo/edit/news.edit.title.js?disableCache=0474
var newsEditTitle8 = class extends extender16(input8, title22) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Android/Mobile/Dark/elements/textarea.js?disableCache=0474
var textarea8 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 4;
height = "auto";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default16.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/edit/news.edit.body.js?disableCache=0474
var newsPageBody15 = class extends extender16(body15, textarea8) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/edit/news.edit.button.js?disableCache=0474
var editButton15 = class extends button8 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/edit/news.edit.price.js?disableCache=0474
var newsPagePrice8 = class extends extender16(price8, input8) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/label.js?disableCache=0474
var label15 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/label/left.js?disableCache=0474
var leftLabel8 = class extends label15 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Android/Mobile/Dark/elements/panel.js?disableCache=0474
var panel8 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Android/Mobile/Dark/elements/window/draggable.js?disableCache=0474
var vector223 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay22(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay22, "delay");
var draggable15 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector223(0, 0);
grabPosition = new vector223(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector223(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay22(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector223(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/panel/row.js?disableCache=0474
var panelRow8 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/window/header.js?disableCache=0474
var maximizeButton8 = class extends icon8 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton8 = class extends icon8 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl8 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton8();
maximizeButton = new maximizeButton8();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title24 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl8 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader8 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl8();
title = new title24();
rightControl = new rightControl8();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/edit/news.edit.js?disableCache=0474
var newsBodyRow8 = class extends panelRow8 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel8("Message");
body = new newsPageBody15();
};
var newsTitleRow8 = class extends panelRow8 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel8("Title");
title = new newsEditTitle8();
};
var newsPriceRow8 = class extends panelRow8 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel8("Price");
price = new newsPagePrice8();
};
var cancelButton15 = class extends button8 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow8 = class extends panelRow8 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton15();
newsEditbutton = new editButton15();
};
var newsEdit8 = class extends extender16(news8, panel8, draggable15) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader8("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow8();
newsPriceRow = new newsPriceRow8();
newsBodyRow = new newsBodyRow8();
newsButtonRow = new newsButtonRow8();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
this.allow(user_group_permission_default8.visitor, "READ");
this.allow(user_group_permission_default8.member, "WRITE");
this.allow(user_group_permission_default8.admin, "WRITE");
this.allow(user_group_permission_default8.visitor, "WRITE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsDialogButton.js?disableCache=0474
var newsDialogButton8 = class extends button8 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/search.input.js?disableCache=0474
var searchBar22 = class extends input8 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/select.js?disableCache=0474
var select8 = class extends renderCollection10 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default16.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default8.admin, "READ");
this.allow(user_group_permission_default8.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default16.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/search.select.js?disableCache=0474
var customSelect15 = class extends select8 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/search.widget.js?disableCache=0474
var searchWidget8 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar22();
select = new customSelect15();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0474
var paginationItem8 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0474
var pagination8 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem8();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem8();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem8();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsItemPage.limit.js?disableCache=0474
var limit8 = class extends select8 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0474
var tableControl8 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label15("Select page:");
pagination = new pagination8();
limitLabel = new label15("Select items per page:");
limit = new limit8();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsItemPage.js?disableCache=0474
var testbutton8 = class extends button8 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage8 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = "100vw";
padding = "0";
newsListHeader = new header8("News Items");
searchWidget = new searchWidget8();
newsListTable = new newsListTable8();
tableControl = new tableControl8();
createNews = new newsEdit8();
testbutton = new testbutton8();
newsDialogButton = new newsDialogButton8();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
};
// framework/cache/platforms/Android/Mobile/Dark/elements/flexbox.js?disableCache=0474
var flexbox15 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/page/news.page.title.js?disableCache=0474
var newsPageTitle8 = class extends extender16(title22, flexbox15) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
borderRadius = "18px 18px 0 0";
width = "100%";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/page/news.page.body.js?disableCache=0474
var newsPageBody16 = class extends extender16(flexbox15, body15) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
borderRadius = "0 0 18px 18px";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/comments.messages.js?disableCache=0474
var commentsMessages8 = class extends renderCollection10 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR8(LIKE8(filter.body, this.value), LIKE8(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default8.visitor, "READ");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0474
var saveEditButton8 = class extends button8 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0474
var commentEditTitle15 = class extends title23 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0474
var commentEditBody15 = class extends extender16(body16, flexbox15) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default16.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0474
var userLabel15 = class extends label15 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0474
var deleteButton23 = class extends button8 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.editButton.js?disableCache=0474
var editButton16 = class extends button8 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.information.js?disableCache=0474
var information8 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton23();
_editButton = new editButton16();
_userLabel = new userLabel15();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/edit/comment.edit.js?disableCache=0474
var editComment8 = class extends comment9 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information8();
body = new commentEditBody15();
title = new commentEditTitle15();
saveButton = new saveEditButton8();
width = "-webkit-fill-available";
width = "100vw";
borderRadius = 18;
margin = 4;
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/create/comment.saveButton.js?disableCache=0474
var saveCommentButton8 = class extends button8 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/create/comment.create.body.js?disableCache=0474
var commentEditBody16 = class extends extender16(body16, textarea8) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/comment/create/comment.create.js?disableCache=0474
var createComment8 = class extends comment9 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody16();
saveButton = new saveCommentButton8();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default8.member, "WRITE");
this.allow(user_group_permission_default8.admin, "WRITE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/page/news.page.backButton.js?disableCache=0474
var backButton15 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/page/news.page.edit.button.js?disableCache=0474
var backButton16 = class extends button8 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/filler.js?disableCache=0474
var filler8 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/page/search.comments.js?disableCache=0474
var searchBar23 = class extends input8 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/page/news.page.js?disableCache=0474
var testDiv8 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle8();
};
var newsPage8 = class extends news8 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
flexDirection = "column";
_backButton = new backButton15();
_testDiv = new testDiv8();
body = new newsPageBody16();
editButton = new backButton16();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar23();
commentsMessages = new commentsMessages8(editComment8, this.comments);
createComment = new createComment8(this.comments);
filler = new filler8();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default8.member, "WRITE");
this.allow(user_group_permission_default8.admin, "WRITE");
this.allow(user_group_permission_default8.visitor, "WRITE");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
this.allow(user_group_permission_default8.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/newsPages.js?disableCache=0474
var newsPages8 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage8();
newsPage = new newsPage8();
newsEdit = new newsEdit8();
width = 1800;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/preloaders/simpleSpinner.js?disableCache=0474
var line8 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask8 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line8();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox8 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask8();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0474
var themaSelectorImage8 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0474
var selectLabel8 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/themeSelector.js?disableCache=0474
var themeSelector8 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage8();
selectLabel = new selectLabel8();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0474
var themeOSSelectorItem8 = class extends themeSelector8 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default9.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0474
var osSelectorList8 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem8("Windows");
themeMacOS = new themeOSSelectorItem8("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default9.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0474
var osLabel8 = class extends label15 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/os.js?disableCache=0474
var os8 = class extends panelRow8 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel8("Os");
osSelector = new osSelectorList8();
spinner = new preloaderBox8();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0474
var themeTintSelector8 = class extends themeSelector8 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default9.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0474
var themeTintSelectors8 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector8("Light");
themeDark = new themeTintSelector8("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default9.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0474
var customLabel15 = class extends label15 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/rows/tint.js?disableCache=0474
var tint8 = class extends panelRow8 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel15("Appearance");
themeTintSelectors = new themeTintSelectors8();
spinner = new preloaderBox8();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/appearance/panel.js?disableCache=0474
var appearancePanel8 = class extends panel8 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os8();
tint = new tint8();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/pages/settings.js?disableCache=0474
var settings8 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header8("Appearance");
appearancePanel = new appearancePanel8();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0474
var Console9 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default9 = new Console9();
// framework/unify/promiseManager.js?disableCache=0474
var promiseManager9 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0474
var shared9 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object26 = new shared9();
var shared_default9 = object26.get();
// framework/cache/platforms/Android/Mobile/Dark/elements/fileUpload.js?disableCache=0474
var fileUpload8 = class extends input8 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager9();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0474
var delay23 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton8 = class extends icon8 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay23(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay23(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.icon.js?disableCache=0474
var fileIcon8 = class extends icon8 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton8();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.upload.js?disableCache=0474
var stream8 = class extends fileUpload8 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon8();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.list.js?disableCache=0474
var fileList8 = class extends panelRow8 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon8();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0474
var removeIcons8 = class extends icon8 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/page.js?disableCache=0474
var page8 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
height = "100vh";
padding = 0;
borderRadius = 0;
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/image.js?disableCache=0474
var icon_id16 = 0;
var image8 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default16.createElement("img");
useCustomElement = true;
id = icon_id16++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0474
var previewImage8 = class extends image8 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0474
var imagePreviewWindow8 = class extends draggable15 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader8();
previewImage = new previewImage8();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0474
var fileChooserFileIcon8 = class extends icon8 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/checkbox.js?disableCache=0474
var checkbox8 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default16.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0474
var file8 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox8();
icon = new fileChooserFileIcon8();
label = new label15();
};
// framework/cache/platforms/Android/Mobile/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0474
var fileChooserFiles8 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file8();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0474
var fileChooserSelectButton8 = class extends button8 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/fileChooser/fileChooser.js?disableCache=0474
var fileChooser8 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles8();
selectButton = new fileChooserSelectButton8();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/fileManager/fileManager.js?disableCache=0474
var fileManager8 = class extends page8 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header8("Upload");
fileupload = new stream8();
filesHeader = new header8("Files");
removeIcons = new removeIcons8();
fileList = new fileList8();
previewWindow = new imagePreviewWindow8();
fileChooser = new fileChooser8();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.move.js?disableCache=0474
var animationBlock50 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel50 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow8 = class extends panelRow8 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel50("Move");
animationBlock = new animationBlock50();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.rotate.js?disableCache=0474
var animationBlock51 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel51 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row43 = class extends panelRow8 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel51("Rotate");
animationBlock = new animationBlock51();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.color.js?disableCache=0474
var animationBlock52 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel52 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row44 = class extends panelRow8 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel52("Background color");
animationBlock = new animationBlock52();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.skewX.js?disableCache=0474
var animationBlock53 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel53 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row45 = class extends panelRow8 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel53("skewX");
animationBlock = new animationBlock53();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0474
var animationBlock54 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel54 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row46 = class extends panelRow8 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel54("Rotate + Move + Background");
animationBlock = new animationBlock54();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.reverse.js?disableCache=0474
var animationBlock55 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton8 = class extends button8 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton8 = class extends button8 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton8 = class extends button8 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton8 = class extends button8 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton8 = class extends button8 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel55 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons15 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton8();
pauseButton = new pauseButton8();
stopButton = new stopButton8();
forwardButton = new forwardButton8();
backwardButton = new backwardButton8();
flexDirection = "column";
};
var row47 = class extends panelRow8 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel55("Reverse");
buttons = new buttons15();
animationBlock = new animationBlock55();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animation.render.js?disableCache=0474
var animationBlock56 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel56 = class extends label15 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row48 = class extends panelRow8 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel56("RenderLoop");
animationBlock = new animationBlock56();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/animations/animations.js?disableCache=0474
var animations8 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow8();
rotateAnimation = new row43();
backgroundColor = new row44();
skewX = new row45();
rotateMoveColor = new row46();
reverse = new row47();
render = new row48();
};
// framework/cache/platforms/Android/Mobile/Dark/demo/examples/grids.js?disableCache=0474
var label16 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a8 = class extends input8 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b9 = class extends input8 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c8 = class extends input8 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d8 = class extends input8 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA8 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label16("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a8();
b = new b9();
c = new c8();
d = new d8();
};
var gridB8 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label16("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a8();
b = new b9();
c = new c8();
d = new d8();
};
var gridExample8 = class extends page8 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA8();
gridB = new gridB8();
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/header/user.userList.header.username.js?disableCache=0474
var userListHeaderUsername8 = class extends gridViewRowColumn8 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0474
var userListHeaderActions8 = class extends gridViewRowColumn8 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default8.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/header/user.userList.header.js?disableCache=0474
var userListHeader8 = class extends extender16(user9, gridViewTableRow8) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername8();
actions = new userListHeaderActions8();
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/user.userList.table.header.js?disableCache=0474
var userListTableHeader8 = class extends gridViewHeader8 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader8();
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/user.userList.table.body.js?disableCache=0474
var userListTableBody8 = class extends extender16(renderCollection10, gridViewTableHeader8) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE8(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default8.visitor, "READ");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/item/user.userList.item.username.js?disableCache=0474
var userListItemTitle8 = class extends extender16(username9, gridViewBodyColumn8) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0474
var deleteButton24 = class extends button8 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default8.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0474
var userListItemActions8 = class extends extender16(gridViewBodyColumn8, gridViewBodyColumn8) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton24();
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/item/user.userList.item.js?disableCache=0474
var userListItem8 = class extends extender16(user9, gridViewRow8) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle8();
actions = new userListItemActions8();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default8.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/user.userList.table.js?disableCache=0474
var userListTable8 = class extends gridView8 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader8();
body = new userListTableBody8(userListItem8, new collection12(user9));
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/search.js?disableCache=0474
var searchBar24 = class extends input8 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/userList/user.userList.page.js?disableCache=0474
var editPage8 = class extends page8 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header8("Users");
search = new searchBar24();
userTable = new userListTable8();
flexDirection = "column";
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.username.js?disableCache=0474
var editUsername8 = class extends extender16(username9, input8) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.username.row.js?disableCache=0474
var usernameRow8 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label15("Username");
username = new editUsername8();
};
// framework/cache/platforms/Android/Mobile/Dark/elements/empty.js?disableCache=0474
var empty8 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/user.edit.button.js?disableCache=0474
var userEditButton8 = class extends button8 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/user.edit.button.row.js?disableCache=0474
var saveButtonRow8 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty8();
userEditButton = new userEditButton8();
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0474
var checkRenderCollection8 = class extends renderCollection10 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default8.admin, "WRITE");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
this.allow(user_group_permission_default8.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.checkbox.js?disableCache=0474
var customCheckbox15 = class extends checkbox8 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0474
var customCheckbox16 = class extends user9 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label15();
checkbox = new customCheckbox15();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0474
var checkboxRow8 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label15("Select users");
renderCollection = new checkRenderCollection8(customCheckbox16, new collection12(user9));
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.select.option.js?disableCache=0474
var customOption8 = class extends extender16(option8, user9) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0474
var customSelect16 = class extends renderCollection10 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default16.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default8.admin, "WRITE");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
this.allow(user_group_permission_default8.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.select.row.js?disableCache=0474
var optionRow8 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label15("Select user");
renderCollection = new customSelect16(customOption8, new collection12(user9));
};
// framework/cache/platforms/Android/Mobile/Dark/user/edit/edit.user.js?disableCache=0474
var editUser8 = class extends extender16(user9, page8) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header8("Edit user");
usernameRow = new usernameRow8();
selectRow = new optionRow8();
checkboxRow = new checkboxRow8();
showSelectedUser = new customSelect16(customOption8, this.selectedUsers);
saveButtonRow = new saveButtonRow8();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default8.admin, "WRITE");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
this.allow(user_group_permission_default8.visitor, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/signup/signup.username.js?disableCache=0474
var signUpUsername8 = class extends extender16(username9, input8) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/inputPassword.js?disableCache=0474
var inputPassword8 = class extends input8 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/signup/signup.password.js?disableCache=0474
var signupPassword8 = class extends inputPassword8 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Android/Mobile/Dark/user/signup/signup.passwordCheck.js?disableCache=0474
var signupPasswordCheck8 = class extends inputPassword8 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0474
var cookieManager9 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default9 = new cookieManager9();
// framework/cache/platforms/Android/Mobile/Dark/user/signup/signup.button.js?disableCache=0474
var signupButton8 = class extends button8 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/signup/signup.customLabel.js?disableCache=0474
var customLabel16 = class extends label15 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Android/Mobile/Dark/user/signup/user.signup.js?disableCache=0474
var signup8 = class extends extender16(user9, page8) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default16.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header8("Signup");
// Children
userLabel = new customLabel16("Username");
username = new signUpUsername8();
passwordLabel = new customLabel16("Password");
password = new signupPassword8();
passwordAgainLabel = new customLabel16("Password again");
passwordAgain = new signupPasswordCheck8();
signUpButton = new signupButton8();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default8.visitor, "PROCESS");
this.allow(user_group_permission_default8.member, "PROCESS");
this.allow(user_group_permission_default8.admin, "PROCESS");
}
};
// framework/cache/platforms/Android/Mobile/Dark/user/signin/signin.username.js?disableCache=0474
var signinUsername8 = class extends extender16(username9, input8) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Android/Mobile/Dark/user/user.password.js?disableCache=0474
var password8 = class extends inputPassword8 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Android/Mobile/Dark/user/signin/signin.password.js?disableCache=0474
var signinPassword8 = class extends password8 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Android/Mobile/Dark/user/signin/signin.button.js?disableCache=0474
var signinFormButton8 = class extends button8 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
//display = "none";
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0474
var unify9 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default9 = new unify9();
// framework/cache/platforms/Android/Mobile/Dark/user/signin/signin.cancel.button.js?disableCache=0474
var cancelButton16 = class extends button8 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
};
// framework/cache/platforms/Android/Mobile/Dark/user/signin/user.signin.js?disableCache=0474
var tussenObject8 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword8();
width = "100%";
};
var buttons16 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
width = "100vw";
position = "absolute";
bottom = "0";
cancelButton = new cancelButton16();
signinButton = new signinFormButton8();
};
var hint8 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin8 = class extends extender16(user9, page8) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint8();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default16.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header8("Signin");
//userLabel = new label("Username");
username = new signinUsername8();
//passwordLabel = new label("Password");
tussenObject = new tussenObject8();
buttons = new buttons16();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user9();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default9.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user9();
client2.user = visitor62;
client2.user.error = false;
unify_default9.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default9.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default8.visitor, "PROCESS");
this.allow(user_group_permission_default8.member, "PROCESS");
this.allow(user_group_permission_default8.admin, "PROCESS");
this.allow(user_group_permission_default8.member, "READ");
this.allow(user_group_permission_default8.admin, "READ");
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/rightSide/rightSide.js?disableCache=0041
var rightSide8 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages8();
signup = new signup8();
signin = new signin8();
settings = new settings8();
fileManager = new fileManager8();
animations = new animations8();
gridExample = new gridExample8();
userListPage = new editPage8();
editUser = new editUser8();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0041
var documentTool17 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object27 = new documentTool17();
var document_default17 = object27.getDocument();
// framework/unify/math/vector2.js?disableCache=0041
var vector224 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/flexbox.js?disableCache=0041
var flexbox16 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Mobile/Dark/elements/window/frostedGlass.js?disableCache=0041
var frostedGlass16 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Android/Mobile/Dark/elements/window/draggable.js?disableCache=0041
var vector225 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay24(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay24, "delay");
var draggable16 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector225(0, 0);
grabPosition = new vector225(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector225(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay24(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector225(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Mobile/Dark/demo/application.js
var application9 = class extends extender15(frostedGlass16, flexbox16, draggable16) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton8();
leftSide = new leftSide8();
rightSide = new rightSide8();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "column";
// Pragma's
lastPosition = new vector224(0, 0);
fontFamily = "android";
transform = "translate(0px, 0px)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default17.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector224(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0524
function extender17(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender17, "extender");
// framework/unify/extender.js?disableCache=0305
function extender18(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender18, "extender");
// framework/cache/platforms/Android/Tablet/Light/elements/button.js?disableCache=0305
var button9 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
borderRadius = 40;
fontSize = 15;
margin = 20;
width = "-webkit-fill-available";
fontSize = 22;
fontWeight = "bold";
textAlign = "center";
padding = 20;
background = "#f2f2f2";
color = "#019e7c";
hoverBackgroundColor = "#d9d9d9";
opaqueBackgroundColor = "#f2f2f2";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/icon.js?disableCache=0305
var icon_id17 = 0;
var icon9 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id17++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Android/Tablet/Light/demo/minimizeButton.js?disableCache=0524
var minimizeButton9 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
top = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxHeight = "100vh";
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxHeight = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.js?disableCache=0305
var menuButton9 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
width = "80vw";
borderRadius = 18;
textAlign = "center";
padding = 20;
margin = "0 auto";
marginTop = 8;
fontSize = 20;
height = 24;
fontWeight = "600";
fontColor = "#313131";
borderBottom = "1px solid #ececec";
background = "white";
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.news.js?disableCache=0305
var newsButton9 = class extends menuButton9 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
application32.minimizeButton.close();
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0305
var settingsButton25 = class extends menuButton9 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
application32.minimizeButton.close();
}
};
// framework/unify/collection.js?disableCache=0305
var collection13 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0305
var datatype_default10 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0305
var documentTool18 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object28 = new documentTool18();
var document_default18 = object28.getDocument();
// framework/cache/platforms/Android/Tablet/Light/elements/option.js?disableCache=0305
var option9 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default18.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Android/Tablet/Light/user/group/user.group.js?disableCache=0305
var visitor18 = class extends option9 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member9 = class extends option9 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin17 = class extends option9 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups9 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member9();
admin = new admin17();
visitor = new visitor18();
};
// framework/cache/platforms/Android/Tablet/Light/user/group/user.group.permission.js?disableCache=0305
var user_group_permission_default9 = new groups9();
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0305
var signinPageButton9 = class extends menuButton9 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
application32.minimizeButton.close();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0305
var signinButton9 = class extends menuButton9 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
application32.minimizeButton.close();
}
};
// framework/server/userManager.js?disableCache=0305
var visitor19 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager10 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor19();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default10 = new userManager10();
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0305
var signoutButton9 = class extends menuButton9 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default10.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default9.member, "PROCESS");
this.allow(user_group_permission_default9.admin, "PROCESS");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0305
var fileMangerButton9 = class extends menuButton9 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0305
var settingsButton26 = class extends menuButton9 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.users.js?disableCache=0305
var usersPageButton9 = class extends menuButton9 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
application32.minimizeButton.close();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default9.member, "PROCESS");
this.allow(user_group_permission_default9.admin, "PROCESS");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0305
var settingsButton27 = class extends menuButton9 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/header.js?disableCache=0305
var header9 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
padding = "0";
margin = 0;
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.header.js?disableCache=0305
var menuHeader9 = class extends header9 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "flex";
};
// framework/cache/platforms/Android/Tablet/Light/demo/leftSide/leftSide.js?disableCache=0524
var leftSide9 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "100vh";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader9();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
boxBackground = "#f2f2f2";
//background = "white";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton9();
settingsButton = new settingsButton25();
usersButton = new usersPageButton9();
signinButton = new signinPageButton9();
signoutButton = new signoutButton9();
signupButton = new signinButton9();
animationsButton = new settingsButton26();
gridButton = new settingsButton27();
fileManagerButton = new fileMangerButton9();
};
// framework/unify/table.js?disableCache=0305
var table11 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0305
var column9 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/news.title.js?disableCache=0305
var title25 = class extends column9 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/demo/news.body.js?disableCache=0305
var body17 = class extends column9 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/demo/news.price.js?disableCache=0305
var price9 = class extends column9 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default10.REAL;
};
// framework/cache/platforms/Android/Tablet/Light/user/user.username.js?disableCache=0305
var username10 = class extends column9 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0305
var tools11 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll10(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default10 = new tools11();
// framework/cache/platforms/Android/Tablet/Light/elements/input.js?disableCache=0305
var input9 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default18.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
background = "white";
borderRadius = 16;
padding = 8;
paddingLeft = 16;
margin = 4;
fontSize = 18;
boxSizing = "border-box";
width = "92%";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default18.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default18.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Android/Tablet/Light/user/user.salt.js?disableCache=0305
var salt10 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default10.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Android/Tablet/Light/user/user.hash.js?disableCache=0305
var hash10 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default10.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Android/Tablet/Light/user/user.js?disableCache=0305
var user10 = class _user extends table11 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username10();
salt = new salt10();
hash = new hash10();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups9();
selectedUsers = new collection13(_user);
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/comment.body.js?disableCache=0305
var body18 = class extends column9 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/comment.title.js?disableCache=0305
var title26 = class extends column9 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/comment.js?disableCache=0305
var comment10 = class extends table11 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user10();
title = new title26();
body = new body18();
flexDirection = "column";
};
// framework/cache/platforms/Android/Tablet/Light/demo/news.js?disableCache=0305
var news9 = class extends table11 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title25();
body = new body17();
price = new price9();
comments = new collection13(comment10);
};
// framework/cache/platforms/Android/Tablet/Light/elements/tableCell.js?disableCache=0305
var tableCell9 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0305
var sortBy9 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.header.row.column.js?disableCache=0305
var gridViewRowColumn9 = class extends tableCell9 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 20;
sortBy = new sortBy9();
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/header/news.list.header.body.js?disableCache=0305
var newsListHeaderBody9 = class extends gridViewRowColumn9 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/header/news.list.header.title.js?disableCache=0305
var newsListHeaderTitle9 = class extends gridViewRowColumn9 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/header/news.list.header.price.js?disableCache=0305
var newsListHeaderPrice9 = class extends gridViewRowColumn9 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/header/news.list.header.actions.js?disableCache=0305
var newsListHeaderActions9 = class extends gridViewRowColumn9 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default9.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.header.row.js?disableCache=0305
var gridViewTableRow9 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/header/news.list.header.js?disableCache=0305
var newsListHeader9 = class extends extender18(news9, gridViewTableRow9) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody9();
title = new newsListHeaderTitle9();
price = new newsListHeaderPrice9();
actions = new newsListHeaderActions9();
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.header.js?disableCache=0305
var gridViewHeader9 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/news.list.table.header.js?disableCache=0305
var newsListTableHeader9 = class extends gridViewHeader9 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader9();
};
// framework/unify/renderCollection.js?disableCache=0305
var renderCollection11 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.body.js?disableCache=0305
var gridViewTableHeader9 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0305
function OR9(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR9, "OR");
// framework/unify/sql/LIKE.js?disableCache=0305
function LIKE9(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE9, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0305
function GREATER_OR_EQUAL9(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL9, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0305
function SMALLER_OR_EQUAL9(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL9, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Android/Tablet/Light/demo/list/news.list.table.body.js?disableCache=0305
var newsListTableBody9 = class extends extender18(renderCollection11, gridViewTableHeader9) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR9(OR9(LIKE9(filter.title, searchTerm), LIKE9(filter.comments.body, searchTerm)), LIKE9(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL9(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL9(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default9.visitor, "READ");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.body.row.column.js?disableCache=0305
var gridViewBodyColumn9 = class extends tableCell9 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/item/news.list.item.body.js?disableCache=0305
var newsListItemBody9 = class extends extender18(body17, gridViewBodyColumn9) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/item/news.list.item.title.js?disableCache=0305
var newsListItemTitle9 = class extends extender18(title25, gridViewBodyColumn9) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/item/news.list.item.price.js?disableCache=0305
var newsListItemPrice9 = class extends extender18(price9, gridViewBodyColumn9) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0305
var deleteButton25 = class extends button9 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default9.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/item/news.list.item.actions.js?disableCache=0305
var newsListItemActions9 = class extends extender18(gridViewBodyColumn9, gridViewBodyColumn9) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton25();
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.body.row.js?disableCache=0305
var gridViewRow9 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/item/news.list.item.js?disableCache=0305
var newsListItem9 = class extends extender18(news9, gridViewRow9) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody9();
title = new newsListItemTitle9();
price = new newsListItemPrice9();
actions = new newsListItemActions9();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default9.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/gridView/gridView.js?disableCache=0305
var gridView9 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
background = "white";
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Light/demo/list/news.list.table.js?disableCache=0305
var newsListTable9 = class extends gridView9 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader9();
body = new newsListTableBody9(newsListItem9, new collection13(news9));
};
// framework/cache/platforms/Android/Tablet/Light/demo/edit/news.edit.title.js?disableCache=0305
var newsEditTitle9 = class extends extender18(input9, title25) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Android/Tablet/Light/elements/textarea.js?disableCache=0305
var textarea9 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 4;
height = "auto";
border = "1px solid #E5E5E5";
borderRadius = 20;
background = "white";
padding = 6;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default18.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/edit/news.edit.body.js?disableCache=0305
var newsPageBody17 = class extends extender18(body17, textarea9) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/edit/news.edit.button.js?disableCache=0305
var editButton17 = class extends button9 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/edit/news.edit.price.js?disableCache=0305
var newsPagePrice9 = class extends extender18(price9, input9) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/label.js?disableCache=0305
var label17 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Android/Tablet/Light/elements/label/left.js?disableCache=0305
var leftLabel9 = class extends label17 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Android/Tablet/Light/elements/panel.js?disableCache=0305
var panel9 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Android/Tablet/Light/elements/window/draggable.js?disableCache=0305
var vector226 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay25(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay25, "delay");
var draggable17 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector226(0, 0);
grabPosition = new vector226(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector226(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay25(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector226(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/panel/row.js?disableCache=0305
var panelRow9 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/window/header.js?disableCache=0305
var maximizeButton9 = class extends icon9 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton9 = class extends icon9 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl9 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton9();
maximizeButton = new maximizeButton9();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title27 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl9 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader9 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl9();
title = new title27();
rightControl = new rightControl9();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Android/Tablet/Light/demo/edit/news.edit.js?disableCache=0305
var newsBodyRow9 = class extends panelRow9 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel9("Message");
body = new newsPageBody17();
};
var newsTitleRow9 = class extends panelRow9 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel9("Title");
title = new newsEditTitle9();
};
var newsPriceRow9 = class extends panelRow9 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel9("Price");
price = new newsPagePrice9();
};
var cancelButton17 = class extends button9 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow9 = class extends panelRow9 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton17();
newsEditbutton = new editButton17();
};
var newsEdit9 = class extends extender18(news9, panel9, draggable17) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader9("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow9();
newsPriceRow = new newsPriceRow9();
newsBodyRow = new newsBodyRow9();
newsButtonRow = new newsButtonRow9();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
this.allow(user_group_permission_default9.visitor, "READ");
this.allow(user_group_permission_default9.member, "WRITE");
this.allow(user_group_permission_default9.admin, "WRITE");
this.allow(user_group_permission_default9.visitor, "WRITE");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsDialogButton.js?disableCache=0305
var newsDialogButton9 = class extends button9 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/search.input.js?disableCache=0305
var searchBar25 = class extends input9 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/select.js?disableCache=0305
var select9 = class extends renderCollection11 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default18.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default9.admin, "READ");
this.allow(user_group_permission_default9.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default18.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/search.select.js?disableCache=0305
var customSelect17 = class extends select9 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/search.widget.js?disableCache=0305
var searchWidget9 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar25();
select = new customSelect17();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0305
var paginationItem9 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsItemPage.pagination.js?disableCache=0305
var pagination9 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem9();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem9();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem9();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsItemPage.limit.js?disableCache=0305
var limit9 = class extends select9 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0305
var tableControl9 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label17("Select page:");
pagination = new pagination9();
limitLabel = new label17("Select items per page:");
limit = new limit9();
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsItemPage.js?disableCache=0305
var testbutton9 = class extends button9 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage9 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = "100vw";
padding = "0";
newsListHeader = new header9("News Items");
searchWidget = new searchWidget9();
newsListTable = new newsListTable9();
tableControl = new tableControl9();
createNews = new newsEdit9();
testbutton = new testbutton9();
newsDialogButton = new newsDialogButton9();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
background = "#f2f2f2";
};
// framework/cache/platforms/Android/Tablet/Light/elements/flexbox.js?disableCache=0305
var flexbox17 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Tablet/Light/demo/page/news.page.title.js?disableCache=0305
var newsPageTitle9 = class extends extender18(title25, flexbox17) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
borderRadius = "18px 18px 0 0";
width = "100%";
background = "white";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Android/Tablet/Light/demo/page/news.page.body.js?disableCache=0305
var newsPageBody18 = class extends extender18(flexbox17, body17) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
borderRadius = "0 0 18px 18px";
background = "white";
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/comments.messages.js?disableCache=0305
var commentsMessages9 = class extends renderCollection11 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR9(LIKE9(filter.body, this.value), LIKE9(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default9.visitor, "READ");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.saveButton.js?disableCache=0305
var saveEditButton9 = class extends button9 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.edit.title.js?disableCache=0305
var commentEditTitle17 = class extends title26 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.edit.body.js?disableCache=0305
var commentEditBody17 = class extends extender18(body18, flexbox17) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default18.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.userLabel.js?disableCache=0305
var userLabel17 = class extends label17 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0305
var deleteButton26 = class extends button9 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.editButton.js?disableCache=0305
var editButton18 = class extends button9 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.information.js?disableCache=0305
var information9 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton26();
_editButton = new editButton18();
_userLabel = new userLabel17();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/edit/comment.edit.js?disableCache=0305
var editComment9 = class extends comment10 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information9();
body = new commentEditBody17();
title = new commentEditTitle17();
saveButton = new saveEditButton9();
width = "-webkit-fill-available";
width = "100vw";
borderRadius = 18;
margin = 4;
background = "white";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/create/comment.saveButton.js?disableCache=0305
var saveCommentButton9 = class extends button9 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/create/comment.create.body.js?disableCache=0305
var commentEditBody18 = class extends extender18(body18, textarea9) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Android/Tablet/Light/demo/comment/create/comment.create.js?disableCache=0305
var createComment9 = class extends comment10 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody18();
saveButton = new saveCommentButton9();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default9.member, "WRITE");
this.allow(user_group_permission_default9.admin, "WRITE");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/page/news.page.backButton.js?disableCache=0305
var backButton17 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/page/news.page.edit.button.js?disableCache=0305
var backButton18 = class extends button9 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/filler.js?disableCache=0305
var filler9 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Android/Tablet/Light/demo/page/search.comments.js?disableCache=0305
var searchBar26 = class extends input9 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/page/news.page.js?disableCache=0305
var testDiv9 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle9();
};
var newsPage9 = class extends news9 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
background = "#f2f2f2";
flexDirection = "column";
_backButton = new backButton17();
_testDiv = new testDiv9();
body = new newsPageBody18();
editButton = new backButton18();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar26();
commentsMessages = new commentsMessages9(editComment9, this.comments);
createComment = new createComment9(this.comments);
filler = new filler9();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default9.member, "WRITE");
this.allow(user_group_permission_default9.admin, "WRITE");
this.allow(user_group_permission_default9.visitor, "WRITE");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
this.allow(user_group_permission_default9.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/newsPages.js?disableCache=0305
var newsPages9 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage9();
newsPage = new newsPage9();
newsEdit = new newsEdit9();
width = 1800;
};
// framework/cache/platforms/Android/Tablet/Light/elements/preloaders/simpleSpinner.js?disableCache=0305
var line9 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask9 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line9();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox9 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask9();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0305
var themaSelectorImage9 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0305
var selectLabel9 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/themeSelector.js?disableCache=0305
var themeSelector9 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage9();
selectLabel = new selectLabel9();
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0305
var themeOSSelectorItem9 = class extends themeSelector9 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default10.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0305
var osSelectorList9 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem9("Windows");
themeMacOS = new themeOSSelectorItem9("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default10.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/os.label.js?disableCache=0305
var osLabel9 = class extends label17 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/os.js?disableCache=0305
var os9 = class extends panelRow9 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel9("Os");
osSelector = new osSelectorList9();
spinner = new preloaderBox9();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0305
var themeTintSelector9 = class extends themeSelector9 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default10.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0305
var themeTintSelectors9 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector9("Light");
themeDark = new themeTintSelector9("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default10.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0305
var customLabel17 = class extends label17 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/rows/tint.js?disableCache=0305
var tint9 = class extends panelRow9 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel17("Appearance");
themeTintSelectors = new themeTintSelectors9();
spinner = new preloaderBox9();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/appearance/panel.js?disableCache=0305
var appearancePanel9 = class extends panel9 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os9();
tint = new tint9();
};
// framework/cache/platforms/Android/Tablet/Light/demo/pages/settings.js?disableCache=0305
var settings9 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header9("Appearance");
appearancePanel = new appearancePanel9();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0305
var Console10 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default10 = new Console10();
// framework/unify/promiseManager.js?disableCache=0305
var promiseManager10 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0305
var shared10 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object29 = new shared10();
var shared_default10 = object29.get();
// framework/cache/platforms/Android/Tablet/Light/elements/fileUpload.js?disableCache=0305
var fileUpload9 = class extends input9 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager10();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0305
var delay26 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton9 = class extends icon9 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay26(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay26(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.icon.js?disableCache=0305
var fileIcon9 = class extends icon9 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton9();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.upload.js?disableCache=0305
var stream9 = class extends fileUpload9 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon9();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.list.js?disableCache=0305
var fileList9 = class extends panelRow9 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon9();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0305
var removeIcons9 = class extends icon9 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/page.js?disableCache=0305
var page9 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
height = "100vh";
padding = 0;
borderRadius = 0;
background = "#f2f2f2";
// background = "#000000";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Android/Tablet/Light/elements/image.js?disableCache=0305
var icon_id18 = 0;
var image9 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default18.createElement("img");
useCustomElement = true;
id = icon_id18++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0305
var previewImage9 = class extends image9 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0305
var imagePreviewWindow9 = class extends draggable17 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader9();
previewImage = new previewImage9();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0305
var fileChooserFileIcon9 = class extends icon9 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/checkbox.js?disableCache=0305
var checkbox9 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default18.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/fileChooser/fileChooser.file.js?disableCache=0305
var file9 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox9();
icon = new fileChooserFileIcon9();
label = new label17();
};
// framework/cache/platforms/Android/Tablet/Light/elements/fileChooser/fileChooser.files.js?disableCache=0305
var fileChooserFiles9 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file9();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0305
var fileChooserSelectButton9 = class extends button9 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/fileChooser/fileChooser.js?disableCache=0305
var fileChooser9 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles9();
selectButton = new fileChooserSelectButton9();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/fileManager/fileManager.js?disableCache=0305
var fileManager9 = class extends page9 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header9("Upload");
fileupload = new stream9();
filesHeader = new header9("Files");
removeIcons = new removeIcons9();
fileList = new fileList9();
previewWindow = new imagePreviewWindow9();
fileChooser = new fileChooser9();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.move.js?disableCache=0305
var animationBlock57 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel57 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow9 = class extends panelRow9 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel57("Move");
animationBlock = new animationBlock57();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.rotate.js?disableCache=0305
var animationBlock58 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel58 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row49 = class extends panelRow9 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel58("Rotate");
animationBlock = new animationBlock58();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.color.js?disableCache=0305
var animationBlock59 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel59 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row50 = class extends panelRow9 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel59("Background color");
animationBlock = new animationBlock59();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.skewX.js?disableCache=0305
var animationBlock60 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel60 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row51 = class extends panelRow9 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel60("skewX");
animationBlock = new animationBlock60();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0305
var animationBlock61 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel61 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row52 = class extends panelRow9 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel61("Rotate + Move + Background");
animationBlock = new animationBlock61();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.reverse.js?disableCache=0305
var animationBlock62 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton9 = class extends button9 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton9 = class extends button9 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton9 = class extends button9 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton9 = class extends button9 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton9 = class extends button9 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel62 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons17 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton9();
pauseButton = new pauseButton9();
stopButton = new stopButton9();
forwardButton = new forwardButton9();
backwardButton = new backwardButton9();
flexDirection = "column";
};
var row53 = class extends panelRow9 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel62("Reverse");
buttons = new buttons17();
animationBlock = new animationBlock62();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animation.render.js?disableCache=0305
var animationBlock63 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel63 = class extends label17 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row54 = class extends panelRow9 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel63("RenderLoop");
animationBlock = new animationBlock63();
};
// framework/cache/platforms/Android/Tablet/Light/demo/animations/animations.js?disableCache=0305
var animations9 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow9();
rotateAnimation = new row49();
backgroundColor = new row50();
skewX = new row51();
rotateMoveColor = new row52();
reverse = new row53();
render = new row54();
};
// framework/cache/platforms/Android/Tablet/Light/demo/examples/grids.js?disableCache=0305
var label18 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a9 = class extends input9 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b10 = class extends input9 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c9 = class extends input9 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d9 = class extends input9 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA9 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label18("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a9();
b = new b10();
c = new c9();
d = new d9();
};
var gridB9 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label18("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a9();
b = new b10();
c = new c9();
d = new d9();
};
var gridExample9 = class extends page9 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA9();
gridB = new gridB9();
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/header/user.userList.header.username.js?disableCache=0305
var userListHeaderUsername9 = class extends gridViewRowColumn9 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/header/user.userList.header.actions.js?disableCache=0305
var userListHeaderActions9 = class extends gridViewRowColumn9 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default9.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/header/user.userList.header.js?disableCache=0305
var userListHeader9 = class extends extender18(user10, gridViewTableRow9) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername9();
actions = new userListHeaderActions9();
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/user.userList.table.header.js?disableCache=0305
var userListTableHeader9 = class extends gridViewHeader9 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader9();
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/user.userList.table.body.js?disableCache=0305
var userListTableBody9 = class extends extender18(renderCollection11, gridViewTableHeader9) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE9(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default9.visitor, "READ");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/item/user.userList.item.username.js?disableCache=0305
var userListItemTitle9 = class extends extender18(username10, gridViewBodyColumn9) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0305
var deleteButton27 = class extends button9 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default9.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/item/user.userList.item.actions.js?disableCache=0305
var userListItemActions9 = class extends extender18(gridViewBodyColumn9, gridViewBodyColumn9) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton27();
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/item/user.userList.item.js?disableCache=0305
var userListItem9 = class extends extender18(user10, gridViewRow9) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle9();
actions = new userListItemActions9();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default9.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/user.userList.table.js?disableCache=0305
var userListTable9 = class extends gridView9 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader9();
body = new userListTableBody9(userListItem9, new collection13(user10));
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/search.js?disableCache=0305
var searchBar27 = class extends input9 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Tablet/Light/user/userList/user.userList.page.js?disableCache=0305
var editPage9 = class extends page9 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header9("Users");
search = new searchBar27();
userTable = new userListTable9();
flexDirection = "column";
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.username.js?disableCache=0305
var editUsername9 = class extends extender18(username10, input9) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.username.row.js?disableCache=0305
var usernameRow9 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label17("Username");
username = new editUsername9();
};
// framework/cache/platforms/Android/Tablet/Light/elements/empty.js?disableCache=0305
var empty9 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/user.edit.button.js?disableCache=0305
var userEditButton9 = class extends button9 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/user.edit.button.row.js?disableCache=0305
var saveButtonRow9 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty9();
userEditButton = new userEditButton9();
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0305
var checkRenderCollection9 = class extends renderCollection11 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default9.admin, "WRITE");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
this.allow(user_group_permission_default9.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.checkbox.js?disableCache=0305
var customCheckbox17 = class extends checkbox9 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0305
var customCheckbox18 = class extends user10 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label17();
checkbox = new customCheckbox17();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.checkbox.row.js?disableCache=0305
var checkboxRow9 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label17("Select users");
renderCollection = new checkRenderCollection9(customCheckbox18, new collection13(user10));
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.select.option.js?disableCache=0305
var customOption9 = class extends extender18(option9, user10) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0305
var customSelect18 = class extends renderCollection11 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default18.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default9.admin, "WRITE");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
this.allow(user_group_permission_default9.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.select.row.js?disableCache=0305
var optionRow9 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label17("Select user");
renderCollection = new customSelect18(customOption9, new collection13(user10));
};
// framework/cache/platforms/Android/Tablet/Light/user/edit/edit.user.js?disableCache=0305
var editUser9 = class extends extender18(user10, page9) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header9("Edit user");
usernameRow = new usernameRow9();
selectRow = new optionRow9();
checkboxRow = new checkboxRow9();
showSelectedUser = new customSelect18(customOption9, this.selectedUsers);
saveButtonRow = new saveButtonRow9();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default9.admin, "WRITE");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
this.allow(user_group_permission_default9.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/signup/signup.username.js?disableCache=0305
var signUpUsername9 = class extends extender18(username10, input9) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Light/elements/inputPassword.js?disableCache=0305
var inputPassword9 = class extends input9 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Tablet/Light/user/signup/signup.password.js?disableCache=0305
var signupPassword9 = class extends inputPassword9 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Android/Tablet/Light/user/signup/signup.passwordCheck.js?disableCache=0305
var signupPasswordCheck9 = class extends inputPassword9 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0305
var cookieManager10 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default10 = new cookieManager10();
// framework/cache/platforms/Android/Tablet/Light/user/signup/signup.button.js?disableCache=0305
var signupButton9 = class extends button9 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Android/Tablet/Light/user/signup/signup.customLabel.js?disableCache=0305
var customLabel18 = class extends label17 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Android/Tablet/Light/user/signup/user.signup.js?disableCache=0305
var signup9 = class extends extender18(user10, page9) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default18.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header9("Signup");
// Children
userLabel = new customLabel18("Username");
username = new signUpUsername9();
passwordLabel = new customLabel18("Password");
password = new signupPassword9();
passwordAgainLabel = new customLabel18("Password again");
passwordAgain = new signupPasswordCheck9();
signUpButton = new signupButton9();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default9.visitor, "PROCESS");
this.allow(user_group_permission_default9.member, "PROCESS");
this.allow(user_group_permission_default9.admin, "PROCESS");
}
};
// framework/cache/platforms/Android/Tablet/Light/user/signin/signin.username.js?disableCache=0305
var signinUsername9 = class extends extender18(username10, input9) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Android/Tablet/Light/user/user.password.js?disableCache=0305
var password9 = class extends inputPassword9 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Android/Tablet/Light/user/signin/signin.password.js?disableCache=0305
var signinPassword9 = class extends password9 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Android/Tablet/Light/user/signin/signin.button.js?disableCache=0305
var signinFormButton9 = class extends button9 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
//display = "none";
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0305
var unify10 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default10 = new unify10();
// framework/cache/platforms/Android/Tablet/Light/user/signin/signin.cancel.button.js?disableCache=0305
var cancelButton18 = class extends button9 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
};
// framework/cache/platforms/Android/Tablet/Light/user/signin/user.signin.js?disableCache=0305
var tussenObject9 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword9();
width = "100%";
};
var buttons18 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
width = "100vw";
position = "absolute";
bottom = "0";
cancelButton = new cancelButton18();
signinButton = new signinFormButton9();
};
var hint9 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin9 = class extends extender18(user10, page9) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint9();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default18.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header9("Signin");
//userLabel = new label("Username");
username = new signinUsername9();
//passwordLabel = new label("Password");
tussenObject = new tussenObject9();
buttons = new buttons18();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user10();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default10.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user10();
client2.user = visitor62;
client2.user.error = false;
unify_default10.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default10.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default9.visitor, "PROCESS");
this.allow(user_group_permission_default9.member, "PROCESS");
this.allow(user_group_permission_default9.admin, "PROCESS");
this.allow(user_group_permission_default9.member, "READ");
this.allow(user_group_permission_default9.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/rightSide/rightSide.js?disableCache=0524
var rightSide9 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages9();
signup = new signup9();
signin = new signin9();
settings = new settings9();
fileManager = new fileManager9();
animations = new animations9();
gridExample = new gridExample9();
userListPage = new editPage9();
editUser = new editUser9();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0524
var documentTool19 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object30 = new documentTool19();
var document_default19 = object30.getDocument();
// framework/unify/math/vector2.js?disableCache=0524
var vector227 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Android/Tablet/Light/elements/flexbox.js?disableCache=0524
var flexbox18 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Tablet/Light/elements/window/frostedGlass.js?disableCache=0524
var frostedGlass18 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Android/Tablet/Light/elements/window/draggable.js?disableCache=0524
var vector228 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay27(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay27, "delay");
var draggable18 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector228(0, 0);
grabPosition = new vector228(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector228(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay27(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector228(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Tablet/Light/demo/application.js
var application10 = class extends extender17(frostedGlass18, flexbox18, draggable18) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton9();
leftSide = new leftSide9();
rightSide = new rightSide9();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "column";
// Pragma's
lastPosition = new vector227(0, 0);
fontFamily = "android";
transform = "translate(0px, 0px)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default19.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector227(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0448
function extender19(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender19, "extender");
// framework/unify/extender.js?disableCache=0507
function extender20(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender20, "extender");
// framework/cache/platforms/Android/Tablet/Dark/elements/button.js?disableCache=0507
var button10 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
borderRadius = 40;
fontSize = 15;
margin = 20;
width = "-webkit-fill-available";
fontSize = 22;
fontWeight = "bold";
textAlign = "center";
padding = 20;
background = "#323232";
color = "white";
//border = "1px solid #3d3a3a";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#323232";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/icon.js?disableCache=0507
var icon_id19 = 0;
var icon10 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id19++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/minimizeButton.js?disableCache=0448
var minimizeButton10 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
top = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxHeight = "100vh";
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxHeight = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.js?disableCache=0507
var menuButton10 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
width = "80vw";
borderRadius = 18;
textAlign = "center";
padding = 20;
margin = "0 auto";
marginTop = 8;
fontSize = 20;
height = 24;
fontWeight = "600";
fontColor = "#313131";
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0507
var newsButton10 = class extends menuButton10 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
application32.minimizeButton.close();
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0507
var settingsButton28 = class extends menuButton10 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
application32.minimizeButton.close();
}
};
// framework/unify/collection.js?disableCache=0507
var collection14 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0507
var datatype_default11 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0507
var documentTool20 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object31 = new documentTool20();
var document_default20 = object31.getDocument();
// framework/cache/platforms/Android/Tablet/Dark/elements/option.js?disableCache=0507
var option10 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default20.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/group/user.group.js?disableCache=0507
var visitor20 = class extends option10 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member10 = class extends option10 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin19 = class extends option10 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups10 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member10();
admin = new admin19();
visitor = new visitor20();
};
// framework/cache/platforms/Android/Tablet/Dark/user/group/user.group.permission.js?disableCache=0507
var user_group_permission_default10 = new groups10();
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0507
var signinPageButton10 = class extends menuButton10 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
application32.minimizeButton.close();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0507
var signinButton10 = class extends menuButton10 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
application32.minimizeButton.close();
}
};
// framework/server/userManager.js?disableCache=0507
var visitor21 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager11 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor21();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default11 = new userManager11();
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0507
var signoutButton10 = class extends menuButton10 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default11.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default10.member, "PROCESS");
this.allow(user_group_permission_default10.admin, "PROCESS");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0507
var fileMangerButton10 = class extends menuButton10 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0507
var settingsButton29 = class extends menuButton10 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0507
var usersPageButton10 = class extends menuButton10 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
application32.minimizeButton.close();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default10.member, "PROCESS");
this.allow(user_group_permission_default10.admin, "PROCESS");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0507
var settingsButton30 = class extends menuButton10 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/header.js?disableCache=0507
var header10 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
padding = "0";
margin = 0;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.header.js?disableCache=0507
var menuHeader10 = class extends header10 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "flex";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/leftSide/leftSide.js?disableCache=0448
var leftSide10 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "100vh";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader10();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton10();
settingsButton = new settingsButton28();
usersButton = new usersPageButton10();
signinButton = new signinPageButton10();
signoutButton = new signoutButton10();
signupButton = new signinButton10();
animationsButton = new settingsButton29();
gridButton = new settingsButton30();
fileManagerButton = new fileMangerButton10();
};
// framework/unify/table.js?disableCache=0507
var table12 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0507
var column10 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/news.title.js?disableCache=0507
var title28 = class extends column10 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/news.body.js?disableCache=0507
var body19 = class extends column10 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/news.price.js?disableCache=0507
var price10 = class extends column10 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default11.REAL;
};
// framework/cache/platforms/Android/Tablet/Dark/user/user.username.js?disableCache=0507
var username11 = class extends column10 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0507
var tools12 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll11(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default11 = new tools12();
// framework/cache/platforms/Android/Tablet/Dark/elements/input.js?disableCache=0507
var input10 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default20.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
background = "white";
borderRadius = 16;
padding = 8;
paddingLeft = 16;
margin = 4;
fontSize = 18;
boxSizing = "border-box";
width = "92%";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default20.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default20.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/user.salt.js?disableCache=0507
var salt11 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default11.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Android/Tablet/Dark/user/user.hash.js?disableCache=0507
var hash11 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default11.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Android/Tablet/Dark/user/user.js?disableCache=0507
var user11 = class _user extends table12 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username11();
salt = new salt11();
hash = new hash11();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups10();
selectedUsers = new collection14(_user);
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/comment.body.js?disableCache=0507
var body20 = class extends column10 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/comment.title.js?disableCache=0507
var title29 = class extends column10 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/comment.js?disableCache=0507
var comment11 = class extends table12 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user11();
title = new title29();
body = new body20();
flexDirection = "column";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/news.js?disableCache=0507
var news10 = class extends table12 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title28();
body = new body19();
price = new price10();
comments = new collection14(comment11);
};
// framework/cache/platforms/Android/Tablet/Dark/elements/tableCell.js?disableCache=0507
var tableCell10 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0507
var sortBy10 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0507
var gridViewRowColumn10 = class extends tableCell10 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 20;
sortBy = new sortBy10();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/header/news.list.header.body.js?disableCache=0507
var newsListHeaderBody10 = class extends gridViewRowColumn10 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/header/news.list.header.title.js?disableCache=0507
var newsListHeaderTitle10 = class extends gridViewRowColumn10 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/header/news.list.header.price.js?disableCache=0507
var newsListHeaderPrice10 = class extends gridViewRowColumn10 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/header/news.list.header.actions.js?disableCache=0507
var newsListHeaderActions10 = class extends gridViewRowColumn10 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default10.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.header.row.js?disableCache=0507
var gridViewTableRow10 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/header/news.list.header.js?disableCache=0507
var newsListHeader10 = class extends extender20(news10, gridViewTableRow10) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody10();
title = new newsListHeaderTitle10();
price = new newsListHeaderPrice10();
actions = new newsListHeaderActions10();
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.header.js?disableCache=0507
var gridViewHeader10 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/news.list.table.header.js?disableCache=0507
var newsListTableHeader10 = class extends gridViewHeader10 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader10();
};
// framework/unify/renderCollection.js?disableCache=0507
var renderCollection12 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.body.js?disableCache=0507
var gridViewTableHeader10 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0507
function OR10(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR10, "OR");
// framework/unify/sql/LIKE.js?disableCache=0507
function LIKE10(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE10, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0507
function GREATER_OR_EQUAL10(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL10, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0507
function SMALLER_OR_EQUAL10(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL10, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Android/Tablet/Dark/demo/list/news.list.table.body.js?disableCache=0507
var newsListTableBody10 = class extends extender20(renderCollection12, gridViewTableHeader10) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR10(OR10(LIKE10(filter.title, searchTerm), LIKE10(filter.comments.body, searchTerm)), LIKE10(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL10(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL10(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default10.visitor, "READ");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0507
var gridViewBodyColumn10 = class extends tableCell10 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/item/news.list.item.body.js?disableCache=0507
var newsListItemBody10 = class extends extender20(body19, gridViewBodyColumn10) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/item/news.list.item.title.js?disableCache=0507
var newsListItemTitle10 = class extends extender20(title28, gridViewBodyColumn10) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/item/news.list.item.price.js?disableCache=0507
var newsListItemPrice10 = class extends extender20(price10, gridViewBodyColumn10) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0507
var deleteButton28 = class extends button10 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default10.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/item/news.list.item.actions.js?disableCache=0507
var newsListItemActions10 = class extends extender20(gridViewBodyColumn10, gridViewBodyColumn10) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton28();
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.body.row.js?disableCache=0507
var gridViewRow10 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/item/news.list.item.js?disableCache=0507
var newsListItem10 = class extends extender20(news10, gridViewRow10) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody10();
title = new newsListItemTitle10();
price = new newsListItemPrice10();
actions = new newsListItemActions10();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default10.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/gridView/gridView.js?disableCache=0507
var gridView10 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/list/news.list.table.js?disableCache=0507
var newsListTable10 = class extends gridView10 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader10();
body = new newsListTableBody10(newsListItem10, new collection14(news10));
};
// framework/cache/platforms/Android/Tablet/Dark/demo/edit/news.edit.title.js?disableCache=0507
var newsEditTitle10 = class extends extender20(input10, title28) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Android/Tablet/Dark/elements/textarea.js?disableCache=0507
var textarea10 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 4;
height = "auto";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default20.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/edit/news.edit.body.js?disableCache=0507
var newsPageBody19 = class extends extender20(body19, textarea10) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/edit/news.edit.button.js?disableCache=0507
var editButton19 = class extends button10 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/edit/news.edit.price.js?disableCache=0507
var newsPagePrice10 = class extends extender20(price10, input10) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/label.js?disableCache=0507
var label19 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/label/left.js?disableCache=0507
var leftLabel10 = class extends label19 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Android/Tablet/Dark/elements/panel.js?disableCache=0507
var panel10 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Android/Tablet/Dark/elements/window/draggable.js?disableCache=0507
var vector229 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay28(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay28, "delay");
var draggable19 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector229(0, 0);
grabPosition = new vector229(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector229(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay28(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector229(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/panel/row.js?disableCache=0507
var panelRow10 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/window/header.js?disableCache=0507
var maximizeButton10 = class extends icon10 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton10 = class extends icon10 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl10 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton10();
maximizeButton = new maximizeButton10();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title30 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl10 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader10 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl10();
title = new title30();
rightControl = new rightControl10();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/edit/news.edit.js?disableCache=0507
var newsBodyRow10 = class extends panelRow10 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel10("Message");
body = new newsPageBody19();
};
var newsTitleRow10 = class extends panelRow10 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel10("Title");
title = new newsEditTitle10();
};
var newsPriceRow10 = class extends panelRow10 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel10("Price");
price = new newsPagePrice10();
};
var cancelButton19 = class extends button10 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow10 = class extends panelRow10 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton19();
newsEditbutton = new editButton19();
};
var newsEdit10 = class extends extender20(news10, panel10, draggable19) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader10("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow10();
newsPriceRow = new newsPriceRow10();
newsBodyRow = new newsBodyRow10();
newsButtonRow = new newsButtonRow10();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
this.allow(user_group_permission_default10.visitor, "READ");
this.allow(user_group_permission_default10.member, "WRITE");
this.allow(user_group_permission_default10.admin, "WRITE");
this.allow(user_group_permission_default10.visitor, "WRITE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsDialogButton.js?disableCache=0507
var newsDialogButton10 = class extends button10 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/search.input.js?disableCache=0507
var searchBar28 = class extends input10 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/select.js?disableCache=0507
var select10 = class extends renderCollection12 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default20.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default10.admin, "READ");
this.allow(user_group_permission_default10.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default20.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/search.select.js?disableCache=0507
var customSelect19 = class extends select10 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/search.widget.js?disableCache=0507
var searchWidget10 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar28();
select = new customSelect19();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0507
var paginationItem10 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0507
var pagination10 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem10();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem10();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem10();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsItemPage.limit.js?disableCache=0507
var limit10 = class extends select10 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0507
var tableControl10 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label19("Select page:");
pagination = new pagination10();
limitLabel = new label19("Select items per page:");
limit = new limit10();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsItemPage.js?disableCache=0507
var testbutton10 = class extends button10 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage10 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = "100vw";
padding = "0";
newsListHeader = new header10("News Items");
searchWidget = new searchWidget10();
newsListTable = new newsListTable10();
tableControl = new tableControl10();
createNews = new newsEdit10();
testbutton = new testbutton10();
newsDialogButton = new newsDialogButton10();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
};
// framework/cache/platforms/Android/Tablet/Dark/elements/flexbox.js?disableCache=0507
var flexbox19 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/page/news.page.title.js?disableCache=0507
var newsPageTitle10 = class extends extender20(title28, flexbox19) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
borderRadius = "18px 18px 0 0";
width = "100%";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/page/news.page.body.js?disableCache=0507
var newsPageBody20 = class extends extender20(flexbox19, body19) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
borderRadius = "0 0 18px 18px";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/comments.messages.js?disableCache=0507
var commentsMessages10 = class extends renderCollection12 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR10(LIKE10(filter.body, this.value), LIKE10(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default10.visitor, "READ");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0507
var saveEditButton10 = class extends button10 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0507
var commentEditTitle19 = class extends title29 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0507
var commentEditBody19 = class extends extender20(body20, flexbox19) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default20.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0507
var userLabel19 = class extends label19 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0507
var deleteButton29 = class extends button10 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.editButton.js?disableCache=0507
var editButton20 = class extends button10 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.information.js?disableCache=0507
var information10 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton29();
_editButton = new editButton20();
_userLabel = new userLabel19();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/edit/comment.edit.js?disableCache=0507
var editComment10 = class extends comment11 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information10();
body = new commentEditBody19();
title = new commentEditTitle19();
saveButton = new saveEditButton10();
width = "-webkit-fill-available";
width = "100vw";
borderRadius = 18;
margin = 4;
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/create/comment.saveButton.js?disableCache=0507
var saveCommentButton10 = class extends button10 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/create/comment.create.body.js?disableCache=0507
var commentEditBody20 = class extends extender20(body20, textarea10) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/comment/create/comment.create.js?disableCache=0507
var createComment10 = class extends comment11 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody20();
saveButton = new saveCommentButton10();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default10.member, "WRITE");
this.allow(user_group_permission_default10.admin, "WRITE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/page/news.page.backButton.js?disableCache=0507
var backButton19 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/page/news.page.edit.button.js?disableCache=0507
var backButton20 = class extends button10 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/filler.js?disableCache=0507
var filler10 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/page/search.comments.js?disableCache=0507
var searchBar29 = class extends input10 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/page/news.page.js?disableCache=0507
var testDiv10 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle10();
};
var newsPage10 = class extends news10 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
flexDirection = "column";
_backButton = new backButton19();
_testDiv = new testDiv10();
body = new newsPageBody20();
editButton = new backButton20();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar29();
commentsMessages = new commentsMessages10(editComment10, this.comments);
createComment = new createComment10(this.comments);
filler = new filler10();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default10.member, "WRITE");
this.allow(user_group_permission_default10.admin, "WRITE");
this.allow(user_group_permission_default10.visitor, "WRITE");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
this.allow(user_group_permission_default10.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/newsPages.js?disableCache=0507
var newsPages10 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage10();
newsPage = new newsPage10();
newsEdit = new newsEdit10();
width = 1800;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/preloaders/simpleSpinner.js?disableCache=0507
var line10 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask10 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line10();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox10 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask10();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0507
var themaSelectorImage10 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0507
var selectLabel10 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/themeSelector.js?disableCache=0507
var themeSelector10 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage10();
selectLabel = new selectLabel10();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0507
var themeOSSelectorItem10 = class extends themeSelector10 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default11.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0507
var osSelectorList10 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem10("Windows");
themeMacOS = new themeOSSelectorItem10("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default11.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0507
var osLabel10 = class extends label19 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/os.js?disableCache=0507
var os10 = class extends panelRow10 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel10("Os");
osSelector = new osSelectorList10();
spinner = new preloaderBox10();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0507
var themeTintSelector10 = class extends themeSelector10 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default11.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0507
var themeTintSelectors10 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector10("Light");
themeDark = new themeTintSelector10("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default11.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0507
var customLabel19 = class extends label19 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/rows/tint.js?disableCache=0507
var tint10 = class extends panelRow10 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel19("Appearance");
themeTintSelectors = new themeTintSelectors10();
spinner = new preloaderBox10();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/appearance/panel.js?disableCache=0507
var appearancePanel10 = class extends panel10 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os10();
tint = new tint10();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/pages/settings.js?disableCache=0507
var settings10 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header10("Appearance");
appearancePanel = new appearancePanel10();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0507
var Console11 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default11 = new Console11();
// framework/unify/promiseManager.js?disableCache=0507
var promiseManager11 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0507
var shared11 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object32 = new shared11();
var shared_default11 = object32.get();
// framework/cache/platforms/Android/Tablet/Dark/elements/fileUpload.js?disableCache=0507
var fileUpload10 = class extends input10 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager11();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0507
var delay29 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton10 = class extends icon10 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay29(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay29(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.icon.js?disableCache=0507
var fileIcon10 = class extends icon10 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton10();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.upload.js?disableCache=0507
var stream10 = class extends fileUpload10 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon10();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.list.js?disableCache=0507
var fileList10 = class extends panelRow10 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon10();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0507
var removeIcons10 = class extends icon10 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/page.js?disableCache=0507
var page10 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
height = "100vh";
padding = 0;
borderRadius = 0;
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/image.js?disableCache=0507
var icon_id20 = 0;
var image10 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default20.createElement("img");
useCustomElement = true;
id = icon_id20++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0507
var previewImage10 = class extends image10 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0507
var imagePreviewWindow10 = class extends draggable19 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader10();
previewImage = new previewImage10();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0507
var fileChooserFileIcon10 = class extends icon10 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/checkbox.js?disableCache=0507
var checkbox10 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default20.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0507
var file10 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox10();
icon = new fileChooserFileIcon10();
label = new label19();
};
// framework/cache/platforms/Android/Tablet/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0507
var fileChooserFiles10 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file10();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0507
var fileChooserSelectButton10 = class extends button10 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/fileChooser/fileChooser.js?disableCache=0507
var fileChooser10 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles10();
selectButton = new fileChooserSelectButton10();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/fileManager/fileManager.js?disableCache=0507
var fileManager10 = class extends page10 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header10("Upload");
fileupload = new stream10();
filesHeader = new header10("Files");
removeIcons = new removeIcons10();
fileList = new fileList10();
previewWindow = new imagePreviewWindow10();
fileChooser = new fileChooser10();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.move.js?disableCache=0507
var animationBlock64 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel64 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow10 = class extends panelRow10 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel64("Move");
animationBlock = new animationBlock64();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.rotate.js?disableCache=0507
var animationBlock65 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel65 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row55 = class extends panelRow10 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel65("Rotate");
animationBlock = new animationBlock65();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.color.js?disableCache=0507
var animationBlock66 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel66 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row56 = class extends panelRow10 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel66("Background color");
animationBlock = new animationBlock66();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.skewX.js?disableCache=0507
var animationBlock67 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel67 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row57 = class extends panelRow10 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel67("skewX");
animationBlock = new animationBlock67();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0507
var animationBlock68 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel68 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row58 = class extends panelRow10 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel68("Rotate + Move + Background");
animationBlock = new animationBlock68();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.reverse.js?disableCache=0507
var animationBlock69 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton10 = class extends button10 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton10 = class extends button10 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton10 = class extends button10 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton10 = class extends button10 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton10 = class extends button10 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel69 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons19 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton10();
pauseButton = new pauseButton10();
stopButton = new stopButton10();
forwardButton = new forwardButton10();
backwardButton = new backwardButton10();
flexDirection = "column";
};
var row59 = class extends panelRow10 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel69("Reverse");
buttons = new buttons19();
animationBlock = new animationBlock69();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animation.render.js?disableCache=0507
var animationBlock70 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel70 = class extends label19 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row60 = class extends panelRow10 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel70("RenderLoop");
animationBlock = new animationBlock70();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/animations/animations.js?disableCache=0507
var animations10 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow10();
rotateAnimation = new row55();
backgroundColor = new row56();
skewX = new row57();
rotateMoveColor = new row58();
reverse = new row59();
render = new row60();
};
// framework/cache/platforms/Android/Tablet/Dark/demo/examples/grids.js?disableCache=0507
var label20 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a10 = class extends input10 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b11 = class extends input10 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c10 = class extends input10 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d10 = class extends input10 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA10 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label20("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a10();
b = new b11();
c = new c10();
d = new d10();
};
var gridB10 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label20("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a10();
b = new b11();
c = new c10();
d = new d10();
};
var gridExample10 = class extends page10 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA10();
gridB = new gridB10();
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/header/user.userList.header.username.js?disableCache=0507
var userListHeaderUsername10 = class extends gridViewRowColumn10 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0507
var userListHeaderActions10 = class extends gridViewRowColumn10 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default10.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/header/user.userList.header.js?disableCache=0507
var userListHeader10 = class extends extender20(user11, gridViewTableRow10) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername10();
actions = new userListHeaderActions10();
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/user.userList.table.header.js?disableCache=0507
var userListTableHeader10 = class extends gridViewHeader10 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader10();
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/user.userList.table.body.js?disableCache=0507
var userListTableBody10 = class extends extender20(renderCollection12, gridViewTableHeader10) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE10(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default10.visitor, "READ");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/item/user.userList.item.username.js?disableCache=0507
var userListItemTitle10 = class extends extender20(username11, gridViewBodyColumn10) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0507
var deleteButton30 = class extends button10 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default10.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0507
var userListItemActions10 = class extends extender20(gridViewBodyColumn10, gridViewBodyColumn10) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton30();
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/item/user.userList.item.js?disableCache=0507
var userListItem10 = class extends extender20(user11, gridViewRow10) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle10();
actions = new userListItemActions10();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default10.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/user.userList.table.js?disableCache=0507
var userListTable10 = class extends gridView10 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader10();
body = new userListTableBody10(userListItem10, new collection14(user11));
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/search.js?disableCache=0507
var searchBar30 = class extends input10 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/userList/user.userList.page.js?disableCache=0507
var editPage10 = class extends page10 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header10("Users");
search = new searchBar30();
userTable = new userListTable10();
flexDirection = "column";
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.username.js?disableCache=0507
var editUsername10 = class extends extender20(username11, input10) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.username.row.js?disableCache=0507
var usernameRow10 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label19("Username");
username = new editUsername10();
};
// framework/cache/platforms/Android/Tablet/Dark/elements/empty.js?disableCache=0507
var empty10 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/user.edit.button.js?disableCache=0507
var userEditButton10 = class extends button10 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/user.edit.button.row.js?disableCache=0507
var saveButtonRow10 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty10();
userEditButton = new userEditButton10();
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0507
var checkRenderCollection10 = class extends renderCollection12 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default10.admin, "WRITE");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
this.allow(user_group_permission_default10.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.checkbox.js?disableCache=0507
var customCheckbox19 = class extends checkbox10 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0507
var customCheckbox20 = class extends user11 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label19();
checkbox = new customCheckbox19();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0507
var checkboxRow10 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label19("Select users");
renderCollection = new checkRenderCollection10(customCheckbox20, new collection14(user11));
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.select.option.js?disableCache=0507
var customOption10 = class extends extender20(option10, user11) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0507
var customSelect20 = class extends renderCollection12 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default20.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default10.admin, "WRITE");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
this.allow(user_group_permission_default10.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.select.row.js?disableCache=0507
var optionRow10 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label19("Select user");
renderCollection = new customSelect20(customOption10, new collection14(user11));
};
// framework/cache/platforms/Android/Tablet/Dark/user/edit/edit.user.js?disableCache=0507
var editUser10 = class extends extender20(user11, page10) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header10("Edit user");
usernameRow = new usernameRow10();
selectRow = new optionRow10();
checkboxRow = new checkboxRow10();
showSelectedUser = new customSelect20(customOption10, this.selectedUsers);
saveButtonRow = new saveButtonRow10();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default10.admin, "WRITE");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
this.allow(user_group_permission_default10.visitor, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/signup/signup.username.js?disableCache=0507
var signUpUsername10 = class extends extender20(username11, input10) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/inputPassword.js?disableCache=0507
var inputPassword10 = class extends input10 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/signup/signup.password.js?disableCache=0507
var signupPassword10 = class extends inputPassword10 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Android/Tablet/Dark/user/signup/signup.passwordCheck.js?disableCache=0507
var signupPasswordCheck10 = class extends inputPassword10 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0507
var cookieManager11 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default11 = new cookieManager11();
// framework/cache/platforms/Android/Tablet/Dark/user/signup/signup.button.js?disableCache=0507
var signupButton10 = class extends button10 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/signup/signup.customLabel.js?disableCache=0507
var customLabel20 = class extends label19 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Android/Tablet/Dark/user/signup/user.signup.js?disableCache=0507
var signup10 = class extends extender20(user11, page10) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default20.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header10("Signup");
// Children
userLabel = new customLabel20("Username");
username = new signUpUsername10();
passwordLabel = new customLabel20("Password");
password = new signupPassword10();
passwordAgainLabel = new customLabel20("Password again");
passwordAgain = new signupPasswordCheck10();
signUpButton = new signupButton10();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default10.visitor, "PROCESS");
this.allow(user_group_permission_default10.member, "PROCESS");
this.allow(user_group_permission_default10.admin, "PROCESS");
}
};
// framework/cache/platforms/Android/Tablet/Dark/user/signin/signin.username.js?disableCache=0507
var signinUsername10 = class extends extender20(username11, input10) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Android/Tablet/Dark/user/user.password.js?disableCache=0507
var password10 = class extends inputPassword10 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Android/Tablet/Dark/user/signin/signin.password.js?disableCache=0507
var signinPassword10 = class extends password10 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Android/Tablet/Dark/user/signin/signin.button.js?disableCache=0507
var signinFormButton10 = class extends button10 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
//display = "none";
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0507
var unify11 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default11 = new unify11();
// framework/cache/platforms/Android/Tablet/Dark/user/signin/signin.cancel.button.js?disableCache=0507
var cancelButton20 = class extends button10 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
};
// framework/cache/platforms/Android/Tablet/Dark/user/signin/user.signin.js?disableCache=0507
var tussenObject10 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword10();
width = "100%";
};
var buttons20 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
width = "100vw";
position = "absolute";
bottom = "0";
cancelButton = new cancelButton20();
signinButton = new signinFormButton10();
};
var hint10 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin10 = class extends extender20(user11, page10) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint10();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default20.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header10("Signin");
//userLabel = new label("Username");
username = new signinUsername10();
//passwordLabel = new label("Password");
tussenObject = new tussenObject10();
buttons = new buttons20();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user11();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default11.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user11();
client2.user = visitor62;
client2.user.error = false;
unify_default11.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default11.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default10.visitor, "PROCESS");
this.allow(user_group_permission_default10.member, "PROCESS");
this.allow(user_group_permission_default10.admin, "PROCESS");
this.allow(user_group_permission_default10.member, "READ");
this.allow(user_group_permission_default10.admin, "READ");
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/rightSide/rightSide.js?disableCache=0448
var rightSide10 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages10();
signup = new signup10();
signin = new signin10();
settings = new settings10();
fileManager = new fileManager10();
animations = new animations10();
gridExample = new gridExample10();
userListPage = new editPage10();
editUser = new editUser10();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0448
var documentTool21 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object33 = new documentTool21();
var document_default21 = object33.getDocument();
// framework/unify/math/vector2.js?disableCache=0448
var vector230 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/flexbox.js?disableCache=0448
var flexbox20 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Tablet/Dark/elements/window/frostedGlass.js?disableCache=0448
var frostedGlass20 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Android/Tablet/Dark/elements/window/draggable.js?disableCache=0448
var vector231 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay30(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay30, "delay");
var draggable20 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector231(0, 0);
grabPosition = new vector231(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector231(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay30(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector231(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Tablet/Dark/demo/application.js
var application11 = class extends extender19(frostedGlass20, flexbox20, draggable20) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton10();
leftSide = new leftSide10();
rightSide = new rightSide10();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "column";
// Pragma's
lastPosition = new vector230(0, 0);
fontFamily = "android";
transform = "translate(0px, 0px)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default21.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector230(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0903
function extender21(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender21, "extender");
// framework/unify/extender.js?disableCache=0051
function extender22(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender22, "extender");
// framework/cache/platforms/Android/Pc/Light/elements/button.js?disableCache=0051
var button11 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
borderRadius = 40;
fontSize = 15;
margin = 20;
width = "-webkit-fill-available";
fontSize = 22;
fontWeight = "bold";
textAlign = "center";
padding = 20;
background = "#f2f2f2";
color = "#019e7c";
hoverBackgroundColor = "#d9d9d9";
opaqueBackgroundColor = "#f2f2f2";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Android/Pc/Light/elements/icon.js?disableCache=0051
var icon_id21 = 0;
var icon11 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id21++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Android/Pc/Light/demo/minimizeButton.js?disableCache=0903
var minimizeButton11 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
top = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxHeight = "100vh";
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxHeight = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.js?disableCache=0051
var menuButton11 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
width = "80vw";
borderRadius = 18;
textAlign = "center";
padding = 20;
margin = "0 auto";
marginTop = 8;
fontSize = 20;
height = 24;
fontWeight = "600";
fontColor = "#313131";
borderBottom = "1px solid #ececec";
background = "white";
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.news.js?disableCache=0051
var newsButton11 = class extends menuButton11 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
application32.minimizeButton.close();
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0051
var settingsButton31 = class extends menuButton11 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
application32.minimizeButton.close();
}
};
// framework/unify/collection.js?disableCache=0051
var collection15 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0051
var datatype_default12 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0051
var documentTool22 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object34 = new documentTool22();
var document_default22 = object34.getDocument();
// framework/cache/platforms/Android/Pc/Light/elements/option.js?disableCache=0051
var option11 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default22.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Android/Pc/Light/user/group/user.group.js?disableCache=0051
var visitor22 = class extends option11 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member11 = class extends option11 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin21 = class extends option11 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups11 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member11();
admin = new admin21();
visitor = new visitor22();
};
// framework/cache/platforms/Android/Pc/Light/user/group/user.group.permission.js?disableCache=0051
var user_group_permission_default11 = new groups11();
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0051
var signinPageButton11 = class extends menuButton11 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
application32.minimizeButton.close();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0051
var signinButton11 = class extends menuButton11 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
application32.minimizeButton.close();
}
};
// framework/server/userManager.js?disableCache=0051
var visitor23 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager12 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor23();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default12 = new userManager12();
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0051
var signoutButton11 = class extends menuButton11 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default12.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default11.member, "PROCESS");
this.allow(user_group_permission_default11.admin, "PROCESS");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0051
var fileMangerButton11 = class extends menuButton11 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0051
var settingsButton32 = class extends menuButton11 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.users.js?disableCache=0051
var usersPageButton11 = class extends menuButton11 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
application32.minimizeButton.close();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default11.member, "PROCESS");
this.allow(user_group_permission_default11.admin, "PROCESS");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0051
var settingsButton33 = class extends menuButton11 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Pc/Light/elements/header.js?disableCache=0051
var header11 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
padding = "0";
margin = 0;
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.header.js?disableCache=0051
var menuHeader11 = class extends header11 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "flex";
};
// framework/cache/platforms/Android/Pc/Light/demo/leftSide/leftSide.js?disableCache=0903
var leftSide11 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "100vh";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader11();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
boxBackground = "#f2f2f2";
//background = "white";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton11();
settingsButton = new settingsButton31();
usersButton = new usersPageButton11();
signinButton = new signinPageButton11();
signoutButton = new signoutButton11();
signupButton = new signinButton11();
animationsButton = new settingsButton32();
gridButton = new settingsButton33();
fileManagerButton = new fileMangerButton11();
};
// framework/unify/table.js?disableCache=0051
var table13 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0051
var column11 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/news.title.js?disableCache=0051
var title31 = class extends column11 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/demo/news.body.js?disableCache=0051
var body21 = class extends column11 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/demo/news.price.js?disableCache=0051
var price11 = class extends column11 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default12.REAL;
};
// framework/cache/platforms/Android/Pc/Light/user/user.username.js?disableCache=0051
var username12 = class extends column11 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0051
var tools13 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll12(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default12 = new tools13();
// framework/cache/platforms/Android/Pc/Light/elements/input.js?disableCache=0051
var input11 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default22.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
background = "white";
borderRadius = 16;
padding = 8;
paddingLeft = 16;
margin = 4;
fontSize = 18;
boxSizing = "border-box";
width = "92%";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default22.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default22.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Android/Pc/Light/user/user.salt.js?disableCache=0051
var salt12 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default12.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Android/Pc/Light/user/user.hash.js?disableCache=0051
var hash12 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default12.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Android/Pc/Light/user/user.js?disableCache=0051
var user12 = class _user extends table13 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username12();
salt = new salt12();
hash = new hash12();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups11();
selectedUsers = new collection15(_user);
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/comment.body.js?disableCache=0051
var body22 = class extends column11 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/comment.title.js?disableCache=0051
var title32 = class extends column11 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/comment.js?disableCache=0051
var comment12 = class extends table13 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user12();
title = new title32();
body = new body22();
flexDirection = "column";
};
// framework/cache/platforms/Android/Pc/Light/demo/news.js?disableCache=0051
var news11 = class extends table13 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title31();
body = new body21();
price = new price11();
comments = new collection15(comment12);
};
// framework/cache/platforms/Android/Pc/Light/elements/tableCell.js?disableCache=0051
var tableCell11 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0051
var sortBy11 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.header.row.column.js?disableCache=0051
var gridViewRowColumn11 = class extends tableCell11 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 20;
sortBy = new sortBy11();
};
// framework/cache/platforms/Android/Pc/Light/demo/list/header/news.list.header.body.js?disableCache=0051
var newsListHeaderBody11 = class extends gridViewRowColumn11 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Android/Pc/Light/demo/list/header/news.list.header.title.js?disableCache=0051
var newsListHeaderTitle11 = class extends gridViewRowColumn11 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Android/Pc/Light/demo/list/header/news.list.header.price.js?disableCache=0051
var newsListHeaderPrice11 = class extends gridViewRowColumn11 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Android/Pc/Light/demo/list/header/news.list.header.actions.js?disableCache=0051
var newsListHeaderActions11 = class extends gridViewRowColumn11 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default11.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.header.row.js?disableCache=0051
var gridViewTableRow11 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Android/Pc/Light/demo/list/header/news.list.header.js?disableCache=0051
var newsListHeader11 = class extends extender22(news11, gridViewTableRow11) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody11();
title = new newsListHeaderTitle11();
price = new newsListHeaderPrice11();
actions = new newsListHeaderActions11();
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.header.js?disableCache=0051
var gridViewHeader11 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Android/Pc/Light/demo/list/news.list.table.header.js?disableCache=0051
var newsListTableHeader11 = class extends gridViewHeader11 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader11();
};
// framework/unify/renderCollection.js?disableCache=0051
var renderCollection13 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.body.js?disableCache=0051
var gridViewTableHeader11 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0051
function OR11(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR11, "OR");
// framework/unify/sql/LIKE.js?disableCache=0051
function LIKE11(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE11, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0051
function GREATER_OR_EQUAL11(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL11, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0051
function SMALLER_OR_EQUAL11(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL11, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Android/Pc/Light/demo/list/news.list.table.body.js?disableCache=0051
var newsListTableBody11 = class extends extender22(renderCollection13, gridViewTableHeader11) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR11(OR11(LIKE11(filter.title, searchTerm), LIKE11(filter.comments.body, searchTerm)), LIKE11(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL11(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL11(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default11.visitor, "READ");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.body.row.column.js?disableCache=0051
var gridViewBodyColumn11 = class extends tableCell11 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Android/Pc/Light/demo/list/item/news.list.item.body.js?disableCache=0051
var newsListItemBody11 = class extends extender22(body21, gridViewBodyColumn11) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/demo/list/item/news.list.item.title.js?disableCache=0051
var newsListItemTitle11 = class extends extender22(title31, gridViewBodyColumn11) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/demo/list/item/news.list.item.price.js?disableCache=0051
var newsListItemPrice11 = class extends extender22(price11, gridViewBodyColumn11) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0051
var deleteButton31 = class extends button11 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default11.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/list/item/news.list.item.actions.js?disableCache=0051
var newsListItemActions11 = class extends extender22(gridViewBodyColumn11, gridViewBodyColumn11) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton31();
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.body.row.js?disableCache=0051
var gridViewRow11 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Light/demo/list/item/news.list.item.js?disableCache=0051
var newsListItem11 = class extends extender22(news11, gridViewRow11) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody11();
title = new newsListItemTitle11();
price = new newsListItemPrice11();
actions = new newsListItemActions11();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default11.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/elements/gridView/gridView.js?disableCache=0051
var gridView11 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
background = "white";
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Light/demo/list/news.list.table.js?disableCache=0051
var newsListTable11 = class extends gridView11 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader11();
body = new newsListTableBody11(newsListItem11, new collection15(news11));
};
// framework/cache/platforms/Android/Pc/Light/demo/edit/news.edit.title.js?disableCache=0051
var newsEditTitle11 = class extends extender22(input11, title31) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Android/Pc/Light/elements/textarea.js?disableCache=0051
var textarea11 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 4;
height = "auto";
border = "1px solid #E5E5E5";
borderRadius = 20;
background = "white";
padding = 6;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default22.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/edit/news.edit.body.js?disableCache=0051
var newsPageBody21 = class extends extender22(body21, textarea11) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Pc/Light/demo/edit/news.edit.button.js?disableCache=0051
var editButton21 = class extends button11 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/edit/news.edit.price.js?disableCache=0051
var newsPagePrice11 = class extends extender22(price11, input11) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Pc/Light/elements/label.js?disableCache=0051
var label21 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Android/Pc/Light/elements/label/left.js?disableCache=0051
var leftLabel11 = class extends label21 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Android/Pc/Light/elements/panel.js?disableCache=0051
var panel11 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Android/Pc/Light/elements/window/draggable.js?disableCache=0051
var vector232 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay31(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay31, "delay");
var draggable21 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector232(0, 0);
grabPosition = new vector232(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector232(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay31(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector232(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Pc/Light/elements/panel/row.js?disableCache=0051
var panelRow11 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Android/Pc/Light/elements/window/header.js?disableCache=0051
var maximizeButton11 = class extends icon11 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton11 = class extends icon11 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl11 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton11();
maximizeButton = new maximizeButton11();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title33 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl11 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader11 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl11();
title = new title33();
rightControl = new rightControl11();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Android/Pc/Light/demo/edit/news.edit.js?disableCache=0051
var newsBodyRow11 = class extends panelRow11 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel11("Message");
body = new newsPageBody21();
};
var newsTitleRow11 = class extends panelRow11 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel11("Title");
title = new newsEditTitle11();
};
var newsPriceRow11 = class extends panelRow11 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel11("Price");
price = new newsPagePrice11();
};
var cancelButton21 = class extends button11 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow11 = class extends panelRow11 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton21();
newsEditbutton = new editButton21();
};
var newsEdit11 = class extends extender22(news11, panel11, draggable21) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader11("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow11();
newsPriceRow = new newsPriceRow11();
newsBodyRow = new newsBodyRow11();
newsButtonRow = new newsButtonRow11();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
this.allow(user_group_permission_default11.visitor, "READ");
this.allow(user_group_permission_default11.member, "WRITE");
this.allow(user_group_permission_default11.admin, "WRITE");
this.allow(user_group_permission_default11.visitor, "WRITE");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsDialogButton.js?disableCache=0051
var newsDialogButton11 = class extends button11 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/search.input.js?disableCache=0051
var searchBar31 = class extends input11 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Android/Pc/Light/elements/select.js?disableCache=0051
var select11 = class extends renderCollection13 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default22.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default11.admin, "READ");
this.allow(user_group_permission_default11.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default22.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/search.select.js?disableCache=0051
var customSelect21 = class extends select11 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/search.widget.js?disableCache=0051
var searchWidget11 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar31();
select = new customSelect21();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0051
var paginationItem11 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsItemPage.pagination.js?disableCache=0051
var pagination11 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem11();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem11();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem11();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsItemPage.limit.js?disableCache=0051
var limit11 = class extends select11 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0051
var tableControl11 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label21("Select page:");
pagination = new pagination11();
limitLabel = new label21("Select items per page:");
limit = new limit11();
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsItemPage.js?disableCache=0051
var testbutton11 = class extends button11 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage11 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = "100vw";
padding = "0";
newsListHeader = new header11("News Items");
searchWidget = new searchWidget11();
newsListTable = new newsListTable11();
tableControl = new tableControl11();
createNews = new newsEdit11();
testbutton = new testbutton11();
newsDialogButton = new newsDialogButton11();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
background = "#f2f2f2";
};
// framework/cache/platforms/Android/Pc/Light/elements/flexbox.js?disableCache=0051
var flexbox21 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Pc/Light/demo/page/news.page.title.js?disableCache=0051
var newsPageTitle11 = class extends extender22(title31, flexbox21) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
borderRadius = "18px 18px 0 0";
width = "100%";
background = "white";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Android/Pc/Light/demo/page/news.page.body.js?disableCache=0051
var newsPageBody22 = class extends extender22(flexbox21, body21) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
borderRadius = "0 0 18px 18px";
background = "white";
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/comments.messages.js?disableCache=0051
var commentsMessages11 = class extends renderCollection13 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR11(LIKE11(filter.body, this.value), LIKE11(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default11.visitor, "READ");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.saveButton.js?disableCache=0051
var saveEditButton11 = class extends button11 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.edit.title.js?disableCache=0051
var commentEditTitle21 = class extends title32 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.edit.body.js?disableCache=0051
var commentEditBody21 = class extends extender22(body22, flexbox21) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default22.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.userLabel.js?disableCache=0051
var userLabel21 = class extends label21 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0051
var deleteButton32 = class extends button11 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.editButton.js?disableCache=0051
var editButton22 = class extends button11 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.information.js?disableCache=0051
var information11 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton32();
_editButton = new editButton22();
_userLabel = new userLabel21();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/edit/comment.edit.js?disableCache=0051
var editComment11 = class extends comment12 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information11();
body = new commentEditBody21();
title = new commentEditTitle21();
saveButton = new saveEditButton11();
width = "-webkit-fill-available";
width = "100vw";
borderRadius = 18;
margin = 4;
background = "white";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/create/comment.saveButton.js?disableCache=0051
var saveCommentButton11 = class extends button11 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/create/comment.create.body.js?disableCache=0051
var commentEditBody22 = class extends extender22(body22, textarea11) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Android/Pc/Light/demo/comment/create/comment.create.js?disableCache=0051
var createComment11 = class extends comment12 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody22();
saveButton = new saveCommentButton11();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default11.member, "WRITE");
this.allow(user_group_permission_default11.admin, "WRITE");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/page/news.page.backButton.js?disableCache=0051
var backButton21 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Android/Pc/Light/demo/page/news.page.edit.button.js?disableCache=0051
var backButton22 = class extends button11 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Android/Pc/Light/elements/filler.js?disableCache=0051
var filler11 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Android/Pc/Light/demo/page/search.comments.js?disableCache=0051
var searchBar32 = class extends input11 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/page/news.page.js?disableCache=0051
var testDiv11 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle11();
};
var newsPage11 = class extends news11 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
background = "#f2f2f2";
flexDirection = "column";
_backButton = new backButton21();
_testDiv = new testDiv11();
body = new newsPageBody22();
editButton = new backButton22();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar32();
commentsMessages = new commentsMessages11(editComment11, this.comments);
createComment = new createComment11(this.comments);
filler = new filler11();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default11.member, "WRITE");
this.allow(user_group_permission_default11.admin, "WRITE");
this.allow(user_group_permission_default11.visitor, "WRITE");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
this.allow(user_group_permission_default11.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/newsPages.js?disableCache=0051
var newsPages11 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage11();
newsPage = new newsPage11();
newsEdit = new newsEdit11();
width = 1800;
};
// framework/cache/platforms/Android/Pc/Light/elements/preloaders/simpleSpinner.js?disableCache=0051
var line11 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask11 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line11();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox11 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask11();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0051
var themaSelectorImage11 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0051
var selectLabel11 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/themeSelector.js?disableCache=0051
var themeSelector11 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage11();
selectLabel = new selectLabel11();
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0051
var themeOSSelectorItem11 = class extends themeSelector11 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default12.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0051
var osSelectorList11 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem11("Windows");
themeMacOS = new themeOSSelectorItem11("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default12.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/os.label.js?disableCache=0051
var osLabel11 = class extends label21 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/os.js?disableCache=0051
var os11 = class extends panelRow11 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel11("Os");
osSelector = new osSelectorList11();
spinner = new preloaderBox11();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0051
var themeTintSelector11 = class extends themeSelector11 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default12.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0051
var themeTintSelectors11 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector11("Light");
themeDark = new themeTintSelector11("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default12.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0051
var customLabel21 = class extends label21 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/rows/tint.js?disableCache=0051
var tint11 = class extends panelRow11 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel21("Appearance");
themeTintSelectors = new themeTintSelectors11();
spinner = new preloaderBox11();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/appearance/panel.js?disableCache=0051
var appearancePanel11 = class extends panel11 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os11();
tint = new tint11();
};
// framework/cache/platforms/Android/Pc/Light/demo/pages/settings.js?disableCache=0051
var settings11 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header11("Appearance");
appearancePanel = new appearancePanel11();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0051
var Console12 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default12 = new Console12();
// framework/unify/promiseManager.js?disableCache=0051
var promiseManager12 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0051
var shared12 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object35 = new shared12();
var shared_default12 = object35.get();
// framework/cache/platforms/Android/Pc/Light/elements/fileUpload.js?disableCache=0051
var fileUpload11 = class extends input11 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager12();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0051
var delay32 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton11 = class extends icon11 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay32(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay32(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.icon.js?disableCache=0051
var fileIcon11 = class extends icon11 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton11();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.upload.js?disableCache=0051
var stream11 = class extends fileUpload11 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon11();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.list.js?disableCache=0051
var fileList11 = class extends panelRow11 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon11();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0051
var removeIcons11 = class extends icon11 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Android/Pc/Light/elements/page.js?disableCache=0051
var page11 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
height = "100vh";
padding = 0;
borderRadius = 0;
background = "#f2f2f2";
// background = "#000000";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Android/Pc/Light/elements/image.js?disableCache=0051
var icon_id22 = 0;
var image11 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default22.createElement("img");
useCustomElement = true;
id = icon_id22++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0051
var previewImage11 = class extends image11 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0051
var imagePreviewWindow11 = class extends draggable21 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader11();
previewImage = new previewImage11();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Android/Pc/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0051
var fileChooserFileIcon11 = class extends icon11 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Android/Pc/Light/elements/checkbox.js?disableCache=0051
var checkbox11 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default22.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Pc/Light/elements/fileChooser/fileChooser.file.js?disableCache=0051
var file11 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox11();
icon = new fileChooserFileIcon11();
label = new label21();
};
// framework/cache/platforms/Android/Pc/Light/elements/fileChooser/fileChooser.files.js?disableCache=0051
var fileChooserFiles11 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file11();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Android/Pc/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0051
var fileChooserSelectButton11 = class extends button11 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Android/Pc/Light/elements/fileChooser/fileChooser.js?disableCache=0051
var fileChooser11 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles11();
selectButton = new fileChooserSelectButton11();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Android/Pc/Light/demo/fileManager/fileManager.js?disableCache=0051
var fileManager11 = class extends page11 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header11("Upload");
fileupload = new stream11();
filesHeader = new header11("Files");
removeIcons = new removeIcons11();
fileList = new fileList11();
previewWindow = new imagePreviewWindow11();
fileChooser = new fileChooser11();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.move.js?disableCache=0051
var animationBlock71 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel71 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow11 = class extends panelRow11 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel71("Move");
animationBlock = new animationBlock71();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.rotate.js?disableCache=0051
var animationBlock72 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel72 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row61 = class extends panelRow11 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel72("Rotate");
animationBlock = new animationBlock72();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.color.js?disableCache=0051
var animationBlock73 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel73 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row62 = class extends panelRow11 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel73("Background color");
animationBlock = new animationBlock73();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.skewX.js?disableCache=0051
var animationBlock74 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel74 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row63 = class extends panelRow11 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel74("skewX");
animationBlock = new animationBlock74();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0051
var animationBlock75 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel75 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row64 = class extends panelRow11 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel75("Rotate + Move + Background");
animationBlock = new animationBlock75();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.reverse.js?disableCache=0051
var animationBlock76 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton11 = class extends button11 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton11 = class extends button11 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton11 = class extends button11 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton11 = class extends button11 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton11 = class extends button11 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel76 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons21 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton11();
pauseButton = new pauseButton11();
stopButton = new stopButton11();
forwardButton = new forwardButton11();
backwardButton = new backwardButton11();
flexDirection = "column";
};
var row65 = class extends panelRow11 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel76("Reverse");
buttons = new buttons21();
animationBlock = new animationBlock76();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animation.render.js?disableCache=0051
var animationBlock77 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel77 = class extends label21 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row66 = class extends panelRow11 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel77("RenderLoop");
animationBlock = new animationBlock77();
};
// framework/cache/platforms/Android/Pc/Light/demo/animations/animations.js?disableCache=0051
var animations11 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow11();
rotateAnimation = new row61();
backgroundColor = new row62();
skewX = new row63();
rotateMoveColor = new row64();
reverse = new row65();
render = new row66();
};
// framework/cache/platforms/Android/Pc/Light/demo/examples/grids.js?disableCache=0051
var label22 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a11 = class extends input11 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b12 = class extends input11 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c11 = class extends input11 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d11 = class extends input11 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA11 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label22("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a11();
b = new b12();
c = new c11();
d = new d11();
};
var gridB11 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label22("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a11();
b = new b12();
c = new c11();
d = new d11();
};
var gridExample11 = class extends page11 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA11();
gridB = new gridB11();
};
// framework/cache/platforms/Android/Pc/Light/user/userList/header/user.userList.header.username.js?disableCache=0051
var userListHeaderUsername11 = class extends gridViewRowColumn11 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Android/Pc/Light/user/userList/header/user.userList.header.actions.js?disableCache=0051
var userListHeaderActions11 = class extends gridViewRowColumn11 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default11.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/user/userList/header/user.userList.header.js?disableCache=0051
var userListHeader11 = class extends extender22(user12, gridViewTableRow11) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername11();
actions = new userListHeaderActions11();
};
// framework/cache/platforms/Android/Pc/Light/user/userList/user.userList.table.header.js?disableCache=0051
var userListTableHeader11 = class extends gridViewHeader11 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader11();
};
// framework/cache/platforms/Android/Pc/Light/user/userList/user.userList.table.body.js?disableCache=0051
var userListTableBody11 = class extends extender22(renderCollection13, gridViewTableHeader11) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE11(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default11.visitor, "READ");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/user/userList/item/user.userList.item.username.js?disableCache=0051
var userListItemTitle11 = class extends extender22(username12, gridViewBodyColumn11) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0051
var deleteButton33 = class extends button11 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default11.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/user/userList/item/user.userList.item.actions.js?disableCache=0051
var userListItemActions11 = class extends extender22(gridViewBodyColumn11, gridViewBodyColumn11) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton33();
};
// framework/cache/platforms/Android/Pc/Light/user/userList/item/user.userList.item.js?disableCache=0051
var userListItem11 = class extends extender22(user12, gridViewRow11) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle11();
actions = new userListItemActions11();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default11.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Light/user/userList/user.userList.table.js?disableCache=0051
var userListTable11 = class extends gridView11 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader11();
body = new userListTableBody11(userListItem11, new collection15(user12));
};
// framework/cache/platforms/Android/Pc/Light/user/userList/search.js?disableCache=0051
var searchBar33 = class extends input11 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Pc/Light/user/userList/user.userList.page.js?disableCache=0051
var editPage11 = class extends page11 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header11("Users");
search = new searchBar33();
userTable = new userListTable11();
flexDirection = "column";
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.username.js?disableCache=0051
var editUsername11 = class extends extender22(username12, input11) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.username.row.js?disableCache=0051
var usernameRow11 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label21("Username");
username = new editUsername11();
};
// framework/cache/platforms/Android/Pc/Light/elements/empty.js?disableCache=0051
var empty11 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Light/user/edit/user.edit.button.js?disableCache=0051
var userEditButton11 = class extends button11 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Android/Pc/Light/user/edit/user.edit.button.row.js?disableCache=0051
var saveButtonRow11 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty11();
userEditButton = new userEditButton11();
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0051
var checkRenderCollection11 = class extends renderCollection13 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default11.admin, "WRITE");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
this.allow(user_group_permission_default11.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.checkbox.js?disableCache=0051
var customCheckbox21 = class extends checkbox11 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0051
var customCheckbox22 = class extends user12 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label21();
checkbox = new customCheckbox21();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.checkbox.row.js?disableCache=0051
var checkboxRow11 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label21("Select users");
renderCollection = new checkRenderCollection11(customCheckbox22, new collection15(user12));
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.select.option.js?disableCache=0051
var customOption11 = class extends extender22(option11, user12) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0051
var customSelect22 = class extends renderCollection13 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default22.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default11.admin, "WRITE");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
this.allow(user_group_permission_default11.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.select.row.js?disableCache=0051
var optionRow11 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label21("Select user");
renderCollection = new customSelect22(customOption11, new collection15(user12));
};
// framework/cache/platforms/Android/Pc/Light/user/edit/edit.user.js?disableCache=0051
var editUser11 = class extends extender22(user12, page11) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header11("Edit user");
usernameRow = new usernameRow11();
selectRow = new optionRow11();
checkboxRow = new checkboxRow11();
showSelectedUser = new customSelect22(customOption11, this.selectedUsers);
saveButtonRow = new saveButtonRow11();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default11.admin, "WRITE");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
this.allow(user_group_permission_default11.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/user/signup/signup.username.js?disableCache=0051
var signUpUsername11 = class extends extender22(username12, input11) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Light/elements/inputPassword.js?disableCache=0051
var inputPassword11 = class extends input11 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Pc/Light/user/signup/signup.password.js?disableCache=0051
var signupPassword11 = class extends inputPassword11 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Android/Pc/Light/user/signup/signup.passwordCheck.js?disableCache=0051
var signupPasswordCheck11 = class extends inputPassword11 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0051
var cookieManager12 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default12 = new cookieManager12();
// framework/cache/platforms/Android/Pc/Light/user/signup/signup.button.js?disableCache=0051
var signupButton11 = class extends button11 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Android/Pc/Light/user/signup/signup.customLabel.js?disableCache=0051
var customLabel22 = class extends label21 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Android/Pc/Light/user/signup/user.signup.js?disableCache=0051
var signup11 = class extends extender22(user12, page11) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default22.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header11("Signup");
// Children
userLabel = new customLabel22("Username");
username = new signUpUsername11();
passwordLabel = new customLabel22("Password");
password = new signupPassword11();
passwordAgainLabel = new customLabel22("Password again");
passwordAgain = new signupPasswordCheck11();
signUpButton = new signupButton11();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default11.visitor, "PROCESS");
this.allow(user_group_permission_default11.member, "PROCESS");
this.allow(user_group_permission_default11.admin, "PROCESS");
}
};
// framework/cache/platforms/Android/Pc/Light/user/signin/signin.username.js?disableCache=0051
var signinUsername11 = class extends extender22(username12, input11) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Android/Pc/Light/user/user.password.js?disableCache=0051
var password11 = class extends inputPassword11 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Android/Pc/Light/user/signin/signin.password.js?disableCache=0051
var signinPassword11 = class extends password11 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Android/Pc/Light/user/signin/signin.button.js?disableCache=0051
var signinFormButton11 = class extends button11 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
//display = "none";
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0051
var unify12 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default12 = new unify12();
// framework/cache/platforms/Android/Pc/Light/user/signin/signin.cancel.button.js?disableCache=0051
var cancelButton22 = class extends button11 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
};
// framework/cache/platforms/Android/Pc/Light/user/signin/user.signin.js?disableCache=0051
var tussenObject11 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword11();
width = "100%";
};
var buttons22 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
width = "100vw";
position = "absolute";
bottom = "0";
cancelButton = new cancelButton22();
signinButton = new signinFormButton11();
};
var hint11 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin11 = class extends extender22(user12, page11) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint11();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default22.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header11("Signin");
//userLabel = new label("Username");
username = new signinUsername11();
//passwordLabel = new label("Password");
tussenObject = new tussenObject11();
buttons = new buttons22();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user12();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default12.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user12();
client2.user = visitor62;
client2.user.error = false;
unify_default12.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default12.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default11.visitor, "PROCESS");
this.allow(user_group_permission_default11.member, "PROCESS");
this.allow(user_group_permission_default11.admin, "PROCESS");
this.allow(user_group_permission_default11.member, "READ");
this.allow(user_group_permission_default11.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Light/demo/rightSide/rightSide.js?disableCache=0903
var rightSide11 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages11();
signup = new signup11();
signin = new signin11();
settings = new settings11();
fileManager = new fileManager11();
animations = new animations11();
gridExample = new gridExample11();
userListPage = new editPage11();
editUser = new editUser11();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0903
var documentTool23 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object36 = new documentTool23();
var document_default23 = object36.getDocument();
// framework/unify/math/vector2.js?disableCache=0903
var vector233 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Android/Pc/Light/elements/flexbox.js?disableCache=0903
var flexbox22 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Pc/Light/elements/window/frostedGlass.js?disableCache=0903
var frostedGlass22 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Android/Pc/Light/elements/window/draggable.js?disableCache=0903
var vector234 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay33(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay33, "delay");
var draggable22 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector234(0, 0);
grabPosition = new vector234(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector234(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay33(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector234(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Pc/Light/demo/application.js
var application12 = class extends extender21(frostedGlass22, flexbox22, draggable22) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton11();
leftSide = new leftSide11();
rightSide = new rightSide11();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "column";
// Pragma's
lastPosition = new vector233(0, 0);
fontFamily = "android";
transform = "translate(0px, 0px)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default23.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector233(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0119
function extender23(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender23, "extender");
// framework/unify/extender.js?disableCache=0328
function extender24(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender24, "extender");
// framework/cache/platforms/Android/Pc/Dark/elements/button.js?disableCache=0328
var button12 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
borderRadius = 40;
fontSize = 15;
margin = 20;
width = "-webkit-fill-available";
fontSize = 22;
fontWeight = "bold";
textAlign = "center";
padding = 20;
background = "#323232";
color = "white";
//border = "1px solid #3d3a3a";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#323232";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/icon.js?disableCache=0328
var icon_id23 = 0;
var icon12 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id23++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Android/Pc/Dark/demo/minimizeButton.js?disableCache=0119
var minimizeButton12 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
top = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxHeight = "100vh";
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxHeight = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.js?disableCache=0328
var menuButton12 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
width = "80vw";
borderRadius = 18;
textAlign = "center";
padding = 20;
margin = "0 auto";
marginTop = 8;
fontSize = 20;
height = 24;
fontWeight = "600";
fontColor = "#313131";
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0328
var newsButton12 = class extends menuButton12 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
application32.minimizeButton.close();
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0328
var settingsButton34 = class extends menuButton12 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
application32.minimizeButton.close();
}
};
// framework/unify/collection.js?disableCache=0328
var collection16 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0328
var datatype_default13 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0328
var documentTool24 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object37 = new documentTool24();
var document_default24 = object37.getDocument();
// framework/cache/platforms/Android/Pc/Dark/elements/option.js?disableCache=0328
var option12 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default24.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Android/Pc/Dark/user/group/user.group.js?disableCache=0328
var visitor24 = class extends option12 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member12 = class extends option12 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin23 = class extends option12 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups12 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member12();
admin = new admin23();
visitor = new visitor24();
};
// framework/cache/platforms/Android/Pc/Dark/user/group/user.group.permission.js?disableCache=0328
var user_group_permission_default12 = new groups12();
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0328
var signinPageButton12 = class extends menuButton12 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
application32.minimizeButton.close();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0328
var signinButton12 = class extends menuButton12 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
application32.minimizeButton.close();
}
};
// framework/server/userManager.js?disableCache=0328
var visitor25 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager13 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor25();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default13 = new userManager13();
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0328
var signoutButton12 = class extends menuButton12 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default13.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default12.member, "PROCESS");
this.allow(user_group_permission_default12.admin, "PROCESS");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0328
var fileMangerButton12 = class extends menuButton12 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0328
var settingsButton35 = class extends menuButton12 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0328
var usersPageButton12 = class extends menuButton12 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
application32.minimizeButton.close();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default12.member, "PROCESS");
this.allow(user_group_permission_default12.admin, "PROCESS");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0328
var settingsButton36 = class extends menuButton12 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
application32.minimizeButton.close();
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/header.js?disableCache=0328
var header12 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
padding = "0";
margin = 0;
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.header.js?disableCache=0328
var menuHeader12 = class extends header12 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "flex";
};
// framework/cache/platforms/Android/Pc/Dark/demo/leftSide/leftSide.js?disableCache=0119
var leftSide12 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "100vh";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader12();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton12();
settingsButton = new settingsButton34();
usersButton = new usersPageButton12();
signinButton = new signinPageButton12();
signoutButton = new signoutButton12();
signupButton = new signinButton12();
animationsButton = new settingsButton35();
gridButton = new settingsButton36();
fileManagerButton = new fileMangerButton12();
};
// framework/unify/table.js?disableCache=0328
var table14 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0328
var column12 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/news.title.js?disableCache=0328
var title34 = class extends column12 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/demo/news.body.js?disableCache=0328
var body23 = class extends column12 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/demo/news.price.js?disableCache=0328
var price12 = class extends column12 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default13.REAL;
};
// framework/cache/platforms/Android/Pc/Dark/user/user.username.js?disableCache=0328
var username13 = class extends column12 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0328
var tools14 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll13(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default13 = new tools14();
// framework/cache/platforms/Android/Pc/Dark/elements/input.js?disableCache=0328
var input12 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default24.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
background = "white";
borderRadius = 16;
padding = 8;
paddingLeft = 16;
margin = 4;
fontSize = 18;
boxSizing = "border-box";
width = "92%";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default24.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default24.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Android/Pc/Dark/user/user.salt.js?disableCache=0328
var salt13 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default13.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Android/Pc/Dark/user/user.hash.js?disableCache=0328
var hash13 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default13.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Android/Pc/Dark/user/user.js?disableCache=0328
var user13 = class _user extends table14 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username13();
salt = new salt13();
hash = new hash13();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups12();
selectedUsers = new collection16(_user);
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/comment.body.js?disableCache=0328
var body24 = class extends column12 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/comment.title.js?disableCache=0328
var title35 = class extends column12 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/comment.js?disableCache=0328
var comment13 = class extends table14 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user13();
title = new title35();
body = new body24();
flexDirection = "column";
};
// framework/cache/platforms/Android/Pc/Dark/demo/news.js?disableCache=0328
var news12 = class extends table14 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title34();
body = new body23();
price = new price12();
comments = new collection16(comment13);
};
// framework/cache/platforms/Android/Pc/Dark/elements/tableCell.js?disableCache=0328
var tableCell12 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0328
var sortBy12 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0328
var gridViewRowColumn12 = class extends tableCell12 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 20;
sortBy = new sortBy12();
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/header/news.list.header.body.js?disableCache=0328
var newsListHeaderBody12 = class extends gridViewRowColumn12 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/header/news.list.header.title.js?disableCache=0328
var newsListHeaderTitle12 = class extends gridViewRowColumn12 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/header/news.list.header.price.js?disableCache=0328
var newsListHeaderPrice12 = class extends gridViewRowColumn12 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/header/news.list.header.actions.js?disableCache=0328
var newsListHeaderActions12 = class extends gridViewRowColumn12 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default12.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.header.row.js?disableCache=0328
var gridViewTableRow12 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/header/news.list.header.js?disableCache=0328
var newsListHeader12 = class extends extender24(news12, gridViewTableRow12) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody12();
title = new newsListHeaderTitle12();
price = new newsListHeaderPrice12();
actions = new newsListHeaderActions12();
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.header.js?disableCache=0328
var gridViewHeader12 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/news.list.table.header.js?disableCache=0328
var newsListTableHeader12 = class extends gridViewHeader12 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader12();
};
// framework/unify/renderCollection.js?disableCache=0328
var renderCollection14 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.body.js?disableCache=0328
var gridViewTableHeader12 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0328
function OR12(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR12, "OR");
// framework/unify/sql/LIKE.js?disableCache=0328
function LIKE12(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE12, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0328
function GREATER_OR_EQUAL12(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL12, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0328
function SMALLER_OR_EQUAL12(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL12, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Android/Pc/Dark/demo/list/news.list.table.body.js?disableCache=0328
var newsListTableBody12 = class extends extender24(renderCollection14, gridViewTableHeader12) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR12(OR12(LIKE12(filter.title, searchTerm), LIKE12(filter.comments.body, searchTerm)), LIKE12(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL12(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL12(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default12.visitor, "READ");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0328
var gridViewBodyColumn12 = class extends tableCell12 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 20;
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/item/news.list.item.body.js?disableCache=0328
var newsListItemBody12 = class extends extender24(body23, gridViewBodyColumn12) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/item/news.list.item.title.js?disableCache=0328
var newsListItemTitle12 = class extends extender24(title34, gridViewBodyColumn12) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/item/news.list.item.price.js?disableCache=0328
var newsListItemPrice12 = class extends extender24(price12, gridViewBodyColumn12) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0328
var deleteButton34 = class extends button12 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default12.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/item/news.list.item.actions.js?disableCache=0328
var newsListItemActions12 = class extends extender24(gridViewBodyColumn12, gridViewBodyColumn12) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton34();
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.body.row.js?disableCache=0328
var gridViewRow12 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/item/news.list.item.js?disableCache=0328
var newsListItem12 = class extends extender24(news12, gridViewRow12) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody12();
title = new newsListItemTitle12();
price = new newsListItemPrice12();
actions = new newsListItemActions12();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default12.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/gridView/gridView.js?disableCache=0328
var gridView12 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Dark/demo/list/news.list.table.js?disableCache=0328
var newsListTable12 = class extends gridView12 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader12();
body = new newsListTableBody12(newsListItem12, new collection16(news12));
};
// framework/cache/platforms/Android/Pc/Dark/demo/edit/news.edit.title.js?disableCache=0328
var newsEditTitle12 = class extends extender24(input12, title34) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Android/Pc/Dark/elements/textarea.js?disableCache=0328
var textarea12 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
margin = 4;
height = "auto";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default24.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/edit/news.edit.body.js?disableCache=0328
var newsPageBody23 = class extends extender24(body23, textarea12) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/edit/news.edit.button.js?disableCache=0328
var editButton23 = class extends button12 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/edit/news.edit.price.js?disableCache=0328
var newsPagePrice12 = class extends extender24(price12, input12) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/label.js?disableCache=0328
var label23 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Android/Pc/Dark/elements/label/left.js?disableCache=0328
var leftLabel12 = class extends label23 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Android/Pc/Dark/elements/panel.js?disableCache=0328
var panel12 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Android/Pc/Dark/elements/window/draggable.js?disableCache=0328
var vector235 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay34(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay34, "delay");
var draggable23 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector235(0, 0);
grabPosition = new vector235(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector235(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay34(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector235(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/panel/row.js?disableCache=0328
var panelRow12 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/window/header.js?disableCache=0328
var maximizeButton12 = class extends icon12 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton12 = class extends icon12 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl12 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton12();
maximizeButton = new maximizeButton12();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title36 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl12 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader12 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl12();
title = new title36();
rightControl = new rightControl12();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Android/Pc/Dark/demo/edit/news.edit.js?disableCache=0328
var newsBodyRow12 = class extends panelRow12 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel12("Message");
body = new newsPageBody23();
};
var newsTitleRow12 = class extends panelRow12 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel12("Title");
title = new newsEditTitle12();
};
var newsPriceRow12 = class extends panelRow12 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel12("Price");
price = new newsPagePrice12();
};
var cancelButton23 = class extends button12 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow12 = class extends panelRow12 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton23();
newsEditbutton = new editButton23();
};
var newsEdit12 = class extends extender24(news12, panel12, draggable23) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader12("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow12();
newsPriceRow = new newsPriceRow12();
newsBodyRow = new newsBodyRow12();
newsButtonRow = new newsButtonRow12();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
this.allow(user_group_permission_default12.visitor, "READ");
this.allow(user_group_permission_default12.member, "WRITE");
this.allow(user_group_permission_default12.admin, "WRITE");
this.allow(user_group_permission_default12.visitor, "WRITE");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsDialogButton.js?disableCache=0328
var newsDialogButton12 = class extends button12 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/search.input.js?disableCache=0328
var searchBar34 = class extends input12 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/select.js?disableCache=0328
var select12 = class extends renderCollection14 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default24.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default12.admin, "READ");
this.allow(user_group_permission_default12.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default24.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/search.select.js?disableCache=0328
var customSelect23 = class extends select12 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/search.widget.js?disableCache=0328
var searchWidget12 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar34();
select = new customSelect23();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0328
var paginationItem12 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0328
var pagination12 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem12();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem12();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem12();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsItemPage.limit.js?disableCache=0328
var limit12 = class extends select12 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0328
var tableControl12 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label23("Select page:");
pagination = new pagination12();
limitLabel = new label23("Select items per page:");
limit = new limit12();
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsItemPage.js?disableCache=0328
var testbutton12 = class extends button12 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage12 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = "100vw";
padding = "0";
newsListHeader = new header12("News Items");
searchWidget = new searchWidget12();
newsListTable = new newsListTable12();
tableControl = new tableControl12();
createNews = new newsEdit12();
testbutton = new testbutton12();
newsDialogButton = new newsDialogButton12();
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
};
// framework/cache/platforms/Android/Pc/Dark/elements/flexbox.js?disableCache=0328
var flexbox23 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Pc/Dark/demo/page/news.page.title.js?disableCache=0328
var newsPageTitle12 = class extends extender24(title34, flexbox23) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
borderRadius = "18px 18px 0 0";
width = "100%";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Android/Pc/Dark/demo/page/news.page.body.js?disableCache=0328
var newsPageBody24 = class extends extender24(flexbox23, body23) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
borderRadius = "0 0 18px 18px";
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/comments.messages.js?disableCache=0328
var commentsMessages12 = class extends renderCollection14 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR12(LIKE12(filter.body, this.value), LIKE12(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default12.visitor, "READ");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0328
var saveEditButton12 = class extends button12 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0328
var commentEditTitle23 = class extends title35 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0328
var commentEditBody23 = class extends extender24(body24, flexbox23) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default24.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0328
var userLabel23 = class extends label23 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0328
var deleteButton35 = class extends button12 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.editButton.js?disableCache=0328
var editButton24 = class extends button12 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
fontSize = 12;
width = "auto";
height = "auto";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.information.js?disableCache=0328
var information12 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton35();
_editButton = new editButton24();
_userLabel = new userLabel23();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/edit/comment.edit.js?disableCache=0328
var editComment12 = class extends comment13 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information12();
body = new commentEditBody23();
title = new commentEditTitle23();
saveButton = new saveEditButton12();
width = "-webkit-fill-available";
width = "100vw";
borderRadius = 18;
margin = 4;
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/create/comment.saveButton.js?disableCache=0328
var saveCommentButton12 = class extends button12 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/create/comment.create.body.js?disableCache=0328
var commentEditBody24 = class extends extender24(body24, textarea12) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Android/Pc/Dark/demo/comment/create/comment.create.js?disableCache=0328
var createComment12 = class extends comment13 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody24();
saveButton = new saveCommentButton12();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default12.member, "WRITE");
this.allow(user_group_permission_default12.admin, "WRITE");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/page/news.page.backButton.js?disableCache=0328
var backButton23 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/page/news.page.edit.button.js?disableCache=0328
var backButton24 = class extends button12 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/filler.js?disableCache=0328
var filler12 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Android/Pc/Dark/demo/page/search.comments.js?disableCache=0328
var searchBar35 = class extends input12 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/page/news.page.js?disableCache=0328
var testDiv12 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle12();
};
var newsPage12 = class extends news12 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
height = "100vh";
paddingTop = "";
boxWidth = "100vw";
width = "100vw";
flexDirection = "column";
_backButton = new backButton23();
_testDiv = new testDiv12();
body = new newsPageBody24();
editButton = new backButton24();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar35();
commentsMessages = new commentsMessages12(editComment12, this.comments);
createComment = new createComment12(this.comments);
filler = new filler12();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.translateX = -width;
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default12.member, "WRITE");
this.allow(user_group_permission_default12.admin, "WRITE");
this.allow(user_group_permission_default12.visitor, "WRITE");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
this.allow(user_group_permission_default12.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/newsPages.js?disableCache=0328
var newsPages12 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage12();
newsPage = new newsPage12();
newsEdit = new newsEdit12();
width = 1800;
};
// framework/cache/platforms/Android/Pc/Dark/elements/preloaders/simpleSpinner.js?disableCache=0328
var line12 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask12 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line12();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox12 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask12();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0328
var themaSelectorImage12 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0328
var selectLabel12 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/themeSelector.js?disableCache=0328
var themeSelector12 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage12();
selectLabel = new selectLabel12();
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0328
var themeOSSelectorItem12 = class extends themeSelector12 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default13.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0328
var osSelectorList12 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem12("Windows");
themeMacOS = new themeOSSelectorItem12("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default13.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0328
var osLabel12 = class extends label23 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/os.js?disableCache=0328
var os12 = class extends panelRow12 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel12("Os");
osSelector = new osSelectorList12();
spinner = new preloaderBox12();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0328
var themeTintSelector12 = class extends themeSelector12 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default13.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0328
var themeTintSelectors12 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector12("Light");
themeDark = new themeTintSelector12("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default13.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0328
var customLabel23 = class extends label23 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/rows/tint.js?disableCache=0328
var tint12 = class extends panelRow12 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel23("Appearance");
themeTintSelectors = new themeTintSelectors12();
spinner = new preloaderBox12();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/appearance/panel.js?disableCache=0328
var appearancePanel12 = class extends panel12 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os12();
tint = new tint12();
};
// framework/cache/platforms/Android/Pc/Dark/demo/pages/settings.js?disableCache=0328
var settings12 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header12("Appearance");
appearancePanel = new appearancePanel12();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0328
var Console13 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default13 = new Console13();
// framework/unify/promiseManager.js?disableCache=0328
var promiseManager13 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0328
var shared13 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object38 = new shared13();
var shared_default13 = object38.get();
// framework/cache/platforms/Android/Pc/Dark/elements/fileUpload.js?disableCache=0328
var fileUpload12 = class extends input12 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager13();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0328
var delay35 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton12 = class extends icon12 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay35(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay35(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.icon.js?disableCache=0328
var fileIcon12 = class extends icon12 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton12();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.upload.js?disableCache=0328
var stream12 = class extends fileUpload12 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon12();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.list.js?disableCache=0328
var fileList12 = class extends panelRow12 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon12();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0328
var removeIcons12 = class extends icon12 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/page.js?disableCache=0328
var page12 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
height = "100vh";
padding = 0;
borderRadius = 0;
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Android/Pc/Dark/elements/image.js?disableCache=0328
var icon_id24 = 0;
var image12 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default24.createElement("img");
useCustomElement = true;
id = icon_id24++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0328
var previewImage12 = class extends image12 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0328
var imagePreviewWindow12 = class extends draggable23 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader12();
previewImage = new previewImage12();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0328
var fileChooserFileIcon12 = class extends icon12 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/checkbox.js?disableCache=0328
var checkbox12 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default24.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0328
var file12 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox12();
icon = new fileChooserFileIcon12();
label = new label23();
};
// framework/cache/platforms/Android/Pc/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0328
var fileChooserFiles12 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file12();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0328
var fileChooserSelectButton12 = class extends button12 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/fileChooser/fileChooser.js?disableCache=0328
var fileChooser12 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles12();
selectButton = new fileChooserSelectButton12();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/fileManager/fileManager.js?disableCache=0328
var fileManager12 = class extends page12 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header12("Upload");
fileupload = new stream12();
filesHeader = new header12("Files");
removeIcons = new removeIcons12();
fileList = new fileList12();
previewWindow = new imagePreviewWindow12();
fileChooser = new fileChooser12();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.move.js?disableCache=0328
var animationBlock78 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel78 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow12 = class extends panelRow12 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel78("Move");
animationBlock = new animationBlock78();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.rotate.js?disableCache=0328
var animationBlock79 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel79 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row67 = class extends panelRow12 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel79("Rotate");
animationBlock = new animationBlock79();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.color.js?disableCache=0328
var animationBlock80 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel80 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row68 = class extends panelRow12 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel80("Background color");
animationBlock = new animationBlock80();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.skewX.js?disableCache=0328
var animationBlock81 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel81 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row69 = class extends panelRow12 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel81("skewX");
animationBlock = new animationBlock81();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0328
var animationBlock82 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel82 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row70 = class extends panelRow12 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel82("Rotate + Move + Background");
animationBlock = new animationBlock82();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.reverse.js?disableCache=0328
var animationBlock83 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton12 = class extends button12 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton12 = class extends button12 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton12 = class extends button12 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton12 = class extends button12 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton12 = class extends button12 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel83 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons23 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton12();
pauseButton = new pauseButton12();
stopButton = new stopButton12();
forwardButton = new forwardButton12();
backwardButton = new backwardButton12();
flexDirection = "column";
};
var row71 = class extends panelRow12 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel83("Reverse");
buttons = new buttons23();
animationBlock = new animationBlock83();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animation.render.js?disableCache=0328
var animationBlock84 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel84 = class extends label23 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row72 = class extends panelRow12 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel84("RenderLoop");
animationBlock = new animationBlock84();
};
// framework/cache/platforms/Android/Pc/Dark/demo/animations/animations.js?disableCache=0328
var animations12 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow12();
rotateAnimation = new row67();
backgroundColor = new row68();
skewX = new row69();
rotateMoveColor = new row70();
reverse = new row71();
render = new row72();
};
// framework/cache/platforms/Android/Pc/Dark/demo/examples/grids.js?disableCache=0328
var label24 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a12 = class extends input12 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b13 = class extends input12 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c12 = class extends input12 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d12 = class extends input12 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA12 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label24("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a12();
b = new b13();
c = new c12();
d = new d12();
};
var gridB12 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label24("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a12();
b = new b13();
c = new c12();
d = new d12();
};
var gridExample12 = class extends page12 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA12();
gridB = new gridB12();
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/header/user.userList.header.username.js?disableCache=0328
var userListHeaderUsername12 = class extends gridViewRowColumn12 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0328
var userListHeaderActions12 = class extends gridViewRowColumn12 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default12.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/header/user.userList.header.js?disableCache=0328
var userListHeader12 = class extends extender24(user13, gridViewTableRow12) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername12();
actions = new userListHeaderActions12();
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/user.userList.table.header.js?disableCache=0328
var userListTableHeader12 = class extends gridViewHeader12 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader12();
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/user.userList.table.body.js?disableCache=0328
var userListTableBody12 = class extends extender24(renderCollection14, gridViewTableHeader12) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE12(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default12.visitor, "READ");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/item/user.userList.item.username.js?disableCache=0328
var userListItemTitle12 = class extends extender24(username13, gridViewBodyColumn12) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0328
var deleteButton36 = class extends button12 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default12.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0328
var userListItemActions12 = class extends extender24(gridViewBodyColumn12, gridViewBodyColumn12) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton36();
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/item/user.userList.item.js?disableCache=0328
var userListItem12 = class extends extender24(user13, gridViewRow12) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle12();
actions = new userListItemActions12();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default12.admin, "DELETE");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/user.userList.table.js?disableCache=0328
var userListTable12 = class extends gridView12 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader12();
body = new userListTableBody12(userListItem12, new collection16(user13));
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/search.js?disableCache=0328
var searchBar36 = class extends input12 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Android/Pc/Dark/user/userList/user.userList.page.js?disableCache=0328
var editPage12 = class extends page12 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header12("Users");
search = new searchBar36();
userTable = new userListTable12();
flexDirection = "column";
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.username.js?disableCache=0328
var editUsername12 = class extends extender24(username13, input12) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.username.row.js?disableCache=0328
var usernameRow12 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label23("Username");
username = new editUsername12();
};
// framework/cache/platforms/Android/Pc/Dark/elements/empty.js?disableCache=0328
var empty12 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/user.edit.button.js?disableCache=0328
var userEditButton12 = class extends button12 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/user.edit.button.row.js?disableCache=0328
var saveButtonRow12 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty12();
userEditButton = new userEditButton12();
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0328
var checkRenderCollection12 = class extends renderCollection14 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default12.admin, "WRITE");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
this.allow(user_group_permission_default12.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.checkbox.js?disableCache=0328
var customCheckbox23 = class extends checkbox12 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0328
var customCheckbox24 = class extends user13 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label23();
checkbox = new customCheckbox23();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0328
var checkboxRow12 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label23("Select users");
renderCollection = new checkRenderCollection12(customCheckbox24, new collection16(user13));
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.select.option.js?disableCache=0328
var customOption12 = class extends extender24(option12, user13) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0328
var customSelect24 = class extends renderCollection14 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default24.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default12.admin, "WRITE");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
this.allow(user_group_permission_default12.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.select.row.js?disableCache=0328
var optionRow12 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label23("Select user");
renderCollection = new customSelect24(customOption12, new collection16(user13));
};
// framework/cache/platforms/Android/Pc/Dark/user/edit/edit.user.js?disableCache=0328
var editUser12 = class extends extender24(user13, page12) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header12("Edit user");
usernameRow = new usernameRow12();
selectRow = new optionRow12();
checkboxRow = new checkboxRow12();
showSelectedUser = new customSelect24(customOption12, this.selectedUsers);
saveButtonRow = new saveButtonRow12();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default12.admin, "WRITE");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
this.allow(user_group_permission_default12.visitor, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/signup/signup.username.js?disableCache=0328
var signUpUsername12 = class extends extender24(username13, input12) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Android/Pc/Dark/elements/inputPassword.js?disableCache=0328
var inputPassword12 = class extends input12 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Android/Pc/Dark/user/signup/signup.password.js?disableCache=0328
var signupPassword12 = class extends inputPassword12 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Android/Pc/Dark/user/signup/signup.passwordCheck.js?disableCache=0328
var signupPasswordCheck12 = class extends inputPassword12 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0328
var cookieManager13 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default13 = new cookieManager13();
// framework/cache/platforms/Android/Pc/Dark/user/signup/signup.button.js?disableCache=0328
var signupButton12 = class extends button12 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Android/Pc/Dark/user/signup/signup.customLabel.js?disableCache=0328
var customLabel24 = class extends label23 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Android/Pc/Dark/user/signup/user.signup.js?disableCache=0328
var signup12 = class extends extender24(user13, page12) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default24.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header12("Signup");
// Children
userLabel = new customLabel24("Username");
username = new signUpUsername12();
passwordLabel = new customLabel24("Password");
password = new signupPassword12();
passwordAgainLabel = new customLabel24("Password again");
passwordAgain = new signupPasswordCheck12();
signUpButton = new signupButton12();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default12.visitor, "PROCESS");
this.allow(user_group_permission_default12.member, "PROCESS");
this.allow(user_group_permission_default12.admin, "PROCESS");
}
};
// framework/cache/platforms/Android/Pc/Dark/user/signin/signin.username.js?disableCache=0328
var signinUsername12 = class extends extender24(username13, input12) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Android/Pc/Dark/user/user.password.js?disableCache=0328
var password12 = class extends inputPassword12 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Android/Pc/Dark/user/signin/signin.password.js?disableCache=0328
var signinPassword12 = class extends password12 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Android/Pc/Dark/user/signin/signin.button.js?disableCache=0328
var signinFormButton12 = class extends button12 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
//display = "none";
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0328
var unify13 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default13 = new unify13();
// framework/cache/platforms/Android/Pc/Dark/user/signin/signin.cancel.button.js?disableCache=0328
var cancelButton24 = class extends button12 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
};
// framework/cache/platforms/Android/Pc/Dark/user/signin/user.signin.js?disableCache=0328
var tussenObject12 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword12();
width = "100%";
};
var buttons24 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
width = "100vw";
position = "absolute";
bottom = "0";
cancelButton = new cancelButton24();
signinButton = new signinFormButton12();
};
var hint12 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin12 = class extends extender24(user13, page12) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint12();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default24.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header12("Signin");
//userLabel = new label("Username");
username = new signinUsername12();
//passwordLabel = new label("Password");
tussenObject = new tussenObject12();
buttons = new buttons24();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user13();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default13.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user13();
client2.user = visitor62;
client2.user.error = false;
unify_default13.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default13.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default12.visitor, "PROCESS");
this.allow(user_group_permission_default12.member, "PROCESS");
this.allow(user_group_permission_default12.admin, "PROCESS");
this.allow(user_group_permission_default12.member, "READ");
this.allow(user_group_permission_default12.admin, "READ");
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/rightSide/rightSide.js?disableCache=0119
var rightSide12 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages12();
signup = new signup12();
signin = new signin12();
settings = new settings12();
fileManager = new fileManager12();
animations = new animations12();
gridExample = new gridExample12();
userListPage = new editPage12();
editUser = new editUser12();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0119
var documentTool25 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object39 = new documentTool25();
var document_default25 = object39.getDocument();
// framework/unify/math/vector2.js?disableCache=0119
var vector236 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Android/Pc/Dark/elements/flexbox.js?disableCache=0119
var flexbox24 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Android/Pc/Dark/elements/window/frostedGlass.js?disableCache=0119
var frostedGlass24 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Android/Pc/Dark/elements/window/draggable.js?disableCache=0119
var vector237 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay36(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay36, "delay");
var draggable24 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector237(0, 0);
grabPosition = new vector237(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
this.transform = "translate(0px, 0px)";
return true;
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector237(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay36(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector237(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Android/Pc/Dark/demo/application.js
var application13 = class extends extender23(frostedGlass24, flexbox24, draggable24) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton12();
leftSide = new leftSide12();
rightSide = new rightSide12();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "column";
// Pragma's
lastPosition = new vector236(0, 0);
fontFamily = "android";
transform = "translate(0px, 0px)";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default25.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector236(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0099
function extender25(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender25, "extender");
// framework/unify/extender.js?disableCache=0653
function extender26(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender26, "extender");
// framework/cache/platforms/Linux/Mobile/Light/elements/button.js?disableCache=0653
var button13 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/icon.js?disableCache=0653
var icon_id25 = 0;
var icon13 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id25++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/minimizeButton.js?disableCache=0099
var minimizeButton13 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.js?disableCache=0653
var menuButton13 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.news.js?disableCache=0653
var newsButton13 = class extends menuButton13 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0653
var settingsButton37 = class extends menuButton13 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0653
var collection17 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0653
var datatype_default14 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0653
var documentTool26 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object40 = new documentTool26();
var document_default26 = object40.getDocument();
// framework/cache/platforms/Linux/Mobile/Light/elements/option.js?disableCache=0653
var option13 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default26.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/group/user.group.js?disableCache=0653
var visitor26 = class extends option13 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member13 = class extends option13 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin25 = class extends option13 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups13 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member13();
admin = new admin25();
visitor = new visitor26();
};
// framework/cache/platforms/Linux/Mobile/Light/user/group/user.group.permission.js?disableCache=0653
var user_group_permission_default13 = new groups13();
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0653
var signinPageButton13 = class extends menuButton13 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0653
var signinButton13 = class extends menuButton13 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0653
var visitor27 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager14 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor27();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default14 = new userManager14();
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0653
var signoutButton13 = class extends menuButton13 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default14.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default13.member, "PROCESS");
this.allow(user_group_permission_default13.admin, "PROCESS");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0653
var fileMangerButton13 = class extends menuButton13 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0653
var settingsButton38 = class extends menuButton13 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.users.js?disableCache=0653
var usersPageButton13 = class extends menuButton13 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default13.member, "PROCESS");
this.allow(user_group_permission_default13.admin, "PROCESS");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0653
var settingsButton39 = class extends menuButton13 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/header.js?disableCache=0653
var header13 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.header.js?disableCache=0653
var menuHeader13 = class extends header13 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/leftSide/leftSide.js?disableCache=0099
var leftSide13 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader13();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton13();
settingsButton = new settingsButton37();
usersButton = new usersPageButton13();
signinButton = new signinPageButton13();
signoutButton = new signoutButton13();
signupButton = new signinButton13();
animationsButton = new settingsButton38();
gridButton = new settingsButton39();
fileManagerButton = new fileMangerButton13();
};
// framework/unify/table.js?disableCache=0653
var table15 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0653
var column13 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/news.title.js?disableCache=0653
var title37 = class extends column13 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/news.body.js?disableCache=0653
var body25 = class extends column13 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/news.price.js?disableCache=0653
var price13 = class extends column13 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default14.REAL;
};
// framework/cache/platforms/Linux/Mobile/Light/user/user.username.js?disableCache=0653
var username14 = class extends column13 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0653
var tools15 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll14(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default14 = new tools15();
// framework/cache/platforms/Linux/Mobile/Light/elements/input.js?disableCache=0653
var input13 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default26.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default26.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default26.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/user.salt.js?disableCache=0653
var salt14 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default14.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Light/user/user.hash.js?disableCache=0653
var hash14 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default14.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Light/user/user.js?disableCache=0653
var user14 = class _user extends table15 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username14();
salt = new salt14();
hash = new hash14();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups13();
selectedUsers = new collection17(_user);
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/comment.body.js?disableCache=0653
var body26 = class extends column13 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/comment.title.js?disableCache=0653
var title38 = class extends column13 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/comment.js?disableCache=0653
var comment14 = class extends table15 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user14();
title = new title38();
body = new body26();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/news.js?disableCache=0653
var news13 = class extends table15 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title37();
body = new body25();
price = new price13();
comments = new collection17(comment14);
};
// framework/cache/platforms/Linux/Mobile/Light/elements/tableCell.js?disableCache=0653
var tableCell13 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0653
var sortBy13 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.header.row.column.js?disableCache=0653
var gridViewRowColumn13 = class extends tableCell13 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy13();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/header/news.list.header.body.js?disableCache=0653
var newsListHeaderBody13 = class extends gridViewRowColumn13 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/header/news.list.header.title.js?disableCache=0653
var newsListHeaderTitle13 = class extends gridViewRowColumn13 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/header/news.list.header.price.js?disableCache=0653
var newsListHeaderPrice13 = class extends gridViewRowColumn13 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/header/news.list.header.actions.js?disableCache=0653
var newsListHeaderActions13 = class extends gridViewRowColumn13 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default13.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.header.row.js?disableCache=0653
var gridViewTableRow13 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/header/news.list.header.js?disableCache=0653
var newsListHeader13 = class extends extender26(news13, gridViewTableRow13) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody13();
title = new newsListHeaderTitle13();
price = new newsListHeaderPrice13();
actions = new newsListHeaderActions13();
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.header.js?disableCache=0653
var gridViewHeader13 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/news.list.table.header.js?disableCache=0653
var newsListTableHeader13 = class extends gridViewHeader13 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader13();
};
// framework/unify/renderCollection.js?disableCache=0653
var renderCollection15 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.body.js?disableCache=0653
var gridViewTableHeader13 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0653
function OR13(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR13, "OR");
// framework/unify/sql/LIKE.js?disableCache=0653
function LIKE13(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE13, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0653
function GREATER_OR_EQUAL13(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL13, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0653
function SMALLER_OR_EQUAL13(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL13, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Linux/Mobile/Light/demo/list/news.list.table.body.js?disableCache=0653
var newsListTableBody13 = class extends extender26(renderCollection15, gridViewTableHeader13) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR13(OR13(LIKE13(filter.title, searchTerm), LIKE13(filter.comments.body, searchTerm)), LIKE13(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL13(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL13(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default13.visitor, "READ");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.body.row.column.js?disableCache=0653
var gridViewBodyColumn13 = class extends tableCell13 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/item/news.list.item.body.js?disableCache=0653
var newsListItemBody13 = class extends extender26(body25, gridViewBodyColumn13) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/item/news.list.item.title.js?disableCache=0653
var newsListItemTitle13 = class extends extender26(title37, gridViewBodyColumn13) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/item/news.list.item.price.js?disableCache=0653
var newsListItemPrice13 = class extends extender26(price13, gridViewBodyColumn13) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0653
var deleteButton37 = class extends button13 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default13.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/item/news.list.item.actions.js?disableCache=0653
var newsListItemActions13 = class extends extender26(gridViewBodyColumn13, gridViewBodyColumn13) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton37();
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.body.row.js?disableCache=0653
var gridViewRow13 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/item/news.list.item.js?disableCache=0653
var newsListItem13 = class extends extender26(news13, gridViewRow13) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody13();
title = new newsListItemTitle13();
price = new newsListItemPrice13();
actions = new newsListItemActions13();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default13.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/gridView/gridView.js?disableCache=0653
var gridView13 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/list/news.list.table.js?disableCache=0653
var newsListTable13 = class extends gridView13 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader13();
body = new newsListTableBody13(newsListItem13, new collection17(news13));
};
// framework/cache/platforms/Linux/Mobile/Light/demo/edit/news.edit.title.js?disableCache=0653
var newsEditTitle13 = class extends extender26(input13, title37) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Linux/Mobile/Light/elements/textarea.js?disableCache=0653
var textarea13 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default26.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/edit/news.edit.body.js?disableCache=0653
var newsPageBody25 = class extends extender26(body25, textarea13) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/edit/news.edit.button.js?disableCache=0653
var editButton25 = class extends button13 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/edit/news.edit.price.js?disableCache=0653
var newsPagePrice13 = class extends extender26(price13, input13) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/label.js?disableCache=0653
var label25 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/label/left.js?disableCache=0653
var leftLabel13 = class extends label25 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Linux/Mobile/Light/elements/panel.js?disableCache=0653
var panel13 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Linux/Mobile/Light/elements/window/draggable.js?disableCache=0653
var vector238 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay37(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay37, "delay");
var draggable25 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector238(0, 0);
grabPosition = new vector238(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector238(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay37(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector238(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/panel/row.js?disableCache=0653
var panelRow13 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/window/header.js?disableCache=0653
var maximizeButton13 = class extends icon13 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton13 = class extends icon13 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl13 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton13();
maximizeButton = new maximizeButton13();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title39 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl13 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader13 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl13();
title = new title39();
rightControl = new rightControl13();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/edit/news.edit.js?disableCache=0653
var newsBodyRow13 = class extends panelRow13 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel13("Message");
body = new newsPageBody25();
};
var newsTitleRow13 = class extends panelRow13 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel13("Title");
title = new newsEditTitle13();
};
var newsPriceRow13 = class extends panelRow13 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel13("Price");
price = new newsPagePrice13();
};
var cancelButton25 = class extends button13 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow13 = class extends panelRow13 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton25();
newsEditbutton = new editButton25();
};
var newsEdit13 = class extends extender26(news13, panel13, draggable25) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader13("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow13();
newsPriceRow = new newsPriceRow13();
newsBodyRow = new newsBodyRow13();
newsButtonRow = new newsButtonRow13();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
this.allow(user_group_permission_default13.visitor, "READ");
this.allow(user_group_permission_default13.member, "WRITE");
this.allow(user_group_permission_default13.admin, "WRITE");
this.allow(user_group_permission_default13.visitor, "WRITE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsDialogButton.js?disableCache=0653
var newsDialogButton13 = class extends button13 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/search.input.js?disableCache=0653
var searchBar37 = class extends input13 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/select.js?disableCache=0653
var select13 = class extends renderCollection15 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default26.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default13.admin, "READ");
this.allow(user_group_permission_default13.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default26.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/search.select.js?disableCache=0653
var customSelect25 = class extends select13 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/search.widget.js?disableCache=0653
var searchWidget13 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar37();
select = new customSelect25();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0653
var paginationItem13 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsItemPage.pagination.js?disableCache=0653
var pagination13 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem13();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem13();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem13();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsItemPage.limit.js?disableCache=0653
var limit13 = class extends select13 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0653
var tableControl13 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label25("Select page:");
pagination = new pagination13();
limitLabel = new label25("Select items per page:");
limit = new limit13();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsItemPage.js?disableCache=0653
var testbutton13 = class extends button13 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage13 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header13("News Items");
searchWidget = new searchWidget13();
newsListTable = new newsListTable13();
tableControl = new tableControl13();
createNews = new newsEdit13();
testbutton = new testbutton13();
newsDialogButton = new newsDialogButton13();
};
// framework/cache/platforms/Linux/Mobile/Light/elements/flexbox.js?disableCache=0653
var flexbox25 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/page/news.page.title.js?disableCache=0653
var newsPageTitle13 = class extends extender26(title37, flexbox25) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/page/news.page.body.js?disableCache=0653
var newsPageBody26 = class extends extender26(flexbox25, body25) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/comments.messages.js?disableCache=0653
var commentsMessages13 = class extends renderCollection15 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR13(LIKE13(filter.body, this.value), LIKE13(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default13.visitor, "READ");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.saveButton.js?disableCache=0653
var saveEditButton13 = class extends button13 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.edit.title.js?disableCache=0653
var commentEditTitle25 = class extends title38 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.edit.body.js?disableCache=0653
var commentEditBody25 = class extends extender26(body26, flexbox25) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default26.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.userLabel.js?disableCache=0653
var userLabel25 = class extends label25 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0653
var deleteButton38 = class extends button13 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.editButton.js?disableCache=0653
var editButton26 = class extends button13 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.information.js?disableCache=0653
var information13 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton38();
_editButton = new editButton26();
_userLabel = new userLabel25();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/edit/comment.edit.js?disableCache=0653
var editComment13 = class extends comment14 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information13();
body = new commentEditBody25();
title = new commentEditTitle25();
saveButton = new saveEditButton13();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/create/comment.saveButton.js?disableCache=0653
var saveCommentButton13 = class extends button13 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/create/comment.create.body.js?disableCache=0653
var commentEditBody26 = class extends extender26(body26, textarea13) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/comment/create/comment.create.js?disableCache=0653
var createComment13 = class extends comment14 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody26();
saveButton = new saveCommentButton13();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default13.member, "WRITE");
this.allow(user_group_permission_default13.admin, "WRITE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/page/news.page.backButton.js?disableCache=0653
var backButton25 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/page/news.page.edit.button.js?disableCache=0653
var backButton26 = class extends button13 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/filler.js?disableCache=0653
var filler13 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/page/search.comments.js?disableCache=0653
var searchBar38 = class extends input13 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/page/news.page.js?disableCache=0653
var testDiv13 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle13();
};
var newsPage13 = class extends news13 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton25();
_testDiv = new testDiv13();
body = new newsPageBody26();
editButton = new backButton26();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar38();
commentsMessages = new commentsMessages13(editComment13, this.comments);
createComment = new createComment13(this.comments);
filler = new filler13();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default13.member, "WRITE");
this.allow(user_group_permission_default13.admin, "WRITE");
this.allow(user_group_permission_default13.visitor, "WRITE");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
this.allow(user_group_permission_default13.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/newsPages.js?disableCache=0653
var newsPages13 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage13();
newsPage = new newsPage13();
newsEdit = new newsEdit13();
width = 1800;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/preloaders/simpleSpinner.js?disableCache=0653
var line13 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask13 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line13();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox13 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask13();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0653
var themaSelectorImage13 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0653
var selectLabel13 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/themeSelector.js?disableCache=0653
var themeSelector13 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage13();
selectLabel = new selectLabel13();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0653
var themeOSSelectorItem13 = class extends themeSelector13 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default14.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0653
var osSelectorList13 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem13("Windows");
themeMacOS = new themeOSSelectorItem13("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default14.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/os.label.js?disableCache=0653
var osLabel13 = class extends label25 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/os.js?disableCache=0653
var os13 = class extends panelRow13 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel13("Os");
osSelector = new osSelectorList13();
spinner = new preloaderBox13();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0653
var themeTintSelector13 = class extends themeSelector13 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default14.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0653
var themeTintSelectors13 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector13("Light");
themeDark = new themeTintSelector13("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default14.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0653
var customLabel25 = class extends label25 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/rows/tint.js?disableCache=0653
var tint13 = class extends panelRow13 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel25("Appearance");
themeTintSelectors = new themeTintSelectors13();
spinner = new preloaderBox13();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/appearance/panel.js?disableCache=0653
var appearancePanel13 = class extends panel13 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os13();
tint = new tint13();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/pages/settings.js?disableCache=0653
var settings13 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header13("Appearance");
appearancePanel = new appearancePanel13();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0653
var Console14 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default14 = new Console14();
// framework/unify/promiseManager.js?disableCache=0653
var promiseManager14 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0653
var shared14 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object41 = new shared14();
var shared_default14 = object41.get();
// framework/cache/platforms/Linux/Mobile/Light/elements/fileUpload.js?disableCache=0653
var fileUpload13 = class extends input13 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager14();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0653
var delay38 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton13 = class extends icon13 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay38(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay38(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.icon.js?disableCache=0653
var fileIcon13 = class extends icon13 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton13();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.upload.js?disableCache=0653
var stream13 = class extends fileUpload13 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon13();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.list.js?disableCache=0653
var fileList13 = class extends panelRow13 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon13();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0653
var removeIcons13 = class extends icon13 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/page.js?disableCache=0653
var page13 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/image.js?disableCache=0653
var icon_id26 = 0;
var image13 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default26.createElement("img");
useCustomElement = true;
id = icon_id26++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0653
var previewImage13 = class extends image13 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0653
var imagePreviewWindow13 = class extends draggable25 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader13();
previewImage = new previewImage13();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0653
var fileChooserFileIcon13 = class extends icon13 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/checkbox.js?disableCache=0653
var checkbox13 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default26.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/fileChooser/fileChooser.file.js?disableCache=0653
var file13 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox13();
icon = new fileChooserFileIcon13();
label = new label25();
};
// framework/cache/platforms/Linux/Mobile/Light/elements/fileChooser/fileChooser.files.js?disableCache=0653
var fileChooserFiles13 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file13();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0653
var fileChooserSelectButton13 = class extends button13 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/fileChooser/fileChooser.js?disableCache=0653
var fileChooser13 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles13();
selectButton = new fileChooserSelectButton13();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/fileManager/fileManager.js?disableCache=0653
var fileManager13 = class extends page13 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header13("Upload");
fileupload = new stream13();
filesHeader = new header13("Files");
removeIcons = new removeIcons13();
fileList = new fileList13();
previewWindow = new imagePreviewWindow13();
fileChooser = new fileChooser13();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.move.js?disableCache=0653
var animationBlock85 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel85 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow13 = class extends panelRow13 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel85("Move");
animationBlock = new animationBlock85();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.rotate.js?disableCache=0653
var animationBlock86 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel86 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row73 = class extends panelRow13 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel86("Rotate");
animationBlock = new animationBlock86();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.color.js?disableCache=0653
var animationBlock87 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel87 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row74 = class extends panelRow13 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel87("Background color");
animationBlock = new animationBlock87();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.skewX.js?disableCache=0653
var animationBlock88 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel88 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row75 = class extends panelRow13 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel88("skewX");
animationBlock = new animationBlock88();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0653
var animationBlock89 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel89 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row76 = class extends panelRow13 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel89("Rotate + Move + Background");
animationBlock = new animationBlock89();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.reverse.js?disableCache=0653
var animationBlock90 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton13 = class extends button13 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton13 = class extends button13 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton13 = class extends button13 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton13 = class extends button13 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton13 = class extends button13 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel90 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons25 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton13();
pauseButton = new pauseButton13();
stopButton = new stopButton13();
forwardButton = new forwardButton13();
backwardButton = new backwardButton13();
flexDirection = "column";
};
var row77 = class extends panelRow13 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel90("Reverse");
buttons = new buttons25();
animationBlock = new animationBlock90();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animation.render.js?disableCache=0653
var animationBlock91 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel91 = class extends label25 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row78 = class extends panelRow13 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel91("RenderLoop");
animationBlock = new animationBlock91();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/animations/animations.js?disableCache=0653
var animations13 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow13();
rotateAnimation = new row73();
backgroundColor = new row74();
skewX = new row75();
rotateMoveColor = new row76();
reverse = new row77();
render = new row78();
};
// framework/cache/platforms/Linux/Mobile/Light/demo/examples/grids.js?disableCache=0653
var label26 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a13 = class extends input13 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b14 = class extends input13 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c13 = class extends input13 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d13 = class extends input13 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA13 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label26("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a13();
b = new b14();
c = new c13();
d = new d13();
};
var gridB13 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label26("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a13();
b = new b14();
c = new c13();
d = new d13();
};
var gridExample13 = class extends page13 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA13();
gridB = new gridB13();
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/header/user.userList.header.username.js?disableCache=0653
var userListHeaderUsername13 = class extends gridViewRowColumn13 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/header/user.userList.header.actions.js?disableCache=0653
var userListHeaderActions13 = class extends gridViewRowColumn13 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default13.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/header/user.userList.header.js?disableCache=0653
var userListHeader13 = class extends extender26(user14, gridViewTableRow13) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername13();
actions = new userListHeaderActions13();
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/user.userList.table.header.js?disableCache=0653
var userListTableHeader13 = class extends gridViewHeader13 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader13();
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/user.userList.table.body.js?disableCache=0653
var userListTableBody13 = class extends extender26(renderCollection15, gridViewTableHeader13) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE13(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default13.visitor, "READ");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/item/user.userList.item.username.js?disableCache=0653
var userListItemTitle13 = class extends extender26(username14, gridViewBodyColumn13) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0653
var deleteButton39 = class extends button13 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default13.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/item/user.userList.item.actions.js?disableCache=0653
var userListItemActions13 = class extends extender26(gridViewBodyColumn13, gridViewBodyColumn13) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton39();
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/item/user.userList.item.js?disableCache=0653
var userListItem13 = class extends extender26(user14, gridViewRow13) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle13();
actions = new userListItemActions13();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default13.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/user.userList.table.js?disableCache=0653
var userListTable13 = class extends gridView13 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader13();
body = new userListTableBody13(userListItem13, new collection17(user14));
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/search.js?disableCache=0653
var searchBar39 = class extends input13 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/userList/user.userList.page.js?disableCache=0653
var editPage13 = class extends page13 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header13("Users");
search = new searchBar39();
userTable = new userListTable13();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.username.js?disableCache=0653
var editUsername13 = class extends extender26(username14, input13) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.username.row.js?disableCache=0653
var usernameRow13 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label25("Username");
username = new editUsername13();
};
// framework/cache/platforms/Linux/Mobile/Light/elements/empty.js?disableCache=0653
var empty13 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/user.edit.button.js?disableCache=0653
var userEditButton13 = class extends button13 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/user.edit.button.row.js?disableCache=0653
var saveButtonRow13 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty13();
userEditButton = new userEditButton13();
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0653
var checkRenderCollection13 = class extends renderCollection15 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default13.admin, "WRITE");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
this.allow(user_group_permission_default13.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.checkbox.js?disableCache=0653
var customCheckbox25 = class extends checkbox13 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0653
var customCheckbox26 = class extends user14 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label25();
checkbox = new customCheckbox25();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.checkbox.row.js?disableCache=0653
var checkboxRow13 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label25("Select users");
renderCollection = new checkRenderCollection13(customCheckbox26, new collection17(user14));
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.select.option.js?disableCache=0653
var customOption13 = class extends extender26(option13, user14) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0653
var customSelect26 = class extends renderCollection15 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default26.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default13.admin, "WRITE");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
this.allow(user_group_permission_default13.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.select.row.js?disableCache=0653
var optionRow13 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label25("Select user");
renderCollection = new customSelect26(customOption13, new collection17(user14));
};
// framework/cache/platforms/Linux/Mobile/Light/user/edit/edit.user.js?disableCache=0653
var editUser13 = class extends extender26(user14, page13) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header13("Edit user");
usernameRow = new usernameRow13();
selectRow = new optionRow13();
checkboxRow = new checkboxRow13();
showSelectedUser = new customSelect26(customOption13, this.selectedUsers);
saveButtonRow = new saveButtonRow13();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default13.admin, "WRITE");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
this.allow(user_group_permission_default13.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/signup/signup.username.js?disableCache=0653
var signUpUsername13 = class extends extender26(username14, input13) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/inputPassword.js?disableCache=0653
var inputPassword13 = class extends input13 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/signup/signup.password.js?disableCache=0653
var signupPassword13 = class extends inputPassword13 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Linux/Mobile/Light/user/signup/signup.passwordCheck.js?disableCache=0653
var signupPasswordCheck13 = class extends inputPassword13 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0653
var cookieManager14 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default14 = new cookieManager14();
// framework/cache/platforms/Linux/Mobile/Light/user/signup/signup.button.js?disableCache=0653
var signupButton13 = class extends button13 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/signup/signup.customLabel.js?disableCache=0653
var customLabel26 = class extends label25 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Linux/Mobile/Light/user/signup/user.signup.js?disableCache=0653
var signup13 = class extends extender26(user14, page13) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default26.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header13("Signup");
// Children
userLabel = new customLabel26("Username");
username = new signUpUsername13();
passwordLabel = new customLabel26("Password");
password = new signupPassword13();
passwordAgainLabel = new customLabel26("Password again");
passwordAgain = new signupPasswordCheck13();
signUpButton = new signupButton13();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default13.visitor, "PROCESS");
this.allow(user_group_permission_default13.member, "PROCESS");
this.allow(user_group_permission_default13.admin, "PROCESS");
}
};
// framework/cache/platforms/Linux/Mobile/Light/user/signin/signin.username.js?disableCache=0653
var signinUsername13 = class extends extender26(username14, input13) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Linux/Mobile/Light/user/user.password.js?disableCache=0653
var password13 = class extends inputPassword13 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Linux/Mobile/Light/user/signin/signin.password.js?disableCache=0653
var signinPassword13 = class extends password13 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Linux/Mobile/Light/user/signin/signin.button.js?disableCache=0653
var signinFormButton13 = class extends button13 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0653
var unify14 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default14 = new unify14();
// framework/cache/platforms/Linux/Mobile/Light/user/signin/signin.cancel.button.js?disableCache=0653
var cancelButton26 = class extends button13 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Light/user/signin/user.signin.js?disableCache=0653
var tussenObject13 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword13();
width = "100%";
};
var buttons26 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton26();
signinButton = new signinFormButton13();
};
var hint13 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin13 = class extends extender26(user14, page13) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint13();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default26.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header13("Signin");
//userLabel = new label("Username");
username = new signinUsername13();
//passwordLabel = new label("Password");
tussenObject = new tussenObject13();
buttons = new buttons26();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user14();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default14.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user14();
client2.user = visitor62;
client2.user.error = false;
unify_default14.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default14.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default13.visitor, "PROCESS");
this.allow(user_group_permission_default13.member, "PROCESS");
this.allow(user_group_permission_default13.admin, "PROCESS");
this.allow(user_group_permission_default13.member, "READ");
this.allow(user_group_permission_default13.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/rightSide/rightSide.js?disableCache=0099
var rightSide13 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages13();
signup = new signup13();
signin = new signin13();
settings = new settings13();
fileManager = new fileManager13();
animations = new animations13();
gridExample = new gridExample13();
userListPage = new editPage13();
editUser = new editUser13();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0099
var documentTool27 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object42 = new documentTool27();
var document_default27 = object42.getDocument();
// framework/unify/math/vector2.js?disableCache=0099
var vector239 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/flexbox.js?disableCache=0099
var flexbox26 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Mobile/Light/elements/window/frostedGlass.js?disableCache=0099
var frostedGlass26 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Linux/Mobile/Light/elements/window/draggable.js?disableCache=0099
var vector240 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay39(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay39, "delay");
var draggable26 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector240(0, 0);
grabPosition = new vector240(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector240(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay39(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector240(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Mobile/Light/demo/application.js
var application14 = class extends extender25(frostedGlass26, flexbox26, draggable26) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton13();
leftSide = new leftSide13();
rightSide = new rightSide13();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default27.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector239(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0575
function extender27(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender27, "extender");
// framework/unify/extender.js?disableCache=0905
function extender28(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender28, "extender");
// framework/cache/platforms/Linux/Mobile/Dark/elements/button.js?disableCache=0905
var button14 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/icon.js?disableCache=0905
var icon_id27 = 0;
var icon14 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id27++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/minimizeButton.js?disableCache=0575
var minimizeButton14 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.js?disableCache=0905
var menuButton14 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0905
var newsButton14 = class extends menuButton14 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0905
var settingsButton40 = class extends menuButton14 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0905
var collection18 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0905
var datatype_default15 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0905
var documentTool28 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object43 = new documentTool28();
var document_default28 = object43.getDocument();
// framework/cache/platforms/Linux/Mobile/Dark/elements/option.js?disableCache=0905
var option14 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default28.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/group/user.group.js?disableCache=0905
var visitor28 = class extends option14 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member14 = class extends option14 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin27 = class extends option14 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups14 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member14();
admin = new admin27();
visitor = new visitor28();
};
// framework/cache/platforms/Linux/Mobile/Dark/user/group/user.group.permission.js?disableCache=0905
var user_group_permission_default14 = new groups14();
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0905
var signinPageButton14 = class extends menuButton14 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0905
var signinButton14 = class extends menuButton14 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0905
var visitor29 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager15 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor29();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default15 = new userManager15();
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0905
var signoutButton14 = class extends menuButton14 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default15.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default14.member, "PROCESS");
this.allow(user_group_permission_default14.admin, "PROCESS");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0905
var fileMangerButton14 = class extends menuButton14 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0905
var settingsButton41 = class extends menuButton14 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0905
var usersPageButton14 = class extends menuButton14 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default14.member, "PROCESS");
this.allow(user_group_permission_default14.admin, "PROCESS");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0905
var settingsButton42 = class extends menuButton14 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/header.js?disableCache=0905
var header14 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.header.js?disableCache=0905
var menuHeader14 = class extends header14 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/leftSide/leftSide.js?disableCache=0575
var leftSide14 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader14();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton14();
settingsButton = new settingsButton40();
usersButton = new usersPageButton14();
signinButton = new signinPageButton14();
signoutButton = new signoutButton14();
signupButton = new signinButton14();
animationsButton = new settingsButton41();
gridButton = new settingsButton42();
fileManagerButton = new fileMangerButton14();
};
// framework/unify/table.js?disableCache=0905
var table16 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0905
var column14 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/news.title.js?disableCache=0905
var title40 = class extends column14 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/news.body.js?disableCache=0905
var body27 = class extends column14 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/news.price.js?disableCache=0905
var price14 = class extends column14 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default15.REAL;
};
// framework/cache/platforms/Linux/Mobile/Dark/user/user.username.js?disableCache=0905
var username15 = class extends column14 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0905
var tools16 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll15(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default15 = new tools16();
// framework/cache/platforms/Linux/Mobile/Dark/elements/input.js?disableCache=0905
var input14 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default28.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default28.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default28.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/user.salt.js?disableCache=0905
var salt15 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default15.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/user.hash.js?disableCache=0905
var hash15 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default15.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/user.js?disableCache=0905
var user15 = class _user extends table16 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username15();
salt = new salt15();
hash = new hash15();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups14();
selectedUsers = new collection18(_user);
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/comment.body.js?disableCache=0905
var body28 = class extends column14 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/comment.title.js?disableCache=0905
var title41 = class extends column14 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/comment.js?disableCache=0905
var comment15 = class extends table16 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user15();
title = new title41();
body = new body28();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/news.js?disableCache=0905
var news14 = class extends table16 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title40();
body = new body27();
price = new price14();
comments = new collection18(comment15);
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/tableCell.js?disableCache=0905
var tableCell14 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0905
var sortBy14 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0905
var gridViewRowColumn14 = class extends tableCell14 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy14();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/header/news.list.header.body.js?disableCache=0905
var newsListHeaderBody14 = class extends gridViewRowColumn14 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/header/news.list.header.title.js?disableCache=0905
var newsListHeaderTitle14 = class extends gridViewRowColumn14 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/header/news.list.header.price.js?disableCache=0905
var newsListHeaderPrice14 = class extends gridViewRowColumn14 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/header/news.list.header.actions.js?disableCache=0905
var newsListHeaderActions14 = class extends gridViewRowColumn14 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default14.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.header.row.js?disableCache=0905
var gridViewTableRow14 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/header/news.list.header.js?disableCache=0905
var newsListHeader14 = class extends extender28(news14, gridViewTableRow14) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody14();
title = new newsListHeaderTitle14();
price = new newsListHeaderPrice14();
actions = new newsListHeaderActions14();
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.header.js?disableCache=0905
var gridViewHeader14 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/news.list.table.header.js?disableCache=0905
var newsListTableHeader14 = class extends gridViewHeader14 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader14();
};
// framework/unify/renderCollection.js?disableCache=0905
var renderCollection16 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.body.js?disableCache=0905
var gridViewTableHeader14 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0905
function OR14(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR14, "OR");
// framework/unify/sql/LIKE.js?disableCache=0905
function LIKE14(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE14, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0905
function GREATER_OR_EQUAL14(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL14, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0905
function SMALLER_OR_EQUAL14(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL14, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/news.list.table.body.js?disableCache=0905
var newsListTableBody14 = class extends extender28(renderCollection16, gridViewTableHeader14) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR14(OR14(LIKE14(filter.title, searchTerm), LIKE14(filter.comments.body, searchTerm)), LIKE14(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL14(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL14(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default14.visitor, "READ");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0905
var gridViewBodyColumn14 = class extends tableCell14 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/item/news.list.item.body.js?disableCache=0905
var newsListItemBody14 = class extends extender28(body27, gridViewBodyColumn14) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/item/news.list.item.title.js?disableCache=0905
var newsListItemTitle14 = class extends extender28(title40, gridViewBodyColumn14) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/item/news.list.item.price.js?disableCache=0905
var newsListItemPrice14 = class extends extender28(price14, gridViewBodyColumn14) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0905
var deleteButton40 = class extends button14 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default14.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/item/news.list.item.actions.js?disableCache=0905
var newsListItemActions14 = class extends extender28(gridViewBodyColumn14, gridViewBodyColumn14) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton40();
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.body.row.js?disableCache=0905
var gridViewRow14 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/item/news.list.item.js?disableCache=0905
var newsListItem14 = class extends extender28(news14, gridViewRow14) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody14();
title = new newsListItemTitle14();
price = new newsListItemPrice14();
actions = new newsListItemActions14();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default14.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/gridView/gridView.js?disableCache=0905
var gridView14 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/list/news.list.table.js?disableCache=0905
var newsListTable14 = class extends gridView14 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader14();
body = new newsListTableBody14(newsListItem14, new collection18(news14));
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/edit/news.edit.title.js?disableCache=0905
var newsEditTitle14 = class extends extender28(input14, title40) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/textarea.js?disableCache=0905
var textarea14 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default28.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/edit/news.edit.body.js?disableCache=0905
var newsPageBody27 = class extends extender28(body27, textarea14) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/edit/news.edit.button.js?disableCache=0905
var editButton27 = class extends button14 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/edit/news.edit.price.js?disableCache=0905
var newsPagePrice14 = class extends extender28(price14, input14) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/label.js?disableCache=0905
var label27 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/label/left.js?disableCache=0905
var leftLabel14 = class extends label27 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/panel.js?disableCache=0905
var panel14 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/window/draggable.js?disableCache=0905
var vector241 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay40(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay40, "delay");
var draggable27 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector241(0, 0);
grabPosition = new vector241(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector241(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay40(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector241(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/panel/row.js?disableCache=0905
var panelRow14 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/window/header.js?disableCache=0905
var maximizeButton14 = class extends icon14 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton14 = class extends icon14 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl14 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton14();
maximizeButton = new maximizeButton14();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title42 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl14 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader14 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl14();
title = new title42();
rightControl = new rightControl14();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/edit/news.edit.js?disableCache=0905
var newsBodyRow14 = class extends panelRow14 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel14("Message");
body = new newsPageBody27();
};
var newsTitleRow14 = class extends panelRow14 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel14("Title");
title = new newsEditTitle14();
};
var newsPriceRow14 = class extends panelRow14 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel14("Price");
price = new newsPagePrice14();
};
var cancelButton27 = class extends button14 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow14 = class extends panelRow14 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton27();
newsEditbutton = new editButton27();
};
var newsEdit14 = class extends extender28(news14, panel14, draggable27) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader14("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow14();
newsPriceRow = new newsPriceRow14();
newsBodyRow = new newsBodyRow14();
newsButtonRow = new newsButtonRow14();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
this.allow(user_group_permission_default14.visitor, "READ");
this.allow(user_group_permission_default14.member, "WRITE");
this.allow(user_group_permission_default14.admin, "WRITE");
this.allow(user_group_permission_default14.visitor, "WRITE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsDialogButton.js?disableCache=0905
var newsDialogButton14 = class extends button14 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/search.input.js?disableCache=0905
var searchBar40 = class extends input14 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/select.js?disableCache=0905
var select14 = class extends renderCollection16 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default28.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default14.admin, "READ");
this.allow(user_group_permission_default14.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default28.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/search.select.js?disableCache=0905
var customSelect27 = class extends select14 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/search.widget.js?disableCache=0905
var searchWidget14 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar40();
select = new customSelect27();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0905
var paginationItem14 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0905
var pagination14 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem14();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem14();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem14();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsItemPage.limit.js?disableCache=0905
var limit14 = class extends select14 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0905
var tableControl14 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label27("Select page:");
pagination = new pagination14();
limitLabel = new label27("Select items per page:");
limit = new limit14();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsItemPage.js?disableCache=0905
var testbutton14 = class extends button14 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage14 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header14("News Items");
searchWidget = new searchWidget14();
newsListTable = new newsListTable14();
tableControl = new tableControl14();
createNews = new newsEdit14();
testbutton = new testbutton14();
newsDialogButton = new newsDialogButton14();
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/flexbox.js?disableCache=0905
var flexbox27 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/page/news.page.title.js?disableCache=0905
var newsPageTitle14 = class extends extender28(title40, flexbox27) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/page/news.page.body.js?disableCache=0905
var newsPageBody28 = class extends extender28(flexbox27, body27) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/comments.messages.js?disableCache=0905
var commentsMessages14 = class extends renderCollection16 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR14(LIKE14(filter.body, this.value), LIKE14(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default14.visitor, "READ");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0905
var saveEditButton14 = class extends button14 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0905
var commentEditTitle27 = class extends title41 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0905
var commentEditBody27 = class extends extender28(body28, flexbox27) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default28.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0905
var userLabel27 = class extends label27 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0905
var deleteButton41 = class extends button14 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.editButton.js?disableCache=0905
var editButton28 = class extends button14 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.information.js?disableCache=0905
var information14 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton41();
_editButton = new editButton28();
_userLabel = new userLabel27();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/edit/comment.edit.js?disableCache=0905
var editComment14 = class extends comment15 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information14();
body = new commentEditBody27();
title = new commentEditTitle27();
saveButton = new saveEditButton14();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/create/comment.saveButton.js?disableCache=0905
var saveCommentButton14 = class extends button14 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/create/comment.create.body.js?disableCache=0905
var commentEditBody28 = class extends extender28(body28, textarea14) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/comment/create/comment.create.js?disableCache=0905
var createComment14 = class extends comment15 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody28();
saveButton = new saveCommentButton14();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default14.member, "WRITE");
this.allow(user_group_permission_default14.admin, "WRITE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/page/news.page.backButton.js?disableCache=0905
var backButton27 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/page/news.page.edit.button.js?disableCache=0905
var backButton28 = class extends button14 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/filler.js?disableCache=0905
var filler14 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/page/search.comments.js?disableCache=0905
var searchBar41 = class extends input14 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/page/news.page.js?disableCache=0905
var testDiv14 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle14();
};
var newsPage14 = class extends news14 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton27();
_testDiv = new testDiv14();
body = new newsPageBody28();
editButton = new backButton28();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar41();
commentsMessages = new commentsMessages14(editComment14, this.comments);
createComment = new createComment14(this.comments);
filler = new filler14();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default14.member, "WRITE");
this.allow(user_group_permission_default14.admin, "WRITE");
this.allow(user_group_permission_default14.visitor, "WRITE");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
this.allow(user_group_permission_default14.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/newsPages.js?disableCache=0905
var newsPages14 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage14();
newsPage = new newsPage14();
newsEdit = new newsEdit14();
width = 1800;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/preloaders/simpleSpinner.js?disableCache=0905
var line14 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask14 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line14();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox14 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask14();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0905
var themaSelectorImage14 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0905
var selectLabel14 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/themeSelector.js?disableCache=0905
var themeSelector14 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage14();
selectLabel = new selectLabel14();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0905
var themeOSSelectorItem14 = class extends themeSelector14 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default15.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0905
var osSelectorList14 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem14("Windows");
themeMacOS = new themeOSSelectorItem14("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default15.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0905
var osLabel14 = class extends label27 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/os.js?disableCache=0905
var os14 = class extends panelRow14 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel14("Os");
osSelector = new osSelectorList14();
spinner = new preloaderBox14();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0905
var themeTintSelector14 = class extends themeSelector14 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default15.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0905
var themeTintSelectors14 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector14("Light");
themeDark = new themeTintSelector14("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default15.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0905
var customLabel27 = class extends label27 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/rows/tint.js?disableCache=0905
var tint14 = class extends panelRow14 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel27("Appearance");
themeTintSelectors = new themeTintSelectors14();
spinner = new preloaderBox14();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/appearance/panel.js?disableCache=0905
var appearancePanel14 = class extends panel14 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os14();
tint = new tint14();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/pages/settings.js?disableCache=0905
var settings14 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header14("Appearance");
appearancePanel = new appearancePanel14();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0905
var Console15 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default15 = new Console15();
// framework/unify/promiseManager.js?disableCache=0905
var promiseManager15 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0905
var shared15 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object44 = new shared15();
var shared_default15 = object44.get();
// framework/cache/platforms/Linux/Mobile/Dark/elements/fileUpload.js?disableCache=0905
var fileUpload14 = class extends input14 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager15();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0905
var delay41 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton14 = class extends icon14 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay41(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay41(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.icon.js?disableCache=0905
var fileIcon14 = class extends icon14 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton14();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.upload.js?disableCache=0905
var stream14 = class extends fileUpload14 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon14();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.list.js?disableCache=0905
var fileList14 = class extends panelRow14 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon14();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0905
var removeIcons14 = class extends icon14 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/page.js?disableCache=0905
var page14 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/image.js?disableCache=0905
var icon_id28 = 0;
var image14 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default28.createElement("img");
useCustomElement = true;
id = icon_id28++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0905
var previewImage14 = class extends image14 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0905
var imagePreviewWindow14 = class extends draggable27 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader14();
previewImage = new previewImage14();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0905
var fileChooserFileIcon14 = class extends icon14 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/checkbox.js?disableCache=0905
var checkbox14 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default28.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0905
var file14 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox14();
icon = new fileChooserFileIcon14();
label = new label27();
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0905
var fileChooserFiles14 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file14();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0905
var fileChooserSelectButton14 = class extends button14 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/fileChooser/fileChooser.js?disableCache=0905
var fileChooser14 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles14();
selectButton = new fileChooserSelectButton14();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/fileManager/fileManager.js?disableCache=0905
var fileManager14 = class extends page14 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header14("Upload");
fileupload = new stream14();
filesHeader = new header14("Files");
removeIcons = new removeIcons14();
fileList = new fileList14();
previewWindow = new imagePreviewWindow14();
fileChooser = new fileChooser14();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.move.js?disableCache=0905
var animationBlock92 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel92 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow14 = class extends panelRow14 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel92("Move");
animationBlock = new animationBlock92();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.rotate.js?disableCache=0905
var animationBlock93 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel93 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row79 = class extends panelRow14 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel93("Rotate");
animationBlock = new animationBlock93();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.color.js?disableCache=0905
var animationBlock94 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel94 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row80 = class extends panelRow14 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel94("Background color");
animationBlock = new animationBlock94();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.skewX.js?disableCache=0905
var animationBlock95 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel95 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row81 = class extends panelRow14 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel95("skewX");
animationBlock = new animationBlock95();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0905
var animationBlock96 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel96 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row82 = class extends panelRow14 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel96("Rotate + Move + Background");
animationBlock = new animationBlock96();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.reverse.js?disableCache=0905
var animationBlock97 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton14 = class extends button14 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton14 = class extends button14 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton14 = class extends button14 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton14 = class extends button14 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton14 = class extends button14 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel97 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons27 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton14();
pauseButton = new pauseButton14();
stopButton = new stopButton14();
forwardButton = new forwardButton14();
backwardButton = new backwardButton14();
flexDirection = "column";
};
var row83 = class extends panelRow14 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel97("Reverse");
buttons = new buttons27();
animationBlock = new animationBlock97();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animation.render.js?disableCache=0905
var animationBlock98 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel98 = class extends label27 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row84 = class extends panelRow14 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel98("RenderLoop");
animationBlock = new animationBlock98();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/animations/animations.js?disableCache=0905
var animations14 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow14();
rotateAnimation = new row79();
backgroundColor = new row80();
skewX = new row81();
rotateMoveColor = new row82();
reverse = new row83();
render = new row84();
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/examples/grids.js?disableCache=0905
var label28 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a14 = class extends input14 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b15 = class extends input14 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c14 = class extends input14 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d14 = class extends input14 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA14 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label28("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a14();
b = new b15();
c = new c14();
d = new d14();
};
var gridB14 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label28("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a14();
b = new b15();
c = new c14();
d = new d14();
};
var gridExample14 = class extends page14 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA14();
gridB = new gridB14();
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/header/user.userList.header.username.js?disableCache=0905
var userListHeaderUsername14 = class extends gridViewRowColumn14 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0905
var userListHeaderActions14 = class extends gridViewRowColumn14 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default14.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/header/user.userList.header.js?disableCache=0905
var userListHeader14 = class extends extender28(user15, gridViewTableRow14) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername14();
actions = new userListHeaderActions14();
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/user.userList.table.header.js?disableCache=0905
var userListTableHeader14 = class extends gridViewHeader14 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader14();
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/user.userList.table.body.js?disableCache=0905
var userListTableBody14 = class extends extender28(renderCollection16, gridViewTableHeader14) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE14(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default14.visitor, "READ");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/item/user.userList.item.username.js?disableCache=0905
var userListItemTitle14 = class extends extender28(username15, gridViewBodyColumn14) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0905
var deleteButton42 = class extends button14 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default14.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0905
var userListItemActions14 = class extends extender28(gridViewBodyColumn14, gridViewBodyColumn14) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton42();
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/item/user.userList.item.js?disableCache=0905
var userListItem14 = class extends extender28(user15, gridViewRow14) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle14();
actions = new userListItemActions14();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default14.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/user.userList.table.js?disableCache=0905
var userListTable14 = class extends gridView14 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader14();
body = new userListTableBody14(userListItem14, new collection18(user15));
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/search.js?disableCache=0905
var searchBar42 = class extends input14 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/userList/user.userList.page.js?disableCache=0905
var editPage14 = class extends page14 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header14("Users");
search = new searchBar42();
userTable = new userListTable14();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.username.js?disableCache=0905
var editUsername14 = class extends extender28(username15, input14) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.username.row.js?disableCache=0905
var usernameRow14 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label27("Username");
username = new editUsername14();
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/empty.js?disableCache=0905
var empty14 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/user.edit.button.js?disableCache=0905
var userEditButton14 = class extends button14 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/user.edit.button.row.js?disableCache=0905
var saveButtonRow14 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty14();
userEditButton = new userEditButton14();
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0905
var checkRenderCollection14 = class extends renderCollection16 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default14.admin, "WRITE");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
this.allow(user_group_permission_default14.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.checkbox.js?disableCache=0905
var customCheckbox27 = class extends checkbox14 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0905
var customCheckbox28 = class extends user15 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label27();
checkbox = new customCheckbox27();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0905
var checkboxRow14 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label27("Select users");
renderCollection = new checkRenderCollection14(customCheckbox28, new collection18(user15));
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.select.option.js?disableCache=0905
var customOption14 = class extends extender28(option14, user15) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0905
var customSelect28 = class extends renderCollection16 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default28.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default14.admin, "WRITE");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
this.allow(user_group_permission_default14.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.select.row.js?disableCache=0905
var optionRow14 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label27("Select user");
renderCollection = new customSelect28(customOption14, new collection18(user15));
};
// framework/cache/platforms/Linux/Mobile/Dark/user/edit/edit.user.js?disableCache=0905
var editUser14 = class extends extender28(user15, page14) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header14("Edit user");
usernameRow = new usernameRow14();
selectRow = new optionRow14();
checkboxRow = new checkboxRow14();
showSelectedUser = new customSelect28(customOption14, this.selectedUsers);
saveButtonRow = new saveButtonRow14();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default14.admin, "WRITE");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
this.allow(user_group_permission_default14.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signup/signup.username.js?disableCache=0905
var signUpUsername14 = class extends extender28(username15, input14) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/inputPassword.js?disableCache=0905
var inputPassword14 = class extends input14 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signup/signup.password.js?disableCache=0905
var signupPassword14 = class extends inputPassword14 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signup/signup.passwordCheck.js?disableCache=0905
var signupPasswordCheck14 = class extends inputPassword14 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0905
var cookieManager15 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default15 = new cookieManager15();
// framework/cache/platforms/Linux/Mobile/Dark/user/signup/signup.button.js?disableCache=0905
var signupButton14 = class extends button14 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signup/signup.customLabel.js?disableCache=0905
var customLabel28 = class extends label27 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signup/user.signup.js?disableCache=0905
var signup14 = class extends extender28(user15, page14) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default28.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header14("Signup");
// Children
userLabel = new customLabel28("Username");
username = new signUpUsername14();
passwordLabel = new customLabel28("Password");
password = new signupPassword14();
passwordAgainLabel = new customLabel28("Password again");
passwordAgain = new signupPasswordCheck14();
signUpButton = new signupButton14();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default14.visitor, "PROCESS");
this.allow(user_group_permission_default14.member, "PROCESS");
this.allow(user_group_permission_default14.admin, "PROCESS");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signin/signin.username.js?disableCache=0905
var signinUsername14 = class extends extender28(username15, input14) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/user.password.js?disableCache=0905
var password14 = class extends inputPassword14 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signin/signin.password.js?disableCache=0905
var signinPassword14 = class extends password14 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signin/signin.button.js?disableCache=0905
var signinFormButton14 = class extends button14 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0905
var unify15 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default15 = new unify15();
// framework/cache/platforms/Linux/Mobile/Dark/user/signin/signin.cancel.button.js?disableCache=0905
var cancelButton28 = class extends button14 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Linux/Mobile/Dark/user/signin/user.signin.js?disableCache=0905
var tussenObject14 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword14();
width = "100%";
};
var buttons28 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton28();
signinButton = new signinFormButton14();
};
var hint14 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin14 = class extends extender28(user15, page14) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint14();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default28.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header14("Signin");
//userLabel = new label("Username");
username = new signinUsername14();
//passwordLabel = new label("Password");
tussenObject = new tussenObject14();
buttons = new buttons28();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user15();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default15.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user15();
client2.user = visitor62;
client2.user.error = false;
unify_default15.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default15.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default14.visitor, "PROCESS");
this.allow(user_group_permission_default14.member, "PROCESS");
this.allow(user_group_permission_default14.admin, "PROCESS");
this.allow(user_group_permission_default14.member, "READ");
this.allow(user_group_permission_default14.admin, "READ");
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/rightSide/rightSide.js?disableCache=0575
var rightSide14 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages14();
signup = new signup14();
signin = new signin14();
settings = new settings14();
fileManager = new fileManager14();
animations = new animations14();
gridExample = new gridExample14();
userListPage = new editPage14();
editUser = new editUser14();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0575
var documentTool29 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object45 = new documentTool29();
var document_default29 = object45.getDocument();
// framework/unify/math/vector2.js?disableCache=0575
var vector242 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/flexbox.js?disableCache=0575
var flexbox28 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/window/frostedGlass.js?disableCache=0575
var frostedGlass28 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Linux/Mobile/Dark/elements/window/draggable.js?disableCache=0575
var vector243 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay42(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay42, "delay");
var draggable28 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector243(0, 0);
grabPosition = new vector243(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector243(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay42(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector243(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Mobile/Dark/demo/application.js
var application15 = class extends extender27(frostedGlass28, flexbox28, draggable28) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton14();
leftSide = new leftSide14();
rightSide = new rightSide14();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default29.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector242(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0055
function extender29(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender29, "extender");
// framework/unify/extender.js?disableCache=0784
function extender30(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender30, "extender");
// framework/cache/platforms/Linux/Tablet/Light/elements/button.js?disableCache=0784
var button15 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/icon.js?disableCache=0784
var icon_id29 = 0;
var icon15 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id29++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/minimizeButton.js?disableCache=0055
var minimizeButton15 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.js?disableCache=0784
var menuButton15 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.news.js?disableCache=0784
var newsButton15 = class extends menuButton15 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0784
var settingsButton43 = class extends menuButton15 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0784
var collection19 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0784
var datatype_default16 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0784
var documentTool30 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object46 = new documentTool30();
var document_default30 = object46.getDocument();
// framework/cache/platforms/Linux/Tablet/Light/elements/option.js?disableCache=0784
var option15 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default30.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/group/user.group.js?disableCache=0784
var visitor30 = class extends option15 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member15 = class extends option15 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin29 = class extends option15 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups15 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member15();
admin = new admin29();
visitor = new visitor30();
};
// framework/cache/platforms/Linux/Tablet/Light/user/group/user.group.permission.js?disableCache=0784
var user_group_permission_default15 = new groups15();
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0784
var signinPageButton15 = class extends menuButton15 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0784
var signinButton15 = class extends menuButton15 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0784
var visitor31 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager16 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor31();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default16 = new userManager16();
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0784
var signoutButton15 = class extends menuButton15 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default16.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default15.member, "PROCESS");
this.allow(user_group_permission_default15.admin, "PROCESS");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0784
var fileMangerButton15 = class extends menuButton15 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0784
var settingsButton44 = class extends menuButton15 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.users.js?disableCache=0784
var usersPageButton15 = class extends menuButton15 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default15.member, "PROCESS");
this.allow(user_group_permission_default15.admin, "PROCESS");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0784
var settingsButton45 = class extends menuButton15 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/header.js?disableCache=0784
var header15 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.header.js?disableCache=0784
var menuHeader15 = class extends header15 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/leftSide/leftSide.js?disableCache=0055
var leftSide15 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader15();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton15();
settingsButton = new settingsButton43();
usersButton = new usersPageButton15();
signinButton = new signinPageButton15();
signoutButton = new signoutButton15();
signupButton = new signinButton15();
animationsButton = new settingsButton44();
gridButton = new settingsButton45();
fileManagerButton = new fileMangerButton15();
};
// framework/unify/table.js?disableCache=0784
var table17 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0784
var column15 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/news.title.js?disableCache=0784
var title43 = class extends column15 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/news.body.js?disableCache=0784
var body29 = class extends column15 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/news.price.js?disableCache=0784
var price15 = class extends column15 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default16.REAL;
};
// framework/cache/platforms/Linux/Tablet/Light/user/user.username.js?disableCache=0784
var username16 = class extends column15 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0784
var tools17 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll16(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default16 = new tools17();
// framework/cache/platforms/Linux/Tablet/Light/elements/input.js?disableCache=0784
var input15 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default30.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default30.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default30.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/user.salt.js?disableCache=0784
var salt16 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default16.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Light/user/user.hash.js?disableCache=0784
var hash16 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default16.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Light/user/user.js?disableCache=0784
var user16 = class _user extends table17 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username16();
salt = new salt16();
hash = new hash16();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups15();
selectedUsers = new collection19(_user);
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/comment.body.js?disableCache=0784
var body30 = class extends column15 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/comment.title.js?disableCache=0784
var title44 = class extends column15 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/comment.js?disableCache=0784
var comment16 = class extends table17 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user16();
title = new title44();
body = new body30();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/news.js?disableCache=0784
var news15 = class extends table17 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title43();
body = new body29();
price = new price15();
comments = new collection19(comment16);
};
// framework/cache/platforms/Linux/Tablet/Light/elements/tableCell.js?disableCache=0784
var tableCell15 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0784
var sortBy15 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.header.row.column.js?disableCache=0784
var gridViewRowColumn15 = class extends tableCell15 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy15();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/header/news.list.header.body.js?disableCache=0784
var newsListHeaderBody15 = class extends gridViewRowColumn15 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/header/news.list.header.title.js?disableCache=0784
var newsListHeaderTitle15 = class extends gridViewRowColumn15 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/header/news.list.header.price.js?disableCache=0784
var newsListHeaderPrice15 = class extends gridViewRowColumn15 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/header/news.list.header.actions.js?disableCache=0784
var newsListHeaderActions15 = class extends gridViewRowColumn15 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default15.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.header.row.js?disableCache=0784
var gridViewTableRow15 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/header/news.list.header.js?disableCache=0784
var newsListHeader15 = class extends extender30(news15, gridViewTableRow15) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody15();
title = new newsListHeaderTitle15();
price = new newsListHeaderPrice15();
actions = new newsListHeaderActions15();
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.header.js?disableCache=0784
var gridViewHeader15 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/news.list.table.header.js?disableCache=0784
var newsListTableHeader15 = class extends gridViewHeader15 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader15();
};
// framework/unify/renderCollection.js?disableCache=0784
var renderCollection17 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.body.js?disableCache=0784
var gridViewTableHeader15 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0784
function OR15(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR15, "OR");
// framework/unify/sql/LIKE.js?disableCache=0784
function LIKE15(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE15, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0784
function GREATER_OR_EQUAL15(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL15, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0784
function SMALLER_OR_EQUAL15(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL15, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Linux/Tablet/Light/demo/list/news.list.table.body.js?disableCache=0784
var newsListTableBody15 = class extends extender30(renderCollection17, gridViewTableHeader15) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR15(OR15(LIKE15(filter.title, searchTerm), LIKE15(filter.comments.body, searchTerm)), LIKE15(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL15(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL15(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default15.visitor, "READ");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.body.row.column.js?disableCache=0784
var gridViewBodyColumn15 = class extends tableCell15 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/item/news.list.item.body.js?disableCache=0784
var newsListItemBody15 = class extends extender30(body29, gridViewBodyColumn15) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/item/news.list.item.title.js?disableCache=0784
var newsListItemTitle15 = class extends extender30(title43, gridViewBodyColumn15) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/item/news.list.item.price.js?disableCache=0784
var newsListItemPrice15 = class extends extender30(price15, gridViewBodyColumn15) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0784
var deleteButton43 = class extends button15 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default15.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/item/news.list.item.actions.js?disableCache=0784
var newsListItemActions15 = class extends extender30(gridViewBodyColumn15, gridViewBodyColumn15) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton43();
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.body.row.js?disableCache=0784
var gridViewRow15 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/item/news.list.item.js?disableCache=0784
var newsListItem15 = class extends extender30(news15, gridViewRow15) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody15();
title = new newsListItemTitle15();
price = new newsListItemPrice15();
actions = new newsListItemActions15();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default15.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/gridView/gridView.js?disableCache=0784
var gridView15 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/list/news.list.table.js?disableCache=0784
var newsListTable15 = class extends gridView15 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader15();
body = new newsListTableBody15(newsListItem15, new collection19(news15));
};
// framework/cache/platforms/Linux/Tablet/Light/demo/edit/news.edit.title.js?disableCache=0784
var newsEditTitle15 = class extends extender30(input15, title43) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Linux/Tablet/Light/elements/textarea.js?disableCache=0784
var textarea15 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default30.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/edit/news.edit.body.js?disableCache=0784
var newsPageBody29 = class extends extender30(body29, textarea15) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/edit/news.edit.button.js?disableCache=0784
var editButton29 = class extends button15 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/edit/news.edit.price.js?disableCache=0784
var newsPagePrice15 = class extends extender30(price15, input15) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/label.js?disableCache=0784
var label29 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/label/left.js?disableCache=0784
var leftLabel15 = class extends label29 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Linux/Tablet/Light/elements/panel.js?disableCache=0784
var panel15 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Linux/Tablet/Light/elements/window/draggable.js?disableCache=0784
var vector244 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay43(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay43, "delay");
var draggable29 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector244(0, 0);
grabPosition = new vector244(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector244(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay43(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector244(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/panel/row.js?disableCache=0784
var panelRow15 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/window/header.js?disableCache=0784
var maximizeButton15 = class extends icon15 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton15 = class extends icon15 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl15 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton15();
maximizeButton = new maximizeButton15();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title45 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl15 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader15 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl15();
title = new title45();
rightControl = new rightControl15();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/edit/news.edit.js?disableCache=0784
var newsBodyRow15 = class extends panelRow15 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel15("Message");
body = new newsPageBody29();
};
var newsTitleRow15 = class extends panelRow15 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel15("Title");
title = new newsEditTitle15();
};
var newsPriceRow15 = class extends panelRow15 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel15("Price");
price = new newsPagePrice15();
};
var cancelButton29 = class extends button15 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow15 = class extends panelRow15 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton29();
newsEditbutton = new editButton29();
};
var newsEdit15 = class extends extender30(news15, panel15, draggable29) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader15("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow15();
newsPriceRow = new newsPriceRow15();
newsBodyRow = new newsBodyRow15();
newsButtonRow = new newsButtonRow15();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
this.allow(user_group_permission_default15.visitor, "READ");
this.allow(user_group_permission_default15.member, "WRITE");
this.allow(user_group_permission_default15.admin, "WRITE");
this.allow(user_group_permission_default15.visitor, "WRITE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsDialogButton.js?disableCache=0784
var newsDialogButton15 = class extends button15 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/search.input.js?disableCache=0784
var searchBar43 = class extends input15 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/select.js?disableCache=0784
var select15 = class extends renderCollection17 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default30.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default15.admin, "READ");
this.allow(user_group_permission_default15.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default30.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/search.select.js?disableCache=0784
var customSelect29 = class extends select15 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/search.widget.js?disableCache=0784
var searchWidget15 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar43();
select = new customSelect29();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0784
var paginationItem15 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsItemPage.pagination.js?disableCache=0784
var pagination15 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem15();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem15();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem15();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsItemPage.limit.js?disableCache=0784
var limit15 = class extends select15 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0784
var tableControl15 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label29("Select page:");
pagination = new pagination15();
limitLabel = new label29("Select items per page:");
limit = new limit15();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsItemPage.js?disableCache=0784
var testbutton15 = class extends button15 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage15 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header15("News Items");
searchWidget = new searchWidget15();
newsListTable = new newsListTable15();
tableControl = new tableControl15();
createNews = new newsEdit15();
testbutton = new testbutton15();
newsDialogButton = new newsDialogButton15();
};
// framework/cache/platforms/Linux/Tablet/Light/elements/flexbox.js?disableCache=0784
var flexbox29 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/page/news.page.title.js?disableCache=0784
var newsPageTitle15 = class extends extender30(title43, flexbox29) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/page/news.page.body.js?disableCache=0784
var newsPageBody30 = class extends extender30(flexbox29, body29) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/comments.messages.js?disableCache=0784
var commentsMessages15 = class extends renderCollection17 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR15(LIKE15(filter.body, this.value), LIKE15(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default15.visitor, "READ");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.saveButton.js?disableCache=0784
var saveEditButton15 = class extends button15 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.edit.title.js?disableCache=0784
var commentEditTitle29 = class extends title44 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.edit.body.js?disableCache=0784
var commentEditBody29 = class extends extender30(body30, flexbox29) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default30.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.userLabel.js?disableCache=0784
var userLabel29 = class extends label29 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0784
var deleteButton44 = class extends button15 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.editButton.js?disableCache=0784
var editButton30 = class extends button15 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.information.js?disableCache=0784
var information15 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton44();
_editButton = new editButton30();
_userLabel = new userLabel29();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/edit/comment.edit.js?disableCache=0784
var editComment15 = class extends comment16 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information15();
body = new commentEditBody29();
title = new commentEditTitle29();
saveButton = new saveEditButton15();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/create/comment.saveButton.js?disableCache=0784
var saveCommentButton15 = class extends button15 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/create/comment.create.body.js?disableCache=0784
var commentEditBody30 = class extends extender30(body30, textarea15) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/comment/create/comment.create.js?disableCache=0784
var createComment15 = class extends comment16 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody30();
saveButton = new saveCommentButton15();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default15.member, "WRITE");
this.allow(user_group_permission_default15.admin, "WRITE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/page/news.page.backButton.js?disableCache=0784
var backButton29 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/page/news.page.edit.button.js?disableCache=0784
var backButton30 = class extends button15 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/filler.js?disableCache=0784
var filler15 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/page/search.comments.js?disableCache=0784
var searchBar44 = class extends input15 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/page/news.page.js?disableCache=0784
var testDiv15 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle15();
};
var newsPage15 = class extends news15 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton29();
_testDiv = new testDiv15();
body = new newsPageBody30();
editButton = new backButton30();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar44();
commentsMessages = new commentsMessages15(editComment15, this.comments);
createComment = new createComment15(this.comments);
filler = new filler15();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default15.member, "WRITE");
this.allow(user_group_permission_default15.admin, "WRITE");
this.allow(user_group_permission_default15.visitor, "WRITE");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
this.allow(user_group_permission_default15.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/newsPages.js?disableCache=0784
var newsPages15 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage15();
newsPage = new newsPage15();
newsEdit = new newsEdit15();
width = 1800;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/preloaders/simpleSpinner.js?disableCache=0784
var line15 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask15 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line15();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox15 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask15();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0784
var themaSelectorImage15 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0784
var selectLabel15 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/themeSelector.js?disableCache=0784
var themeSelector15 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage15();
selectLabel = new selectLabel15();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0784
var themeOSSelectorItem15 = class extends themeSelector15 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default16.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0784
var osSelectorList15 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem15("Windows");
themeMacOS = new themeOSSelectorItem15("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default16.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/os.label.js?disableCache=0784
var osLabel15 = class extends label29 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/os.js?disableCache=0784
var os15 = class extends panelRow15 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel15("Os");
osSelector = new osSelectorList15();
spinner = new preloaderBox15();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0784
var themeTintSelector15 = class extends themeSelector15 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default16.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0784
var themeTintSelectors15 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector15("Light");
themeDark = new themeTintSelector15("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default16.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0784
var customLabel29 = class extends label29 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/rows/tint.js?disableCache=0784
var tint15 = class extends panelRow15 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel29("Appearance");
themeTintSelectors = new themeTintSelectors15();
spinner = new preloaderBox15();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/appearance/panel.js?disableCache=0784
var appearancePanel15 = class extends panel15 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os15();
tint = new tint15();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/pages/settings.js?disableCache=0784
var settings15 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header15("Appearance");
appearancePanel = new appearancePanel15();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0784
var Console16 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default16 = new Console16();
// framework/unify/promiseManager.js?disableCache=0784
var promiseManager16 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0784
var shared16 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object47 = new shared16();
var shared_default16 = object47.get();
// framework/cache/platforms/Linux/Tablet/Light/elements/fileUpload.js?disableCache=0784
var fileUpload15 = class extends input15 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager16();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0784
var delay44 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton15 = class extends icon15 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay44(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay44(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.icon.js?disableCache=0784
var fileIcon15 = class extends icon15 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton15();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.upload.js?disableCache=0784
var stream15 = class extends fileUpload15 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon15();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.list.js?disableCache=0784
var fileList15 = class extends panelRow15 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon15();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0784
var removeIcons15 = class extends icon15 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/page.js?disableCache=0784
var page15 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/image.js?disableCache=0784
var icon_id30 = 0;
var image15 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default30.createElement("img");
useCustomElement = true;
id = icon_id30++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0784
var previewImage15 = class extends image15 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0784
var imagePreviewWindow15 = class extends draggable29 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader15();
previewImage = new previewImage15();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0784
var fileChooserFileIcon15 = class extends icon15 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/checkbox.js?disableCache=0784
var checkbox15 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default30.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/fileChooser/fileChooser.file.js?disableCache=0784
var file15 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox15();
icon = new fileChooserFileIcon15();
label = new label29();
};
// framework/cache/platforms/Linux/Tablet/Light/elements/fileChooser/fileChooser.files.js?disableCache=0784
var fileChooserFiles15 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file15();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0784
var fileChooserSelectButton15 = class extends button15 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/fileChooser/fileChooser.js?disableCache=0784
var fileChooser15 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles15();
selectButton = new fileChooserSelectButton15();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/fileManager/fileManager.js?disableCache=0784
var fileManager15 = class extends page15 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header15("Upload");
fileupload = new stream15();
filesHeader = new header15("Files");
removeIcons = new removeIcons15();
fileList = new fileList15();
previewWindow = new imagePreviewWindow15();
fileChooser = new fileChooser15();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.move.js?disableCache=0784
var animationBlock99 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel99 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow15 = class extends panelRow15 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel99("Move");
animationBlock = new animationBlock99();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.rotate.js?disableCache=0784
var animationBlock100 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel100 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row85 = class extends panelRow15 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel100("Rotate");
animationBlock = new animationBlock100();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.color.js?disableCache=0784
var animationBlock101 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel101 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row86 = class extends panelRow15 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel101("Background color");
animationBlock = new animationBlock101();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.skewX.js?disableCache=0784
var animationBlock102 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel102 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row87 = class extends panelRow15 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel102("skewX");
animationBlock = new animationBlock102();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0784
var animationBlock103 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel103 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row88 = class extends panelRow15 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel103("Rotate + Move + Background");
animationBlock = new animationBlock103();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.reverse.js?disableCache=0784
var animationBlock104 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton15 = class extends button15 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton15 = class extends button15 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton15 = class extends button15 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton15 = class extends button15 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton15 = class extends button15 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel104 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons29 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton15();
pauseButton = new pauseButton15();
stopButton = new stopButton15();
forwardButton = new forwardButton15();
backwardButton = new backwardButton15();
flexDirection = "column";
};
var row89 = class extends panelRow15 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel104("Reverse");
buttons = new buttons29();
animationBlock = new animationBlock104();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animation.render.js?disableCache=0784
var animationBlock105 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel105 = class extends label29 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row90 = class extends panelRow15 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel105("RenderLoop");
animationBlock = new animationBlock105();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/animations/animations.js?disableCache=0784
var animations15 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow15();
rotateAnimation = new row85();
backgroundColor = new row86();
skewX = new row87();
rotateMoveColor = new row88();
reverse = new row89();
render = new row90();
};
// framework/cache/platforms/Linux/Tablet/Light/demo/examples/grids.js?disableCache=0784
var label30 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a15 = class extends input15 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b16 = class extends input15 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c15 = class extends input15 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d15 = class extends input15 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA15 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label30("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a15();
b = new b16();
c = new c15();
d = new d15();
};
var gridB15 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label30("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a15();
b = new b16();
c = new c15();
d = new d15();
};
var gridExample15 = class extends page15 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA15();
gridB = new gridB15();
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/header/user.userList.header.username.js?disableCache=0784
var userListHeaderUsername15 = class extends gridViewRowColumn15 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/header/user.userList.header.actions.js?disableCache=0784
var userListHeaderActions15 = class extends gridViewRowColumn15 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default15.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/header/user.userList.header.js?disableCache=0784
var userListHeader15 = class extends extender30(user16, gridViewTableRow15) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername15();
actions = new userListHeaderActions15();
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/user.userList.table.header.js?disableCache=0784
var userListTableHeader15 = class extends gridViewHeader15 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader15();
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/user.userList.table.body.js?disableCache=0784
var userListTableBody15 = class extends extender30(renderCollection17, gridViewTableHeader15) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE15(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default15.visitor, "READ");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/item/user.userList.item.username.js?disableCache=0784
var userListItemTitle15 = class extends extender30(username16, gridViewBodyColumn15) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0784
var deleteButton45 = class extends button15 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default15.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/item/user.userList.item.actions.js?disableCache=0784
var userListItemActions15 = class extends extender30(gridViewBodyColumn15, gridViewBodyColumn15) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton45();
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/item/user.userList.item.js?disableCache=0784
var userListItem15 = class extends extender30(user16, gridViewRow15) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle15();
actions = new userListItemActions15();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default15.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/user.userList.table.js?disableCache=0784
var userListTable15 = class extends gridView15 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader15();
body = new userListTableBody15(userListItem15, new collection19(user16));
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/search.js?disableCache=0784
var searchBar45 = class extends input15 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/userList/user.userList.page.js?disableCache=0784
var editPage15 = class extends page15 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header15("Users");
search = new searchBar45();
userTable = new userListTable15();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.username.js?disableCache=0784
var editUsername15 = class extends extender30(username16, input15) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.username.row.js?disableCache=0784
var usernameRow15 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label29("Username");
username = new editUsername15();
};
// framework/cache/platforms/Linux/Tablet/Light/elements/empty.js?disableCache=0784
var empty15 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/user.edit.button.js?disableCache=0784
var userEditButton15 = class extends button15 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/user.edit.button.row.js?disableCache=0784
var saveButtonRow15 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty15();
userEditButton = new userEditButton15();
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0784
var checkRenderCollection15 = class extends renderCollection17 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default15.admin, "WRITE");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
this.allow(user_group_permission_default15.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.checkbox.js?disableCache=0784
var customCheckbox29 = class extends checkbox15 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0784
var customCheckbox30 = class extends user16 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label29();
checkbox = new customCheckbox29();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.checkbox.row.js?disableCache=0784
var checkboxRow15 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label29("Select users");
renderCollection = new checkRenderCollection15(customCheckbox30, new collection19(user16));
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.select.option.js?disableCache=0784
var customOption15 = class extends extender30(option15, user16) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0784
var customSelect30 = class extends renderCollection17 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default30.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default15.admin, "WRITE");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
this.allow(user_group_permission_default15.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.select.row.js?disableCache=0784
var optionRow15 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label29("Select user");
renderCollection = new customSelect30(customOption15, new collection19(user16));
};
// framework/cache/platforms/Linux/Tablet/Light/user/edit/edit.user.js?disableCache=0784
var editUser15 = class extends extender30(user16, page15) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header15("Edit user");
usernameRow = new usernameRow15();
selectRow = new optionRow15();
checkboxRow = new checkboxRow15();
showSelectedUser = new customSelect30(customOption15, this.selectedUsers);
saveButtonRow = new saveButtonRow15();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default15.admin, "WRITE");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
this.allow(user_group_permission_default15.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/signup/signup.username.js?disableCache=0784
var signUpUsername15 = class extends extender30(username16, input15) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/inputPassword.js?disableCache=0784
var inputPassword15 = class extends input15 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/signup/signup.password.js?disableCache=0784
var signupPassword15 = class extends inputPassword15 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Linux/Tablet/Light/user/signup/signup.passwordCheck.js?disableCache=0784
var signupPasswordCheck15 = class extends inputPassword15 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0784
var cookieManager16 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default16 = new cookieManager16();
// framework/cache/platforms/Linux/Tablet/Light/user/signup/signup.button.js?disableCache=0784
var signupButton15 = class extends button15 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/signup/signup.customLabel.js?disableCache=0784
var customLabel30 = class extends label29 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Linux/Tablet/Light/user/signup/user.signup.js?disableCache=0784
var signup15 = class extends extender30(user16, page15) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default30.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header15("Signup");
// Children
userLabel = new customLabel30("Username");
username = new signUpUsername15();
passwordLabel = new customLabel30("Password");
password = new signupPassword15();
passwordAgainLabel = new customLabel30("Password again");
passwordAgain = new signupPasswordCheck15();
signUpButton = new signupButton15();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default15.visitor, "PROCESS");
this.allow(user_group_permission_default15.member, "PROCESS");
this.allow(user_group_permission_default15.admin, "PROCESS");
}
};
// framework/cache/platforms/Linux/Tablet/Light/user/signin/signin.username.js?disableCache=0784
var signinUsername15 = class extends extender30(username16, input15) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Linux/Tablet/Light/user/user.password.js?disableCache=0784
var password15 = class extends inputPassword15 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Linux/Tablet/Light/user/signin/signin.password.js?disableCache=0784
var signinPassword15 = class extends password15 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Linux/Tablet/Light/user/signin/signin.button.js?disableCache=0784
var signinFormButton15 = class extends button15 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0784
var unify16 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default16 = new unify16();
// framework/cache/platforms/Linux/Tablet/Light/user/signin/signin.cancel.button.js?disableCache=0784
var cancelButton30 = class extends button15 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Light/user/signin/user.signin.js?disableCache=0784
var tussenObject15 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword15();
width = "100%";
};
var buttons30 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton30();
signinButton = new signinFormButton15();
};
var hint15 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin15 = class extends extender30(user16, page15) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint15();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default30.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header15("Signin");
//userLabel = new label("Username");
username = new signinUsername15();
//passwordLabel = new label("Password");
tussenObject = new tussenObject15();
buttons = new buttons30();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user16();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default16.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user16();
client2.user = visitor62;
client2.user.error = false;
unify_default16.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default16.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default15.visitor, "PROCESS");
this.allow(user_group_permission_default15.member, "PROCESS");
this.allow(user_group_permission_default15.admin, "PROCESS");
this.allow(user_group_permission_default15.member, "READ");
this.allow(user_group_permission_default15.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/rightSide/rightSide.js?disableCache=0055
var rightSide15 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages15();
signup = new signup15();
signin = new signin15();
settings = new settings15();
fileManager = new fileManager15();
animations = new animations15();
gridExample = new gridExample15();
userListPage = new editPage15();
editUser = new editUser15();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0055
var documentTool31 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object48 = new documentTool31();
var document_default31 = object48.getDocument();
// framework/unify/math/vector2.js?disableCache=0055
var vector245 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/flexbox.js?disableCache=0055
var flexbox30 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Tablet/Light/elements/window/frostedGlass.js?disableCache=0055
var frostedGlass30 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Linux/Tablet/Light/elements/window/draggable.js?disableCache=0055
var vector246 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay45(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay45, "delay");
var draggable30 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector246(0, 0);
grabPosition = new vector246(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector246(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay45(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector246(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Tablet/Light/demo/application.js
var application16 = class extends extender29(frostedGlass30, flexbox30, draggable30) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton15();
leftSide = new leftSide15();
rightSide = new rightSide15();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default31.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector245(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0652
function extender31(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender31, "extender");
// framework/unify/extender.js?disableCache=0083
function extender32(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender32, "extender");
// framework/cache/platforms/Linux/Tablet/Dark/elements/button.js?disableCache=0083
var button16 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/icon.js?disableCache=0083
var icon_id31 = 0;
var icon16 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id31++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/minimizeButton.js?disableCache=0652
var minimizeButton16 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.js?disableCache=0083
var menuButton16 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0083
var newsButton16 = class extends menuButton16 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0083
var settingsButton46 = class extends menuButton16 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0083
var collection20 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0083
var datatype_default17 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0083
var documentTool32 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object49 = new documentTool32();
var document_default32 = object49.getDocument();
// framework/cache/platforms/Linux/Tablet/Dark/elements/option.js?disableCache=0083
var option16 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default32.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/group/user.group.js?disableCache=0083
var visitor32 = class extends option16 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member16 = class extends option16 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin31 = class extends option16 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups16 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member16();
admin = new admin31();
visitor = new visitor32();
};
// framework/cache/platforms/Linux/Tablet/Dark/user/group/user.group.permission.js?disableCache=0083
var user_group_permission_default16 = new groups16();
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0083
var signinPageButton16 = class extends menuButton16 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0083
var signinButton16 = class extends menuButton16 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0083
var visitor33 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager17 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor33();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default17 = new userManager17();
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0083
var signoutButton16 = class extends menuButton16 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default17.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default16.member, "PROCESS");
this.allow(user_group_permission_default16.admin, "PROCESS");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0083
var fileMangerButton16 = class extends menuButton16 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0083
var settingsButton47 = class extends menuButton16 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0083
var usersPageButton16 = class extends menuButton16 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default16.member, "PROCESS");
this.allow(user_group_permission_default16.admin, "PROCESS");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0083
var settingsButton48 = class extends menuButton16 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/header.js?disableCache=0083
var header16 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.header.js?disableCache=0083
var menuHeader16 = class extends header16 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/leftSide/leftSide.js?disableCache=0652
var leftSide16 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader16();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton16();
settingsButton = new settingsButton46();
usersButton = new usersPageButton16();
signinButton = new signinPageButton16();
signoutButton = new signoutButton16();
signupButton = new signinButton16();
animationsButton = new settingsButton47();
gridButton = new settingsButton48();
fileManagerButton = new fileMangerButton16();
};
// framework/unify/table.js?disableCache=0083
var table18 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0083
var column16 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/news.title.js?disableCache=0083
var title46 = class extends column16 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/news.body.js?disableCache=0083
var body31 = class extends column16 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/news.price.js?disableCache=0083
var price16 = class extends column16 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default17.REAL;
};
// framework/cache/platforms/Linux/Tablet/Dark/user/user.username.js?disableCache=0083
var username17 = class extends column16 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0083
var tools18 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll17(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default17 = new tools18();
// framework/cache/platforms/Linux/Tablet/Dark/elements/input.js?disableCache=0083
var input16 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default32.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default32.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default32.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/user.salt.js?disableCache=0083
var salt17 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default17.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/user.hash.js?disableCache=0083
var hash17 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default17.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/user.js?disableCache=0083
var user17 = class _user extends table18 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username17();
salt = new salt17();
hash = new hash17();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups16();
selectedUsers = new collection20(_user);
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/comment.body.js?disableCache=0083
var body32 = class extends column16 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/comment.title.js?disableCache=0083
var title47 = class extends column16 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/comment.js?disableCache=0083
var comment17 = class extends table18 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user17();
title = new title47();
body = new body32();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/news.js?disableCache=0083
var news16 = class extends table18 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title46();
body = new body31();
price = new price16();
comments = new collection20(comment17);
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/tableCell.js?disableCache=0083
var tableCell16 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0083
var sortBy16 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0083
var gridViewRowColumn16 = class extends tableCell16 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy16();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/header/news.list.header.body.js?disableCache=0083
var newsListHeaderBody16 = class extends gridViewRowColumn16 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/header/news.list.header.title.js?disableCache=0083
var newsListHeaderTitle16 = class extends gridViewRowColumn16 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/header/news.list.header.price.js?disableCache=0083
var newsListHeaderPrice16 = class extends gridViewRowColumn16 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/header/news.list.header.actions.js?disableCache=0083
var newsListHeaderActions16 = class extends gridViewRowColumn16 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default16.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.header.row.js?disableCache=0083
var gridViewTableRow16 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/header/news.list.header.js?disableCache=0083
var newsListHeader16 = class extends extender32(news16, gridViewTableRow16) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody16();
title = new newsListHeaderTitle16();
price = new newsListHeaderPrice16();
actions = new newsListHeaderActions16();
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.header.js?disableCache=0083
var gridViewHeader16 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/news.list.table.header.js?disableCache=0083
var newsListTableHeader16 = class extends gridViewHeader16 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader16();
};
// framework/unify/renderCollection.js?disableCache=0083
var renderCollection18 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.body.js?disableCache=0083
var gridViewTableHeader16 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0083
function OR16(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR16, "OR");
// framework/unify/sql/LIKE.js?disableCache=0083
function LIKE16(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE16, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0083
function GREATER_OR_EQUAL16(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL16, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0083
function SMALLER_OR_EQUAL16(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL16, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/news.list.table.body.js?disableCache=0083
var newsListTableBody16 = class extends extender32(renderCollection18, gridViewTableHeader16) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR16(OR16(LIKE16(filter.title, searchTerm), LIKE16(filter.comments.body, searchTerm)), LIKE16(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL16(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL16(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default16.visitor, "READ");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0083
var gridViewBodyColumn16 = class extends tableCell16 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/item/news.list.item.body.js?disableCache=0083
var newsListItemBody16 = class extends extender32(body31, gridViewBodyColumn16) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/item/news.list.item.title.js?disableCache=0083
var newsListItemTitle16 = class extends extender32(title46, gridViewBodyColumn16) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/item/news.list.item.price.js?disableCache=0083
var newsListItemPrice16 = class extends extender32(price16, gridViewBodyColumn16) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0083
var deleteButton46 = class extends button16 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default16.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/item/news.list.item.actions.js?disableCache=0083
var newsListItemActions16 = class extends extender32(gridViewBodyColumn16, gridViewBodyColumn16) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton46();
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.body.row.js?disableCache=0083
var gridViewRow16 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/item/news.list.item.js?disableCache=0083
var newsListItem16 = class extends extender32(news16, gridViewRow16) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody16();
title = new newsListItemTitle16();
price = new newsListItemPrice16();
actions = new newsListItemActions16();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default16.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/gridView/gridView.js?disableCache=0083
var gridView16 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/list/news.list.table.js?disableCache=0083
var newsListTable16 = class extends gridView16 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader16();
body = new newsListTableBody16(newsListItem16, new collection20(news16));
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/edit/news.edit.title.js?disableCache=0083
var newsEditTitle16 = class extends extender32(input16, title46) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/textarea.js?disableCache=0083
var textarea16 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default32.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/edit/news.edit.body.js?disableCache=0083
var newsPageBody31 = class extends extender32(body31, textarea16) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/edit/news.edit.button.js?disableCache=0083
var editButton31 = class extends button16 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/edit/news.edit.price.js?disableCache=0083
var newsPagePrice16 = class extends extender32(price16, input16) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/label.js?disableCache=0083
var label31 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/label/left.js?disableCache=0083
var leftLabel16 = class extends label31 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/panel.js?disableCache=0083
var panel16 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/window/draggable.js?disableCache=0083
var vector247 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay46(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay46, "delay");
var draggable31 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector247(0, 0);
grabPosition = new vector247(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector247(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay46(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector247(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/panel/row.js?disableCache=0083
var panelRow16 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/window/header.js?disableCache=0083
var maximizeButton16 = class extends icon16 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton16 = class extends icon16 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl16 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton16();
maximizeButton = new maximizeButton16();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title48 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl16 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader16 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl16();
title = new title48();
rightControl = new rightControl16();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/edit/news.edit.js?disableCache=0083
var newsBodyRow16 = class extends panelRow16 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel16("Message");
body = new newsPageBody31();
};
var newsTitleRow16 = class extends panelRow16 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel16("Title");
title = new newsEditTitle16();
};
var newsPriceRow16 = class extends panelRow16 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel16("Price");
price = new newsPagePrice16();
};
var cancelButton31 = class extends button16 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow16 = class extends panelRow16 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton31();
newsEditbutton = new editButton31();
};
var newsEdit16 = class extends extender32(news16, panel16, draggable31) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader16("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow16();
newsPriceRow = new newsPriceRow16();
newsBodyRow = new newsBodyRow16();
newsButtonRow = new newsButtonRow16();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
this.allow(user_group_permission_default16.visitor, "READ");
this.allow(user_group_permission_default16.member, "WRITE");
this.allow(user_group_permission_default16.admin, "WRITE");
this.allow(user_group_permission_default16.visitor, "WRITE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsDialogButton.js?disableCache=0083
var newsDialogButton16 = class extends button16 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/search.input.js?disableCache=0083
var searchBar46 = class extends input16 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/select.js?disableCache=0083
var select16 = class extends renderCollection18 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default32.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default16.admin, "READ");
this.allow(user_group_permission_default16.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default32.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/search.select.js?disableCache=0083
var customSelect31 = class extends select16 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/search.widget.js?disableCache=0083
var searchWidget16 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar46();
select = new customSelect31();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0083
var paginationItem16 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0083
var pagination16 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem16();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem16();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem16();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsItemPage.limit.js?disableCache=0083
var limit16 = class extends select16 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0083
var tableControl16 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label31("Select page:");
pagination = new pagination16();
limitLabel = new label31("Select items per page:");
limit = new limit16();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsItemPage.js?disableCache=0083
var testbutton16 = class extends button16 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage16 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header16("News Items");
searchWidget = new searchWidget16();
newsListTable = new newsListTable16();
tableControl = new tableControl16();
createNews = new newsEdit16();
testbutton = new testbutton16();
newsDialogButton = new newsDialogButton16();
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/flexbox.js?disableCache=0083
var flexbox31 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/page/news.page.title.js?disableCache=0083
var newsPageTitle16 = class extends extender32(title46, flexbox31) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/page/news.page.body.js?disableCache=0083
var newsPageBody32 = class extends extender32(flexbox31, body31) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/comments.messages.js?disableCache=0083
var commentsMessages16 = class extends renderCollection18 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR16(LIKE16(filter.body, this.value), LIKE16(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default16.visitor, "READ");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0083
var saveEditButton16 = class extends button16 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0083
var commentEditTitle31 = class extends title47 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0083
var commentEditBody31 = class extends extender32(body32, flexbox31) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default32.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0083
var userLabel31 = class extends label31 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0083
var deleteButton47 = class extends button16 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.editButton.js?disableCache=0083
var editButton32 = class extends button16 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.information.js?disableCache=0083
var information16 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton47();
_editButton = new editButton32();
_userLabel = new userLabel31();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/edit/comment.edit.js?disableCache=0083
var editComment16 = class extends comment17 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information16();
body = new commentEditBody31();
title = new commentEditTitle31();
saveButton = new saveEditButton16();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/create/comment.saveButton.js?disableCache=0083
var saveCommentButton16 = class extends button16 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/create/comment.create.body.js?disableCache=0083
var commentEditBody32 = class extends extender32(body32, textarea16) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/comment/create/comment.create.js?disableCache=0083
var createComment16 = class extends comment17 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody32();
saveButton = new saveCommentButton16();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default16.member, "WRITE");
this.allow(user_group_permission_default16.admin, "WRITE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/page/news.page.backButton.js?disableCache=0083
var backButton31 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/page/news.page.edit.button.js?disableCache=0083
var backButton32 = class extends button16 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/filler.js?disableCache=0083
var filler16 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/page/search.comments.js?disableCache=0083
var searchBar47 = class extends input16 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/page/news.page.js?disableCache=0083
var testDiv16 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle16();
};
var newsPage16 = class extends news16 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton31();
_testDiv = new testDiv16();
body = new newsPageBody32();
editButton = new backButton32();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar47();
commentsMessages = new commentsMessages16(editComment16, this.comments);
createComment = new createComment16(this.comments);
filler = new filler16();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default16.member, "WRITE");
this.allow(user_group_permission_default16.admin, "WRITE");
this.allow(user_group_permission_default16.visitor, "WRITE");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
this.allow(user_group_permission_default16.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/newsPages.js?disableCache=0083
var newsPages16 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage16();
newsPage = new newsPage16();
newsEdit = new newsEdit16();
width = 1800;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/preloaders/simpleSpinner.js?disableCache=0083
var line16 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask16 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line16();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox16 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask16();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0083
var themaSelectorImage16 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0083
var selectLabel16 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/themeSelector.js?disableCache=0083
var themeSelector16 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage16();
selectLabel = new selectLabel16();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0083
var themeOSSelectorItem16 = class extends themeSelector16 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default17.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0083
var osSelectorList16 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem16("Windows");
themeMacOS = new themeOSSelectorItem16("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default17.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0083
var osLabel16 = class extends label31 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/os.js?disableCache=0083
var os16 = class extends panelRow16 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel16("Os");
osSelector = new osSelectorList16();
spinner = new preloaderBox16();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0083
var themeTintSelector16 = class extends themeSelector16 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default17.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0083
var themeTintSelectors16 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector16("Light");
themeDark = new themeTintSelector16("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default17.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0083
var customLabel31 = class extends label31 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/rows/tint.js?disableCache=0083
var tint16 = class extends panelRow16 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel31("Appearance");
themeTintSelectors = new themeTintSelectors16();
spinner = new preloaderBox16();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/appearance/panel.js?disableCache=0083
var appearancePanel16 = class extends panel16 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os16();
tint = new tint16();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/pages/settings.js?disableCache=0083
var settings16 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header16("Appearance");
appearancePanel = new appearancePanel16();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0083
var Console17 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default17 = new Console17();
// framework/unify/promiseManager.js?disableCache=0083
var promiseManager17 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0083
var shared17 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object50 = new shared17();
var shared_default17 = object50.get();
// framework/cache/platforms/Linux/Tablet/Dark/elements/fileUpload.js?disableCache=0083
var fileUpload16 = class extends input16 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager17();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0083
var delay47 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton16 = class extends icon16 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay47(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay47(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.icon.js?disableCache=0083
var fileIcon16 = class extends icon16 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton16();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.upload.js?disableCache=0083
var stream16 = class extends fileUpload16 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon16();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.list.js?disableCache=0083
var fileList16 = class extends panelRow16 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon16();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0083
var removeIcons16 = class extends icon16 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/page.js?disableCache=0083
var page16 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/image.js?disableCache=0083
var icon_id32 = 0;
var image16 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default32.createElement("img");
useCustomElement = true;
id = icon_id32++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0083
var previewImage16 = class extends image16 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0083
var imagePreviewWindow16 = class extends draggable31 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader16();
previewImage = new previewImage16();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0083
var fileChooserFileIcon16 = class extends icon16 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/checkbox.js?disableCache=0083
var checkbox16 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default32.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0083
var file16 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox16();
icon = new fileChooserFileIcon16();
label = new label31();
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0083
var fileChooserFiles16 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file16();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0083
var fileChooserSelectButton16 = class extends button16 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/fileChooser/fileChooser.js?disableCache=0083
var fileChooser16 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles16();
selectButton = new fileChooserSelectButton16();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/fileManager/fileManager.js?disableCache=0083
var fileManager16 = class extends page16 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header16("Upload");
fileupload = new stream16();
filesHeader = new header16("Files");
removeIcons = new removeIcons16();
fileList = new fileList16();
previewWindow = new imagePreviewWindow16();
fileChooser = new fileChooser16();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.move.js?disableCache=0083
var animationBlock106 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel106 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow16 = class extends panelRow16 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel106("Move");
animationBlock = new animationBlock106();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.rotate.js?disableCache=0083
var animationBlock107 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel107 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row91 = class extends panelRow16 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel107("Rotate");
animationBlock = new animationBlock107();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.color.js?disableCache=0083
var animationBlock108 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel108 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row92 = class extends panelRow16 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel108("Background color");
animationBlock = new animationBlock108();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.skewX.js?disableCache=0083
var animationBlock109 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel109 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row93 = class extends panelRow16 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel109("skewX");
animationBlock = new animationBlock109();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0083
var animationBlock110 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel110 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row94 = class extends panelRow16 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel110("Rotate + Move + Background");
animationBlock = new animationBlock110();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.reverse.js?disableCache=0083
var animationBlock111 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton16 = class extends button16 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton16 = class extends button16 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton16 = class extends button16 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton16 = class extends button16 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton16 = class extends button16 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel111 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons31 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton16();
pauseButton = new pauseButton16();
stopButton = new stopButton16();
forwardButton = new forwardButton16();
backwardButton = new backwardButton16();
flexDirection = "column";
};
var row95 = class extends panelRow16 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel111("Reverse");
buttons = new buttons31();
animationBlock = new animationBlock111();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animation.render.js?disableCache=0083
var animationBlock112 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel112 = class extends label31 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row96 = class extends panelRow16 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel112("RenderLoop");
animationBlock = new animationBlock112();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/animations/animations.js?disableCache=0083
var animations16 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow16();
rotateAnimation = new row91();
backgroundColor = new row92();
skewX = new row93();
rotateMoveColor = new row94();
reverse = new row95();
render = new row96();
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/examples/grids.js?disableCache=0083
var label32 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a16 = class extends input16 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b17 = class extends input16 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c16 = class extends input16 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d16 = class extends input16 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA16 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label32("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a16();
b = new b17();
c = new c16();
d = new d16();
};
var gridB16 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label32("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a16();
b = new b17();
c = new c16();
d = new d16();
};
var gridExample16 = class extends page16 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA16();
gridB = new gridB16();
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/header/user.userList.header.username.js?disableCache=0083
var userListHeaderUsername16 = class extends gridViewRowColumn16 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0083
var userListHeaderActions16 = class extends gridViewRowColumn16 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default16.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/header/user.userList.header.js?disableCache=0083
var userListHeader16 = class extends extender32(user17, gridViewTableRow16) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername16();
actions = new userListHeaderActions16();
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/user.userList.table.header.js?disableCache=0083
var userListTableHeader16 = class extends gridViewHeader16 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader16();
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/user.userList.table.body.js?disableCache=0083
var userListTableBody16 = class extends extender32(renderCollection18, gridViewTableHeader16) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE16(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default16.visitor, "READ");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/item/user.userList.item.username.js?disableCache=0083
var userListItemTitle16 = class extends extender32(username17, gridViewBodyColumn16) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0083
var deleteButton48 = class extends button16 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default16.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0083
var userListItemActions16 = class extends extender32(gridViewBodyColumn16, gridViewBodyColumn16) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton48();
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/item/user.userList.item.js?disableCache=0083
var userListItem16 = class extends extender32(user17, gridViewRow16) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle16();
actions = new userListItemActions16();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default16.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/user.userList.table.js?disableCache=0083
var userListTable16 = class extends gridView16 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader16();
body = new userListTableBody16(userListItem16, new collection20(user17));
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/search.js?disableCache=0083
var searchBar48 = class extends input16 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/userList/user.userList.page.js?disableCache=0083
var editPage16 = class extends page16 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header16("Users");
search = new searchBar48();
userTable = new userListTable16();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.username.js?disableCache=0083
var editUsername16 = class extends extender32(username17, input16) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.username.row.js?disableCache=0083
var usernameRow16 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label31("Username");
username = new editUsername16();
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/empty.js?disableCache=0083
var empty16 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/user.edit.button.js?disableCache=0083
var userEditButton16 = class extends button16 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/user.edit.button.row.js?disableCache=0083
var saveButtonRow16 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty16();
userEditButton = new userEditButton16();
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0083
var checkRenderCollection16 = class extends renderCollection18 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default16.admin, "WRITE");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
this.allow(user_group_permission_default16.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.checkbox.js?disableCache=0083
var customCheckbox31 = class extends checkbox16 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0083
var customCheckbox32 = class extends user17 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label31();
checkbox = new customCheckbox31();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0083
var checkboxRow16 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label31("Select users");
renderCollection = new checkRenderCollection16(customCheckbox32, new collection20(user17));
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.select.option.js?disableCache=0083
var customOption16 = class extends extender32(option16, user17) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0083
var customSelect32 = class extends renderCollection18 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default32.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default16.admin, "WRITE");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
this.allow(user_group_permission_default16.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.select.row.js?disableCache=0083
var optionRow16 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label31("Select user");
renderCollection = new customSelect32(customOption16, new collection20(user17));
};
// framework/cache/platforms/Linux/Tablet/Dark/user/edit/edit.user.js?disableCache=0083
var editUser16 = class extends extender32(user17, page16) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header16("Edit user");
usernameRow = new usernameRow16();
selectRow = new optionRow16();
checkboxRow = new checkboxRow16();
showSelectedUser = new customSelect32(customOption16, this.selectedUsers);
saveButtonRow = new saveButtonRow16();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default16.admin, "WRITE");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
this.allow(user_group_permission_default16.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signup/signup.username.js?disableCache=0083
var signUpUsername16 = class extends extender32(username17, input16) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/inputPassword.js?disableCache=0083
var inputPassword16 = class extends input16 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signup/signup.password.js?disableCache=0083
var signupPassword16 = class extends inputPassword16 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signup/signup.passwordCheck.js?disableCache=0083
var signupPasswordCheck16 = class extends inputPassword16 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0083
var cookieManager17 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default17 = new cookieManager17();
// framework/cache/platforms/Linux/Tablet/Dark/user/signup/signup.button.js?disableCache=0083
var signupButton16 = class extends button16 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signup/signup.customLabel.js?disableCache=0083
var customLabel32 = class extends label31 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signup/user.signup.js?disableCache=0083
var signup16 = class extends extender32(user17, page16) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default32.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header16("Signup");
// Children
userLabel = new customLabel32("Username");
username = new signUpUsername16();
passwordLabel = new customLabel32("Password");
password = new signupPassword16();
passwordAgainLabel = new customLabel32("Password again");
passwordAgain = new signupPasswordCheck16();
signUpButton = new signupButton16();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default16.visitor, "PROCESS");
this.allow(user_group_permission_default16.member, "PROCESS");
this.allow(user_group_permission_default16.admin, "PROCESS");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signin/signin.username.js?disableCache=0083
var signinUsername16 = class extends extender32(username17, input16) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/user.password.js?disableCache=0083
var password16 = class extends inputPassword16 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signin/signin.password.js?disableCache=0083
var signinPassword16 = class extends password16 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signin/signin.button.js?disableCache=0083
var signinFormButton16 = class extends button16 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0083
var unify17 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default17 = new unify17();
// framework/cache/platforms/Linux/Tablet/Dark/user/signin/signin.cancel.button.js?disableCache=0083
var cancelButton32 = class extends button16 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Linux/Tablet/Dark/user/signin/user.signin.js?disableCache=0083
var tussenObject16 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword16();
width = "100%";
};
var buttons32 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton32();
signinButton = new signinFormButton16();
};
var hint16 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin16 = class extends extender32(user17, page16) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint16();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default32.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header16("Signin");
//userLabel = new label("Username");
username = new signinUsername16();
//passwordLabel = new label("Password");
tussenObject = new tussenObject16();
buttons = new buttons32();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user17();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default17.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user17();
client2.user = visitor62;
client2.user.error = false;
unify_default17.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default17.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default16.visitor, "PROCESS");
this.allow(user_group_permission_default16.member, "PROCESS");
this.allow(user_group_permission_default16.admin, "PROCESS");
this.allow(user_group_permission_default16.member, "READ");
this.allow(user_group_permission_default16.admin, "READ");
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/rightSide/rightSide.js?disableCache=0652
var rightSide16 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages16();
signup = new signup16();
signin = new signin16();
settings = new settings16();
fileManager = new fileManager16();
animations = new animations16();
gridExample = new gridExample16();
userListPage = new editPage16();
editUser = new editUser16();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0652
var documentTool33 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object51 = new documentTool33();
var document_default33 = object51.getDocument();
// framework/unify/math/vector2.js?disableCache=0652
var vector248 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/flexbox.js?disableCache=0652
var flexbox32 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/window/frostedGlass.js?disableCache=0652
var frostedGlass32 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Linux/Tablet/Dark/elements/window/draggable.js?disableCache=0652
var vector249 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay48(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay48, "delay");
var draggable32 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector249(0, 0);
grabPosition = new vector249(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector249(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay48(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector249(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Tablet/Dark/demo/application.js
var application17 = class extends extender31(frostedGlass32, flexbox32, draggable32) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton16();
leftSide = new leftSide16();
rightSide = new rightSide16();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default33.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector248(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0217
function extender33(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender33, "extender");
// framework/unify/extender.js?disableCache=0977
function extender34(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender34, "extender");
// framework/cache/platforms/Linux/Pc/Light/elements/button.js?disableCache=0977
var button17 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/icon.js?disableCache=0977
var icon_id33 = 0;
var icon17 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id33++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Linux/Pc/Light/demo/minimizeButton.js?disableCache=0217
var minimizeButton17 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.js?disableCache=0977
var menuButton17 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.news.js?disableCache=0977
var newsButton17 = class extends menuButton17 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0977
var settingsButton49 = class extends menuButton17 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0977
var collection21 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0977
var datatype_default18 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0977
var documentTool34 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object52 = new documentTool34();
var document_default34 = object52.getDocument();
// framework/cache/platforms/Linux/Pc/Light/elements/option.js?disableCache=0977
var option17 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default34.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Linux/Pc/Light/user/group/user.group.js?disableCache=0977
var visitor34 = class extends option17 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member17 = class extends option17 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin33 = class extends option17 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups17 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member17();
admin = new admin33();
visitor = new visitor34();
};
// framework/cache/platforms/Linux/Pc/Light/user/group/user.group.permission.js?disableCache=0977
var user_group_permission_default17 = new groups17();
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0977
var signinPageButton17 = class extends menuButton17 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0977
var signinButton17 = class extends menuButton17 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0977
var visitor35 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager18 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor35();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default18 = new userManager18();
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0977
var signoutButton17 = class extends menuButton17 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default18.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default17.member, "PROCESS");
this.allow(user_group_permission_default17.admin, "PROCESS");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0977
var fileMangerButton17 = class extends menuButton17 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0977
var settingsButton50 = class extends menuButton17 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.users.js?disableCache=0977
var usersPageButton17 = class extends menuButton17 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default17.member, "PROCESS");
this.allow(user_group_permission_default17.admin, "PROCESS");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0977
var settingsButton51 = class extends menuButton17 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/header.js?disableCache=0977
var header17 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.header.js?disableCache=0977
var menuHeader17 = class extends header17 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Light/demo/leftSide/leftSide.js?disableCache=0217
var leftSide17 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader17();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton17();
settingsButton = new settingsButton49();
usersButton = new usersPageButton17();
signinButton = new signinPageButton17();
signoutButton = new signoutButton17();
signupButton = new signinButton17();
animationsButton = new settingsButton50();
gridButton = new settingsButton51();
fileManagerButton = new fileMangerButton17();
};
// framework/unify/table.js?disableCache=0977
var table19 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0977
var column17 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/news.title.js?disableCache=0977
var title49 = class extends column17 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/demo/news.body.js?disableCache=0977
var body33 = class extends column17 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/demo/news.price.js?disableCache=0977
var price17 = class extends column17 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default18.REAL;
};
// framework/cache/platforms/Linux/Pc/Light/user/user.username.js?disableCache=0977
var username18 = class extends column17 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0977
var tools19 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll18(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default18 = new tools19();
// framework/cache/platforms/Linux/Pc/Light/elements/input.js?disableCache=0977
var input17 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default34.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default34.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default34.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Linux/Pc/Light/user/user.salt.js?disableCache=0977
var salt18 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default18.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Light/user/user.hash.js?disableCache=0977
var hash18 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default18.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Light/user/user.js?disableCache=0977
var user18 = class _user extends table19 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username18();
salt = new salt18();
hash = new hash18();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups17();
selectedUsers = new collection21(_user);
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/comment.body.js?disableCache=0977
var body34 = class extends column17 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/comment.title.js?disableCache=0977
var title50 = class extends column17 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/comment.js?disableCache=0977
var comment18 = class extends table19 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user18();
title = new title50();
body = new body34();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Pc/Light/demo/news.js?disableCache=0977
var news17 = class extends table19 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title49();
body = new body33();
price = new price17();
comments = new collection21(comment18);
};
// framework/cache/platforms/Linux/Pc/Light/elements/tableCell.js?disableCache=0977
var tableCell17 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0977
var sortBy17 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.header.row.column.js?disableCache=0977
var gridViewRowColumn17 = class extends tableCell17 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy17();
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/header/news.list.header.body.js?disableCache=0977
var newsListHeaderBody17 = class extends gridViewRowColumn17 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/header/news.list.header.title.js?disableCache=0977
var newsListHeaderTitle17 = class extends gridViewRowColumn17 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/header/news.list.header.price.js?disableCache=0977
var newsListHeaderPrice17 = class extends gridViewRowColumn17 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/header/news.list.header.actions.js?disableCache=0977
var newsListHeaderActions17 = class extends gridViewRowColumn17 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default17.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.header.row.js?disableCache=0977
var gridViewTableRow17 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/header/news.list.header.js?disableCache=0977
var newsListHeader17 = class extends extender34(news17, gridViewTableRow17) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody17();
title = new newsListHeaderTitle17();
price = new newsListHeaderPrice17();
actions = new newsListHeaderActions17();
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.header.js?disableCache=0977
var gridViewHeader17 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/news.list.table.header.js?disableCache=0977
var newsListTableHeader17 = class extends gridViewHeader17 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader17();
};
// framework/unify/renderCollection.js?disableCache=0977
var renderCollection19 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.body.js?disableCache=0977
var gridViewTableHeader17 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0977
function OR17(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR17, "OR");
// framework/unify/sql/LIKE.js?disableCache=0977
function LIKE17(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE17, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0977
function GREATER_OR_EQUAL17(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL17, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0977
function SMALLER_OR_EQUAL17(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL17, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Linux/Pc/Light/demo/list/news.list.table.body.js?disableCache=0977
var newsListTableBody17 = class extends extender34(renderCollection19, gridViewTableHeader17) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR17(OR17(LIKE17(filter.title, searchTerm), LIKE17(filter.comments.body, searchTerm)), LIKE17(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL17(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL17(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default17.visitor, "READ");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.body.row.column.js?disableCache=0977
var gridViewBodyColumn17 = class extends tableCell17 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/item/news.list.item.body.js?disableCache=0977
var newsListItemBody17 = class extends extender34(body33, gridViewBodyColumn17) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/item/news.list.item.title.js?disableCache=0977
var newsListItemTitle17 = class extends extender34(title49, gridViewBodyColumn17) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/item/news.list.item.price.js?disableCache=0977
var newsListItemPrice17 = class extends extender34(price17, gridViewBodyColumn17) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0977
var deleteButton49 = class extends button17 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default17.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/item/news.list.item.actions.js?disableCache=0977
var newsListItemActions17 = class extends extender34(gridViewBodyColumn17, gridViewBodyColumn17) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton49();
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.body.row.js?disableCache=0977
var gridViewRow17 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/item/news.list.item.js?disableCache=0977
var newsListItem17 = class extends extender34(news17, gridViewRow17) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody17();
title = new newsListItemTitle17();
price = new newsListItemPrice17();
actions = new newsListItemActions17();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default17.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/gridView/gridView.js?disableCache=0977
var gridView17 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Light/demo/list/news.list.table.js?disableCache=0977
var newsListTable17 = class extends gridView17 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader17();
body = new newsListTableBody17(newsListItem17, new collection21(news17));
};
// framework/cache/platforms/Linux/Pc/Light/demo/edit/news.edit.title.js?disableCache=0977
var newsEditTitle17 = class extends extender34(input17, title49) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Linux/Pc/Light/elements/textarea.js?disableCache=0977
var textarea17 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default34.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/edit/news.edit.body.js?disableCache=0977
var newsPageBody33 = class extends extender34(body33, textarea17) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/edit/news.edit.button.js?disableCache=0977
var editButton33 = class extends button17 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/edit/news.edit.price.js?disableCache=0977
var newsPagePrice17 = class extends extender34(price17, input17) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/label.js?disableCache=0977
var label33 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Linux/Pc/Light/elements/label/left.js?disableCache=0977
var leftLabel17 = class extends label33 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Linux/Pc/Light/elements/panel.js?disableCache=0977
var panel17 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Linux/Pc/Light/elements/window/draggable.js?disableCache=0977
var vector250 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay49(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay49, "delay");
var draggable33 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector250(0, 0);
grabPosition = new vector250(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector250(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay49(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector250(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/panel/row.js?disableCache=0977
var panelRow17 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/window/header.js?disableCache=0977
var maximizeButton17 = class extends icon17 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton17 = class extends icon17 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl17 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton17();
maximizeButton = new maximizeButton17();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title51 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl17 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader17 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl17();
title = new title51();
rightControl = new rightControl17();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Linux/Pc/Light/demo/edit/news.edit.js?disableCache=0977
var newsBodyRow17 = class extends panelRow17 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel17("Message");
body = new newsPageBody33();
};
var newsTitleRow17 = class extends panelRow17 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel17("Title");
title = new newsEditTitle17();
};
var newsPriceRow17 = class extends panelRow17 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel17("Price");
price = new newsPagePrice17();
};
var cancelButton33 = class extends button17 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow17 = class extends panelRow17 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton33();
newsEditbutton = new editButton33();
};
var newsEdit17 = class extends extender34(news17, panel17, draggable33) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader17("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow17();
newsPriceRow = new newsPriceRow17();
newsBodyRow = new newsBodyRow17();
newsButtonRow = new newsButtonRow17();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
this.allow(user_group_permission_default17.visitor, "READ");
this.allow(user_group_permission_default17.member, "WRITE");
this.allow(user_group_permission_default17.admin, "WRITE");
this.allow(user_group_permission_default17.visitor, "WRITE");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsDialogButton.js?disableCache=0977
var newsDialogButton17 = class extends button17 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/search.input.js?disableCache=0977
var searchBar49 = class extends input17 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/select.js?disableCache=0977
var select17 = class extends renderCollection19 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default34.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default17.admin, "READ");
this.allow(user_group_permission_default17.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default34.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/search.select.js?disableCache=0977
var customSelect33 = class extends select17 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/search.widget.js?disableCache=0977
var searchWidget17 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar49();
select = new customSelect33();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0977
var paginationItem17 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsItemPage.pagination.js?disableCache=0977
var pagination17 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem17();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem17();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem17();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsItemPage.limit.js?disableCache=0977
var limit17 = class extends select17 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0977
var tableControl17 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label33("Select page:");
pagination = new pagination17();
limitLabel = new label33("Select items per page:");
limit = new limit17();
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsItemPage.js?disableCache=0977
var testbutton17 = class extends button17 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage17 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header17("News Items");
searchWidget = new searchWidget17();
newsListTable = new newsListTable17();
tableControl = new tableControl17();
createNews = new newsEdit17();
testbutton = new testbutton17();
newsDialogButton = new newsDialogButton17();
};
// framework/cache/platforms/Linux/Pc/Light/elements/flexbox.js?disableCache=0977
var flexbox33 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Pc/Light/demo/page/news.page.title.js?disableCache=0977
var newsPageTitle17 = class extends extender34(title49, flexbox33) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Linux/Pc/Light/demo/page/news.page.body.js?disableCache=0977
var newsPageBody34 = class extends extender34(flexbox33, body33) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/comments.messages.js?disableCache=0977
var commentsMessages17 = class extends renderCollection19 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR17(LIKE17(filter.body, this.value), LIKE17(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default17.visitor, "READ");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.saveButton.js?disableCache=0977
var saveEditButton17 = class extends button17 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.edit.title.js?disableCache=0977
var commentEditTitle33 = class extends title50 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.edit.body.js?disableCache=0977
var commentEditBody33 = class extends extender34(body34, flexbox33) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default34.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.userLabel.js?disableCache=0977
var userLabel33 = class extends label33 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0977
var deleteButton50 = class extends button17 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.editButton.js?disableCache=0977
var editButton34 = class extends button17 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.information.js?disableCache=0977
var information17 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton50();
_editButton = new editButton34();
_userLabel = new userLabel33();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/edit/comment.edit.js?disableCache=0977
var editComment17 = class extends comment18 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information17();
body = new commentEditBody33();
title = new commentEditTitle33();
saveButton = new saveEditButton17();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/create/comment.saveButton.js?disableCache=0977
var saveCommentButton17 = class extends button17 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/create/comment.create.body.js?disableCache=0977
var commentEditBody34 = class extends extender34(body34, textarea17) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Linux/Pc/Light/demo/comment/create/comment.create.js?disableCache=0977
var createComment17 = class extends comment18 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody34();
saveButton = new saveCommentButton17();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default17.member, "WRITE");
this.allow(user_group_permission_default17.admin, "WRITE");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/page/news.page.backButton.js?disableCache=0977
var backButton33 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/page/news.page.edit.button.js?disableCache=0977
var backButton34 = class extends button17 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/filler.js?disableCache=0977
var filler17 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Pc/Light/demo/page/search.comments.js?disableCache=0977
var searchBar50 = class extends input17 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/page/news.page.js?disableCache=0977
var testDiv17 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle17();
};
var newsPage17 = class extends news17 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton33();
_testDiv = new testDiv17();
body = new newsPageBody34();
editButton = new backButton34();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar50();
commentsMessages = new commentsMessages17(editComment17, this.comments);
createComment = new createComment17(this.comments);
filler = new filler17();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default17.member, "WRITE");
this.allow(user_group_permission_default17.admin, "WRITE");
this.allow(user_group_permission_default17.visitor, "WRITE");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
this.allow(user_group_permission_default17.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/newsPages.js?disableCache=0977
var newsPages17 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage17();
newsPage = new newsPage17();
newsEdit = new newsEdit17();
width = 1800;
};
// framework/cache/platforms/Linux/Pc/Light/elements/preloaders/simpleSpinner.js?disableCache=0977
var line17 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask17 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line17();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox17 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask17();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0977
var themaSelectorImage17 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0977
var selectLabel17 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/themeSelector.js?disableCache=0977
var themeSelector17 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage17();
selectLabel = new selectLabel17();
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0977
var themeOSSelectorItem17 = class extends themeSelector17 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default18.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0977
var osSelectorList17 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem17("Windows");
themeMacOS = new themeOSSelectorItem17("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default18.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/os.label.js?disableCache=0977
var osLabel17 = class extends label33 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/os.js?disableCache=0977
var os17 = class extends panelRow17 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel17("Os");
osSelector = new osSelectorList17();
spinner = new preloaderBox17();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0977
var themeTintSelector17 = class extends themeSelector17 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default18.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0977
var themeTintSelectors17 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector17("Light");
themeDark = new themeTintSelector17("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default18.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0977
var customLabel33 = class extends label33 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/rows/tint.js?disableCache=0977
var tint17 = class extends panelRow17 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel33("Appearance");
themeTintSelectors = new themeTintSelectors17();
spinner = new preloaderBox17();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/appearance/panel.js?disableCache=0977
var appearancePanel17 = class extends panel17 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os17();
tint = new tint17();
};
// framework/cache/platforms/Linux/Pc/Light/demo/pages/settings.js?disableCache=0977
var settings17 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header17("Appearance");
appearancePanel = new appearancePanel17();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0977
var Console18 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default18 = new Console18();
// framework/unify/promiseManager.js?disableCache=0977
var promiseManager18 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0977
var shared18 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object53 = new shared18();
var shared_default18 = object53.get();
// framework/cache/platforms/Linux/Pc/Light/elements/fileUpload.js?disableCache=0977
var fileUpload17 = class extends input17 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager18();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0977
var delay50 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton17 = class extends icon17 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay50(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay50(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.icon.js?disableCache=0977
var fileIcon17 = class extends icon17 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton17();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.upload.js?disableCache=0977
var stream17 = class extends fileUpload17 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon17();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.list.js?disableCache=0977
var fileList17 = class extends panelRow17 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon17();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0977
var removeIcons17 = class extends icon17 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/page.js?disableCache=0977
var page17 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Linux/Pc/Light/elements/image.js?disableCache=0977
var icon_id34 = 0;
var image17 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default34.createElement("img");
useCustomElement = true;
id = icon_id34++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0977
var previewImage17 = class extends image17 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0977
var imagePreviewWindow17 = class extends draggable33 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader17();
previewImage = new previewImage17();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0977
var fileChooserFileIcon17 = class extends icon17 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/checkbox.js?disableCache=0977
var checkbox17 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default34.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/fileChooser/fileChooser.file.js?disableCache=0977
var file17 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox17();
icon = new fileChooserFileIcon17();
label = new label33();
};
// framework/cache/platforms/Linux/Pc/Light/elements/fileChooser/fileChooser.files.js?disableCache=0977
var fileChooserFiles17 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file17();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0977
var fileChooserSelectButton17 = class extends button17 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/fileChooser/fileChooser.js?disableCache=0977
var fileChooser17 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles17();
selectButton = new fileChooserSelectButton17();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/fileManager/fileManager.js?disableCache=0977
var fileManager17 = class extends page17 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header17("Upload");
fileupload = new stream17();
filesHeader = new header17("Files");
removeIcons = new removeIcons17();
fileList = new fileList17();
previewWindow = new imagePreviewWindow17();
fileChooser = new fileChooser17();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.move.js?disableCache=0977
var animationBlock113 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel113 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow17 = class extends panelRow17 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel113("Move");
animationBlock = new animationBlock113();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.rotate.js?disableCache=0977
var animationBlock114 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel114 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row97 = class extends panelRow17 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel114("Rotate");
animationBlock = new animationBlock114();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.color.js?disableCache=0977
var animationBlock115 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel115 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row98 = class extends panelRow17 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel115("Background color");
animationBlock = new animationBlock115();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.skewX.js?disableCache=0977
var animationBlock116 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel116 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row99 = class extends panelRow17 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel116("skewX");
animationBlock = new animationBlock116();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0977
var animationBlock117 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel117 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row100 = class extends panelRow17 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel117("Rotate + Move + Background");
animationBlock = new animationBlock117();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.reverse.js?disableCache=0977
var animationBlock118 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton17 = class extends button17 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton17 = class extends button17 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton17 = class extends button17 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton17 = class extends button17 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton17 = class extends button17 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel118 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons33 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton17();
pauseButton = new pauseButton17();
stopButton = new stopButton17();
forwardButton = new forwardButton17();
backwardButton = new backwardButton17();
flexDirection = "column";
};
var row101 = class extends panelRow17 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel118("Reverse");
buttons = new buttons33();
animationBlock = new animationBlock118();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animation.render.js?disableCache=0977
var animationBlock119 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel119 = class extends label33 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row102 = class extends panelRow17 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel119("RenderLoop");
animationBlock = new animationBlock119();
};
// framework/cache/platforms/Linux/Pc/Light/demo/animations/animations.js?disableCache=0977
var animations17 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow17();
rotateAnimation = new row97();
backgroundColor = new row98();
skewX = new row99();
rotateMoveColor = new row100();
reverse = new row101();
render = new row102();
};
// framework/cache/platforms/Linux/Pc/Light/demo/examples/grids.js?disableCache=0977
var label34 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a17 = class extends input17 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b18 = class extends input17 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c17 = class extends input17 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d17 = class extends input17 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA17 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label34("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a17();
b = new b18();
c = new c17();
d = new d17();
};
var gridB17 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label34("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a17();
b = new b18();
c = new c17();
d = new d17();
};
var gridExample17 = class extends page17 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA17();
gridB = new gridB17();
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/header/user.userList.header.username.js?disableCache=0977
var userListHeaderUsername17 = class extends gridViewRowColumn17 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/header/user.userList.header.actions.js?disableCache=0977
var userListHeaderActions17 = class extends gridViewRowColumn17 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default17.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/header/user.userList.header.js?disableCache=0977
var userListHeader17 = class extends extender34(user18, gridViewTableRow17) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername17();
actions = new userListHeaderActions17();
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/user.userList.table.header.js?disableCache=0977
var userListTableHeader17 = class extends gridViewHeader17 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader17();
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/user.userList.table.body.js?disableCache=0977
var userListTableBody17 = class extends extender34(renderCollection19, gridViewTableHeader17) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE17(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default17.visitor, "READ");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/item/user.userList.item.username.js?disableCache=0977
var userListItemTitle17 = class extends extender34(username18, gridViewBodyColumn17) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0977
var deleteButton51 = class extends button17 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default17.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/item/user.userList.item.actions.js?disableCache=0977
var userListItemActions17 = class extends extender34(gridViewBodyColumn17, gridViewBodyColumn17) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton51();
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/item/user.userList.item.js?disableCache=0977
var userListItem17 = class extends extender34(user18, gridViewRow17) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle17();
actions = new userListItemActions17();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default17.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/user.userList.table.js?disableCache=0977
var userListTable17 = class extends gridView17 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader17();
body = new userListTableBody17(userListItem17, new collection21(user18));
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/search.js?disableCache=0977
var searchBar51 = class extends input17 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Pc/Light/user/userList/user.userList.page.js?disableCache=0977
var editPage17 = class extends page17 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header17("Users");
search = new searchBar51();
userTable = new userListTable17();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.username.js?disableCache=0977
var editUsername17 = class extends extender34(username18, input17) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.username.row.js?disableCache=0977
var usernameRow17 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label33("Username");
username = new editUsername17();
};
// framework/cache/platforms/Linux/Pc/Light/elements/empty.js?disableCache=0977
var empty17 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/user.edit.button.js?disableCache=0977
var userEditButton17 = class extends button17 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/user.edit.button.row.js?disableCache=0977
var saveButtonRow17 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty17();
userEditButton = new userEditButton17();
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0977
var checkRenderCollection17 = class extends renderCollection19 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default17.admin, "WRITE");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
this.allow(user_group_permission_default17.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.checkbox.js?disableCache=0977
var customCheckbox33 = class extends checkbox17 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0977
var customCheckbox34 = class extends user18 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label33();
checkbox = new customCheckbox33();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.checkbox.row.js?disableCache=0977
var checkboxRow17 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label33("Select users");
renderCollection = new checkRenderCollection17(customCheckbox34, new collection21(user18));
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.select.option.js?disableCache=0977
var customOption17 = class extends extender34(option17, user18) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0977
var customSelect34 = class extends renderCollection19 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default34.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default17.admin, "WRITE");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
this.allow(user_group_permission_default17.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.select.row.js?disableCache=0977
var optionRow17 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label33("Select user");
renderCollection = new customSelect34(customOption17, new collection21(user18));
};
// framework/cache/platforms/Linux/Pc/Light/user/edit/edit.user.js?disableCache=0977
var editUser17 = class extends extender34(user18, page17) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header17("Edit user");
usernameRow = new usernameRow17();
selectRow = new optionRow17();
checkboxRow = new checkboxRow17();
showSelectedUser = new customSelect34(customOption17, this.selectedUsers);
saveButtonRow = new saveButtonRow17();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default17.admin, "WRITE");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
this.allow(user_group_permission_default17.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/signup/signup.username.js?disableCache=0977
var signUpUsername17 = class extends extender34(username18, input17) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Light/elements/inputPassword.js?disableCache=0977
var inputPassword17 = class extends input17 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Pc/Light/user/signup/signup.password.js?disableCache=0977
var signupPassword17 = class extends inputPassword17 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Linux/Pc/Light/user/signup/signup.passwordCheck.js?disableCache=0977
var signupPasswordCheck17 = class extends inputPassword17 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0977
var cookieManager18 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default18 = new cookieManager18();
// framework/cache/platforms/Linux/Pc/Light/user/signup/signup.button.js?disableCache=0977
var signupButton17 = class extends button17 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Linux/Pc/Light/user/signup/signup.customLabel.js?disableCache=0977
var customLabel34 = class extends label33 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Linux/Pc/Light/user/signup/user.signup.js?disableCache=0977
var signup17 = class extends extender34(user18, page17) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default34.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header17("Signup");
// Children
userLabel = new customLabel34("Username");
username = new signUpUsername17();
passwordLabel = new customLabel34("Password");
password = new signupPassword17();
passwordAgainLabel = new customLabel34("Password again");
passwordAgain = new signupPasswordCheck17();
signUpButton = new signupButton17();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default17.visitor, "PROCESS");
this.allow(user_group_permission_default17.member, "PROCESS");
this.allow(user_group_permission_default17.admin, "PROCESS");
}
};
// framework/cache/platforms/Linux/Pc/Light/user/signin/signin.username.js?disableCache=0977
var signinUsername17 = class extends extender34(username18, input17) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Linux/Pc/Light/user/user.password.js?disableCache=0977
var password17 = class extends inputPassword17 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Linux/Pc/Light/user/signin/signin.password.js?disableCache=0977
var signinPassword17 = class extends password17 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Linux/Pc/Light/user/signin/signin.button.js?disableCache=0977
var signinFormButton17 = class extends button17 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0977
var unify18 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default18 = new unify18();
// framework/cache/platforms/Linux/Pc/Light/user/signin/signin.cancel.button.js?disableCache=0977
var cancelButton34 = class extends button17 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Light/user/signin/user.signin.js?disableCache=0977
var tussenObject17 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword17();
width = "100%";
};
var buttons34 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton34();
signinButton = new signinFormButton17();
};
var hint17 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin17 = class extends extender34(user18, page17) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint17();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default34.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header17("Signin");
//userLabel = new label("Username");
username = new signinUsername17();
//passwordLabel = new label("Password");
tussenObject = new tussenObject17();
buttons = new buttons34();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user18();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default18.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user18();
client2.user = visitor62;
client2.user.error = false;
unify_default18.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default18.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default17.visitor, "PROCESS");
this.allow(user_group_permission_default17.member, "PROCESS");
this.allow(user_group_permission_default17.admin, "PROCESS");
this.allow(user_group_permission_default17.member, "READ");
this.allow(user_group_permission_default17.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/rightSide/rightSide.js?disableCache=0217
var rightSide17 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages17();
signup = new signup17();
signin = new signin17();
settings = new settings17();
fileManager = new fileManager17();
animations = new animations17();
gridExample = new gridExample17();
userListPage = new editPage17();
editUser = new editUser17();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0217
var documentTool35 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object54 = new documentTool35();
var document_default35 = object54.getDocument();
// framework/unify/math/vector2.js?disableCache=0217
var vector251 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Linux/Pc/Light/elements/flexbox.js?disableCache=0217
var flexbox34 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Pc/Light/elements/window/frostedGlass.js?disableCache=0217
var frostedGlass34 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Linux/Pc/Light/elements/window/draggable.js?disableCache=0217
var vector252 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay51(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay51, "delay");
var draggable34 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector252(0, 0);
grabPosition = new vector252(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector252(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay51(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector252(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Pc/Light/demo/application.js
var application18 = class extends extender33(frostedGlass34, flexbox34, draggable34) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton17();
leftSide = new leftSide17();
rightSide = new rightSide17();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default35.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector251(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0358
function extender35(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender35, "extender");
// framework/unify/extender.js?disableCache=0056
function extender36(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender36, "extender");
// framework/cache/platforms/Linux/Pc/Dark/elements/button.js?disableCache=0056
var button18 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/icon.js?disableCache=0056
var icon_id35 = 0;
var icon18 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id35++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/minimizeButton.js?disableCache=0358
var minimizeButton18 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.js?disableCache=0056
var menuButton18 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0056
var newsButton18 = class extends menuButton18 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0056
var settingsButton52 = class extends menuButton18 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0056
var collection22 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0056
var datatype_default19 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0056
var documentTool36 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object55 = new documentTool36();
var document_default36 = object55.getDocument();
// framework/cache/platforms/Linux/Pc/Dark/elements/option.js?disableCache=0056
var option18 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default36.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/group/user.group.js?disableCache=0056
var visitor36 = class extends option18 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member18 = class extends option18 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin35 = class extends option18 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups18 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member18();
admin = new admin35();
visitor = new visitor36();
};
// framework/cache/platforms/Linux/Pc/Dark/user/group/user.group.permission.js?disableCache=0056
var user_group_permission_default18 = new groups18();
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0056
var signinPageButton18 = class extends menuButton18 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0056
var signinButton18 = class extends menuButton18 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0056
var visitor37 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager19 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor37();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default19 = new userManager19();
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0056
var signoutButton18 = class extends menuButton18 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default19.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default18.member, "PROCESS");
this.allow(user_group_permission_default18.admin, "PROCESS");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0056
var fileMangerButton18 = class extends menuButton18 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0056
var settingsButton53 = class extends menuButton18 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0056
var usersPageButton18 = class extends menuButton18 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default18.member, "PROCESS");
this.allow(user_group_permission_default18.admin, "PROCESS");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0056
var settingsButton54 = class extends menuButton18 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/header.js?disableCache=0056
var header18 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.header.js?disableCache=0056
var menuHeader18 = class extends header18 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/leftSide/leftSide.js?disableCache=0358
var leftSide18 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader18();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton18();
settingsButton = new settingsButton52();
usersButton = new usersPageButton18();
signinButton = new signinPageButton18();
signoutButton = new signoutButton18();
signupButton = new signinButton18();
animationsButton = new settingsButton53();
gridButton = new settingsButton54();
fileManagerButton = new fileMangerButton18();
};
// framework/unify/table.js?disableCache=0056
var table20 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0056
var column18 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/news.title.js?disableCache=0056
var title52 = class extends column18 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/news.body.js?disableCache=0056
var body35 = class extends column18 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/news.price.js?disableCache=0056
var price18 = class extends column18 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default19.REAL;
};
// framework/cache/platforms/Linux/Pc/Dark/user/user.username.js?disableCache=0056
var username19 = class extends column18 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0056
var tools20 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll19(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default19 = new tools20();
// framework/cache/platforms/Linux/Pc/Dark/elements/input.js?disableCache=0056
var input18 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default36.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default36.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default36.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/user.salt.js?disableCache=0056
var salt19 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default19.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Dark/user/user.hash.js?disableCache=0056
var hash19 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default19.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Dark/user/user.js?disableCache=0056
var user19 = class _user extends table20 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username19();
salt = new salt19();
hash = new hash19();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups18();
selectedUsers = new collection22(_user);
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/comment.body.js?disableCache=0056
var body36 = class extends column18 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/comment.title.js?disableCache=0056
var title53 = class extends column18 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/comment.js?disableCache=0056
var comment19 = class extends table20 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user19();
title = new title53();
body = new body36();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/news.js?disableCache=0056
var news18 = class extends table20 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title52();
body = new body35();
price = new price18();
comments = new collection22(comment19);
};
// framework/cache/platforms/Linux/Pc/Dark/elements/tableCell.js?disableCache=0056
var tableCell18 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0056
var sortBy18 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0056
var gridViewRowColumn18 = class extends tableCell18 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy18();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/header/news.list.header.body.js?disableCache=0056
var newsListHeaderBody18 = class extends gridViewRowColumn18 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/header/news.list.header.title.js?disableCache=0056
var newsListHeaderTitle18 = class extends gridViewRowColumn18 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/header/news.list.header.price.js?disableCache=0056
var newsListHeaderPrice18 = class extends gridViewRowColumn18 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/header/news.list.header.actions.js?disableCache=0056
var newsListHeaderActions18 = class extends gridViewRowColumn18 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default18.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.header.row.js?disableCache=0056
var gridViewTableRow18 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/header/news.list.header.js?disableCache=0056
var newsListHeader18 = class extends extender36(news18, gridViewTableRow18) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody18();
title = new newsListHeaderTitle18();
price = new newsListHeaderPrice18();
actions = new newsListHeaderActions18();
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.header.js?disableCache=0056
var gridViewHeader18 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/news.list.table.header.js?disableCache=0056
var newsListTableHeader18 = class extends gridViewHeader18 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader18();
};
// framework/unify/renderCollection.js?disableCache=0056
var renderCollection20 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.body.js?disableCache=0056
var gridViewTableHeader18 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0056
function OR18(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR18, "OR");
// framework/unify/sql/LIKE.js?disableCache=0056
function LIKE18(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE18, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0056
function GREATER_OR_EQUAL18(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL18, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0056
function SMALLER_OR_EQUAL18(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL18, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Linux/Pc/Dark/demo/list/news.list.table.body.js?disableCache=0056
var newsListTableBody18 = class extends extender36(renderCollection20, gridViewTableHeader18) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR18(OR18(LIKE18(filter.title, searchTerm), LIKE18(filter.comments.body, searchTerm)), LIKE18(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL18(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL18(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default18.visitor, "READ");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0056
var gridViewBodyColumn18 = class extends tableCell18 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/item/news.list.item.body.js?disableCache=0056
var newsListItemBody18 = class extends extender36(body35, gridViewBodyColumn18) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/item/news.list.item.title.js?disableCache=0056
var newsListItemTitle18 = class extends extender36(title52, gridViewBodyColumn18) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/item/news.list.item.price.js?disableCache=0056
var newsListItemPrice18 = class extends extender36(price18, gridViewBodyColumn18) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0056
var deleteButton52 = class extends button18 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default18.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/item/news.list.item.actions.js?disableCache=0056
var newsListItemActions18 = class extends extender36(gridViewBodyColumn18, gridViewBodyColumn18) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton52();
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.body.row.js?disableCache=0056
var gridViewRow18 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/item/news.list.item.js?disableCache=0056
var newsListItem18 = class extends extender36(news18, gridViewRow18) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody18();
title = new newsListItemTitle18();
price = new newsListItemPrice18();
actions = new newsListItemActions18();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default18.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/gridView/gridView.js?disableCache=0056
var gridView18 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/list/news.list.table.js?disableCache=0056
var newsListTable18 = class extends gridView18 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader18();
body = new newsListTableBody18(newsListItem18, new collection22(news18));
};
// framework/cache/platforms/Linux/Pc/Dark/demo/edit/news.edit.title.js?disableCache=0056
var newsEditTitle18 = class extends extender36(input18, title52) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Linux/Pc/Dark/elements/textarea.js?disableCache=0056
var textarea18 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default36.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/edit/news.edit.body.js?disableCache=0056
var newsPageBody35 = class extends extender36(body35, textarea18) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/edit/news.edit.button.js?disableCache=0056
var editButton35 = class extends button18 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/edit/news.edit.price.js?disableCache=0056
var newsPagePrice18 = class extends extender36(price18, input18) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/label.js?disableCache=0056
var label35 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/label/left.js?disableCache=0056
var leftLabel18 = class extends label35 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Linux/Pc/Dark/elements/panel.js?disableCache=0056
var panel18 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Linux/Pc/Dark/elements/window/draggable.js?disableCache=0056
var vector253 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay52(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay52, "delay");
var draggable35 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector253(0, 0);
grabPosition = new vector253(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector253(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay52(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector253(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/panel/row.js?disableCache=0056
var panelRow18 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/window/header.js?disableCache=0056
var maximizeButton18 = class extends icon18 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton18 = class extends icon18 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl18 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton18();
maximizeButton = new maximizeButton18();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title54 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl18 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader18 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl18();
title = new title54();
rightControl = new rightControl18();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/edit/news.edit.js?disableCache=0056
var newsBodyRow18 = class extends panelRow18 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel18("Message");
body = new newsPageBody35();
};
var newsTitleRow18 = class extends panelRow18 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel18("Title");
title = new newsEditTitle18();
};
var newsPriceRow18 = class extends panelRow18 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel18("Price");
price = new newsPagePrice18();
};
var cancelButton35 = class extends button18 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow18 = class extends panelRow18 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton35();
newsEditbutton = new editButton35();
};
var newsEdit18 = class extends extender36(news18, panel18, draggable35) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader18("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow18();
newsPriceRow = new newsPriceRow18();
newsBodyRow = new newsBodyRow18();
newsButtonRow = new newsButtonRow18();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
this.allow(user_group_permission_default18.visitor, "READ");
this.allow(user_group_permission_default18.member, "WRITE");
this.allow(user_group_permission_default18.admin, "WRITE");
this.allow(user_group_permission_default18.visitor, "WRITE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsDialogButton.js?disableCache=0056
var newsDialogButton18 = class extends button18 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/search.input.js?disableCache=0056
var searchBar52 = class extends input18 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/select.js?disableCache=0056
var select18 = class extends renderCollection20 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default36.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default18.admin, "READ");
this.allow(user_group_permission_default18.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default36.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/search.select.js?disableCache=0056
var customSelect35 = class extends select18 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/search.widget.js?disableCache=0056
var searchWidget18 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar52();
select = new customSelect35();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0056
var paginationItem18 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0056
var pagination18 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem18();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem18();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem18();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsItemPage.limit.js?disableCache=0056
var limit18 = class extends select18 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0056
var tableControl18 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label35("Select page:");
pagination = new pagination18();
limitLabel = new label35("Select items per page:");
limit = new limit18();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsItemPage.js?disableCache=0056
var testbutton18 = class extends button18 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage18 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header18("News Items");
searchWidget = new searchWidget18();
newsListTable = new newsListTable18();
tableControl = new tableControl18();
createNews = new newsEdit18();
testbutton = new testbutton18();
newsDialogButton = new newsDialogButton18();
};
// framework/cache/platforms/Linux/Pc/Dark/elements/flexbox.js?disableCache=0056
var flexbox35 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/page/news.page.title.js?disableCache=0056
var newsPageTitle18 = class extends extender36(title52, flexbox35) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/page/news.page.body.js?disableCache=0056
var newsPageBody36 = class extends extender36(flexbox35, body35) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/comments.messages.js?disableCache=0056
var commentsMessages18 = class extends renderCollection20 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR18(LIKE18(filter.body, this.value), LIKE18(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default18.visitor, "READ");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0056
var saveEditButton18 = class extends button18 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0056
var commentEditTitle35 = class extends title53 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0056
var commentEditBody35 = class extends extender36(body36, flexbox35) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default36.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0056
var userLabel35 = class extends label35 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0056
var deleteButton53 = class extends button18 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.editButton.js?disableCache=0056
var editButton36 = class extends button18 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.information.js?disableCache=0056
var information18 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton53();
_editButton = new editButton36();
_userLabel = new userLabel35();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/edit/comment.edit.js?disableCache=0056
var editComment18 = class extends comment19 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information18();
body = new commentEditBody35();
title = new commentEditTitle35();
saveButton = new saveEditButton18();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/create/comment.saveButton.js?disableCache=0056
var saveCommentButton18 = class extends button18 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/create/comment.create.body.js?disableCache=0056
var commentEditBody36 = class extends extender36(body36, textarea18) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/comment/create/comment.create.js?disableCache=0056
var createComment18 = class extends comment19 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody36();
saveButton = new saveCommentButton18();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default18.member, "WRITE");
this.allow(user_group_permission_default18.admin, "WRITE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/page/news.page.backButton.js?disableCache=0056
var backButton35 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/page/news.page.edit.button.js?disableCache=0056
var backButton36 = class extends button18 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/filler.js?disableCache=0056
var filler18 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/page/search.comments.js?disableCache=0056
var searchBar53 = class extends input18 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/page/news.page.js?disableCache=0056
var testDiv18 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle18();
};
var newsPage18 = class extends news18 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton35();
_testDiv = new testDiv18();
body = new newsPageBody36();
editButton = new backButton36();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar53();
commentsMessages = new commentsMessages18(editComment18, this.comments);
createComment = new createComment18(this.comments);
filler = new filler18();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default18.member, "WRITE");
this.allow(user_group_permission_default18.admin, "WRITE");
this.allow(user_group_permission_default18.visitor, "WRITE");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
this.allow(user_group_permission_default18.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/newsPages.js?disableCache=0056
var newsPages18 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage18();
newsPage = new newsPage18();
newsEdit = new newsEdit18();
width = 1800;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/preloaders/simpleSpinner.js?disableCache=0056
var line18 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask18 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line18();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox18 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask18();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0056
var themaSelectorImage18 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0056
var selectLabel18 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/themeSelector.js?disableCache=0056
var themeSelector18 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage18();
selectLabel = new selectLabel18();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0056
var themeOSSelectorItem18 = class extends themeSelector18 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default19.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0056
var osSelectorList18 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem18("Windows");
themeMacOS = new themeOSSelectorItem18("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default19.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0056
var osLabel18 = class extends label35 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/os.js?disableCache=0056
var os18 = class extends panelRow18 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel18("Os");
osSelector = new osSelectorList18();
spinner = new preloaderBox18();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0056
var themeTintSelector18 = class extends themeSelector18 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default19.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0056
var themeTintSelectors18 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector18("Light");
themeDark = new themeTintSelector18("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default19.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0056
var customLabel35 = class extends label35 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/rows/tint.js?disableCache=0056
var tint18 = class extends panelRow18 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel35("Appearance");
themeTintSelectors = new themeTintSelectors18();
spinner = new preloaderBox18();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/appearance/panel.js?disableCache=0056
var appearancePanel18 = class extends panel18 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os18();
tint = new tint18();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/pages/settings.js?disableCache=0056
var settings18 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header18("Appearance");
appearancePanel = new appearancePanel18();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0056
var Console19 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default19 = new Console19();
// framework/unify/promiseManager.js?disableCache=0056
var promiseManager19 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0056
var shared19 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object56 = new shared19();
var shared_default19 = object56.get();
// framework/cache/platforms/Linux/Pc/Dark/elements/fileUpload.js?disableCache=0056
var fileUpload18 = class extends input18 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager19();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0056
var delay53 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton18 = class extends icon18 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay53(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay53(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.icon.js?disableCache=0056
var fileIcon18 = class extends icon18 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton18();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.upload.js?disableCache=0056
var stream18 = class extends fileUpload18 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon18();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.list.js?disableCache=0056
var fileList18 = class extends panelRow18 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon18();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0056
var removeIcons18 = class extends icon18 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/page.js?disableCache=0056
var page18 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/image.js?disableCache=0056
var icon_id36 = 0;
var image18 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default36.createElement("img");
useCustomElement = true;
id = icon_id36++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0056
var previewImage18 = class extends image18 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0056
var imagePreviewWindow18 = class extends draggable35 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader18();
previewImage = new previewImage18();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0056
var fileChooserFileIcon18 = class extends icon18 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/checkbox.js?disableCache=0056
var checkbox18 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default36.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0056
var file18 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox18();
icon = new fileChooserFileIcon18();
label = new label35();
};
// framework/cache/platforms/Linux/Pc/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0056
var fileChooserFiles18 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file18();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0056
var fileChooserSelectButton18 = class extends button18 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/fileChooser/fileChooser.js?disableCache=0056
var fileChooser18 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles18();
selectButton = new fileChooserSelectButton18();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/fileManager/fileManager.js?disableCache=0056
var fileManager18 = class extends page18 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header18("Upload");
fileupload = new stream18();
filesHeader = new header18("Files");
removeIcons = new removeIcons18();
fileList = new fileList18();
previewWindow = new imagePreviewWindow18();
fileChooser = new fileChooser18();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.move.js?disableCache=0056
var animationBlock120 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel120 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow18 = class extends panelRow18 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel120("Move");
animationBlock = new animationBlock120();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.rotate.js?disableCache=0056
var animationBlock121 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel121 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row103 = class extends panelRow18 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel121("Rotate");
animationBlock = new animationBlock121();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.color.js?disableCache=0056
var animationBlock122 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel122 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row104 = class extends panelRow18 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel122("Background color");
animationBlock = new animationBlock122();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.skewX.js?disableCache=0056
var animationBlock123 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel123 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row105 = class extends panelRow18 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel123("skewX");
animationBlock = new animationBlock123();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0056
var animationBlock124 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel124 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row106 = class extends panelRow18 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel124("Rotate + Move + Background");
animationBlock = new animationBlock124();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.reverse.js?disableCache=0056
var animationBlock125 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton18 = class extends button18 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton18 = class extends button18 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton18 = class extends button18 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton18 = class extends button18 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton18 = class extends button18 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel125 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons35 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton18();
pauseButton = new pauseButton18();
stopButton = new stopButton18();
forwardButton = new forwardButton18();
backwardButton = new backwardButton18();
flexDirection = "column";
};
var row107 = class extends panelRow18 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel125("Reverse");
buttons = new buttons35();
animationBlock = new animationBlock125();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animation.render.js?disableCache=0056
var animationBlock126 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel126 = class extends label35 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row108 = class extends panelRow18 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel126("RenderLoop");
animationBlock = new animationBlock126();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/animations/animations.js?disableCache=0056
var animations18 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow18();
rotateAnimation = new row103();
backgroundColor = new row104();
skewX = new row105();
rotateMoveColor = new row106();
reverse = new row107();
render = new row108();
};
// framework/cache/platforms/Linux/Pc/Dark/demo/examples/grids.js?disableCache=0056
var label36 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a18 = class extends input18 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b19 = class extends input18 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c18 = class extends input18 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d18 = class extends input18 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA18 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label36("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a18();
b = new b19();
c = new c18();
d = new d18();
};
var gridB18 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label36("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a18();
b = new b19();
c = new c18();
d = new d18();
};
var gridExample18 = class extends page18 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA18();
gridB = new gridB18();
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/header/user.userList.header.username.js?disableCache=0056
var userListHeaderUsername18 = class extends gridViewRowColumn18 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0056
var userListHeaderActions18 = class extends gridViewRowColumn18 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default18.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/header/user.userList.header.js?disableCache=0056
var userListHeader18 = class extends extender36(user19, gridViewTableRow18) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername18();
actions = new userListHeaderActions18();
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/user.userList.table.header.js?disableCache=0056
var userListTableHeader18 = class extends gridViewHeader18 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader18();
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/user.userList.table.body.js?disableCache=0056
var userListTableBody18 = class extends extender36(renderCollection20, gridViewTableHeader18) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE18(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default18.visitor, "READ");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/item/user.userList.item.username.js?disableCache=0056
var userListItemTitle18 = class extends extender36(username19, gridViewBodyColumn18) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0056
var deleteButton54 = class extends button18 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default18.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0056
var userListItemActions18 = class extends extender36(gridViewBodyColumn18, gridViewBodyColumn18) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton54();
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/item/user.userList.item.js?disableCache=0056
var userListItem18 = class extends extender36(user19, gridViewRow18) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle18();
actions = new userListItemActions18();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default18.admin, "DELETE");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/user.userList.table.js?disableCache=0056
var userListTable18 = class extends gridView18 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader18();
body = new userListTableBody18(userListItem18, new collection22(user19));
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/search.js?disableCache=0056
var searchBar54 = class extends input18 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/userList/user.userList.page.js?disableCache=0056
var editPage18 = class extends page18 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header18("Users");
search = new searchBar54();
userTable = new userListTable18();
flexDirection = "column";
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.username.js?disableCache=0056
var editUsername18 = class extends extender36(username19, input18) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.username.row.js?disableCache=0056
var usernameRow18 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label35("Username");
username = new editUsername18();
};
// framework/cache/platforms/Linux/Pc/Dark/elements/empty.js?disableCache=0056
var empty18 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/user.edit.button.js?disableCache=0056
var userEditButton18 = class extends button18 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/user.edit.button.row.js?disableCache=0056
var saveButtonRow18 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty18();
userEditButton = new userEditButton18();
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0056
var checkRenderCollection18 = class extends renderCollection20 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default18.admin, "WRITE");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
this.allow(user_group_permission_default18.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.checkbox.js?disableCache=0056
var customCheckbox35 = class extends checkbox18 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0056
var customCheckbox36 = class extends user19 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label35();
checkbox = new customCheckbox35();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0056
var checkboxRow18 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label35("Select users");
renderCollection = new checkRenderCollection18(customCheckbox36, new collection22(user19));
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.select.option.js?disableCache=0056
var customOption18 = class extends extender36(option18, user19) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0056
var customSelect36 = class extends renderCollection20 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default36.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default18.admin, "WRITE");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
this.allow(user_group_permission_default18.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.select.row.js?disableCache=0056
var optionRow18 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label35("Select user");
renderCollection = new customSelect36(customOption18, new collection22(user19));
};
// framework/cache/platforms/Linux/Pc/Dark/user/edit/edit.user.js?disableCache=0056
var editUser18 = class extends extender36(user19, page18) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header18("Edit user");
usernameRow = new usernameRow18();
selectRow = new optionRow18();
checkboxRow = new checkboxRow18();
showSelectedUser = new customSelect36(customOption18, this.selectedUsers);
saveButtonRow = new saveButtonRow18();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default18.admin, "WRITE");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
this.allow(user_group_permission_default18.visitor, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/signup/signup.username.js?disableCache=0056
var signUpUsername18 = class extends extender36(username19, input18) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/inputPassword.js?disableCache=0056
var inputPassword18 = class extends input18 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/signup/signup.password.js?disableCache=0056
var signupPassword18 = class extends inputPassword18 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Linux/Pc/Dark/user/signup/signup.passwordCheck.js?disableCache=0056
var signupPasswordCheck18 = class extends inputPassword18 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0056
var cookieManager19 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default19 = new cookieManager19();
// framework/cache/platforms/Linux/Pc/Dark/user/signup/signup.button.js?disableCache=0056
var signupButton18 = class extends button18 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/signup/signup.customLabel.js?disableCache=0056
var customLabel36 = class extends label35 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Linux/Pc/Dark/user/signup/user.signup.js?disableCache=0056
var signup18 = class extends extender36(user19, page18) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default36.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header18("Signup");
// Children
userLabel = new customLabel36("Username");
username = new signUpUsername18();
passwordLabel = new customLabel36("Password");
password = new signupPassword18();
passwordAgainLabel = new customLabel36("Password again");
passwordAgain = new signupPasswordCheck18();
signUpButton = new signupButton18();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default18.visitor, "PROCESS");
this.allow(user_group_permission_default18.member, "PROCESS");
this.allow(user_group_permission_default18.admin, "PROCESS");
}
};
// framework/cache/platforms/Linux/Pc/Dark/user/signin/signin.username.js?disableCache=0056
var signinUsername18 = class extends extender36(username19, input18) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Linux/Pc/Dark/user/user.password.js?disableCache=0056
var password18 = class extends inputPassword18 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Linux/Pc/Dark/user/signin/signin.password.js?disableCache=0056
var signinPassword18 = class extends password18 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Linux/Pc/Dark/user/signin/signin.button.js?disableCache=0056
var signinFormButton18 = class extends button18 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0056
var unify19 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default19 = new unify19();
// framework/cache/platforms/Linux/Pc/Dark/user/signin/signin.cancel.button.js?disableCache=0056
var cancelButton36 = class extends button18 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Linux/Pc/Dark/user/signin/user.signin.js?disableCache=0056
var tussenObject18 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword18();
width = "100%";
};
var buttons36 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton36();
signinButton = new signinFormButton18();
};
var hint18 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin18 = class extends extender36(user19, page18) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint18();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default36.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header18("Signin");
//userLabel = new label("Username");
username = new signinUsername18();
//passwordLabel = new label("Password");
tussenObject = new tussenObject18();
buttons = new buttons36();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user19();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default19.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user19();
client2.user = visitor62;
client2.user.error = false;
unify_default19.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default19.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default18.visitor, "PROCESS");
this.allow(user_group_permission_default18.member, "PROCESS");
this.allow(user_group_permission_default18.admin, "PROCESS");
this.allow(user_group_permission_default18.member, "READ");
this.allow(user_group_permission_default18.admin, "READ");
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/rightSide/rightSide.js?disableCache=0358
var rightSide18 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages18();
signup = new signup18();
signin = new signin18();
settings = new settings18();
fileManager = new fileManager18();
animations = new animations18();
gridExample = new gridExample18();
userListPage = new editPage18();
editUser = new editUser18();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0358
var documentTool37 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object57 = new documentTool37();
var document_default37 = object57.getDocument();
// framework/unify/math/vector2.js?disableCache=0358
var vector254 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/flexbox.js?disableCache=0358
var flexbox36 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Linux/Pc/Dark/elements/window/frostedGlass.js?disableCache=0358
var frostedGlass36 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Linux/Pc/Dark/elements/window/draggable.js?disableCache=0358
var vector255 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay54(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay54, "delay");
var draggable36 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector255(0, 0);
grabPosition = new vector255(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector255(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay54(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector255(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Linux/Pc/Dark/demo/application.js
var application19 = class extends extender35(frostedGlass36, flexbox36, draggable36) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton18();
leftSide = new leftSide18();
rightSide = new rightSide18();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default37.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector254(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0546
function extender37(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender37, "extender");
// framework/unify/extender.js?disableCache=0265
function extender38(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender38, "extender");
// framework/cache/platforms/Ios/Mobile/Light/elements/button.js?disableCache=0265
var button19 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/icon.js?disableCache=0265
var icon_id37 = 0;
var icon19 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id37++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/minimizeButton.js?disableCache=0546
var minimizeButton19 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.js?disableCache=0265
var menuButton19 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.news.js?disableCache=0265
var newsButton19 = class extends menuButton19 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0265
var settingsButton55 = class extends menuButton19 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0265
var collection23 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0265
var datatype_default20 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0265
var documentTool38 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object58 = new documentTool38();
var document_default38 = object58.getDocument();
// framework/cache/platforms/Ios/Mobile/Light/elements/option.js?disableCache=0265
var option19 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default38.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/group/user.group.js?disableCache=0265
var visitor38 = class extends option19 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member19 = class extends option19 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin37 = class extends option19 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups19 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member19();
admin = new admin37();
visitor = new visitor38();
};
// framework/cache/platforms/Ios/Mobile/Light/user/group/user.group.permission.js?disableCache=0265
var user_group_permission_default19 = new groups19();
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0265
var signinPageButton19 = class extends menuButton19 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0265
var signinButton19 = class extends menuButton19 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0265
var visitor39 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager20 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor39();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default20 = new userManager20();
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0265
var signoutButton19 = class extends menuButton19 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default20.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default19.member, "PROCESS");
this.allow(user_group_permission_default19.admin, "PROCESS");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0265
var fileMangerButton19 = class extends menuButton19 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0265
var settingsButton56 = class extends menuButton19 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.users.js?disableCache=0265
var usersPageButton19 = class extends menuButton19 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default19.member, "PROCESS");
this.allow(user_group_permission_default19.admin, "PROCESS");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0265
var settingsButton57 = class extends menuButton19 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/header.js?disableCache=0265
var header19 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.header.js?disableCache=0265
var menuHeader19 = class extends header19 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/leftSide/leftSide.js?disableCache=0546
var leftSide19 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader19();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton19();
settingsButton = new settingsButton55();
usersButton = new usersPageButton19();
signinButton = new signinPageButton19();
signoutButton = new signoutButton19();
signupButton = new signinButton19();
animationsButton = new settingsButton56();
gridButton = new settingsButton57();
fileManagerButton = new fileMangerButton19();
};
// framework/unify/table.js?disableCache=0265
var table21 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0265
var column19 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/news.title.js?disableCache=0265
var title55 = class extends column19 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/news.body.js?disableCache=0265
var body37 = class extends column19 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/news.price.js?disableCache=0265
var price19 = class extends column19 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default20.REAL;
};
// framework/cache/platforms/Ios/Mobile/Light/user/user.username.js?disableCache=0265
var username20 = class extends column19 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0265
var tools21 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll20(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default20 = new tools21();
// framework/cache/platforms/Ios/Mobile/Light/elements/input.js?disableCache=0265
var input19 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default38.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default38.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default38.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/user.salt.js?disableCache=0265
var salt20 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default20.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Light/user/user.hash.js?disableCache=0265
var hash20 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default20.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Light/user/user.js?disableCache=0265
var user20 = class _user extends table21 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username20();
salt = new salt20();
hash = new hash20();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups19();
selectedUsers = new collection23(_user);
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/comment.body.js?disableCache=0265
var body38 = class extends column19 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/comment.title.js?disableCache=0265
var title56 = class extends column19 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/comment.js?disableCache=0265
var comment20 = class extends table21 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user20();
title = new title56();
body = new body38();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/news.js?disableCache=0265
var news19 = class extends table21 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title55();
body = new body37();
price = new price19();
comments = new collection23(comment20);
};
// framework/cache/platforms/Ios/Mobile/Light/elements/tableCell.js?disableCache=0265
var tableCell19 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0265
var sortBy19 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.header.row.column.js?disableCache=0265
var gridViewRowColumn19 = class extends tableCell19 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy19();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/header/news.list.header.body.js?disableCache=0265
var newsListHeaderBody19 = class extends gridViewRowColumn19 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/header/news.list.header.title.js?disableCache=0265
var newsListHeaderTitle19 = class extends gridViewRowColumn19 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/header/news.list.header.price.js?disableCache=0265
var newsListHeaderPrice19 = class extends gridViewRowColumn19 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/header/news.list.header.actions.js?disableCache=0265
var newsListHeaderActions19 = class extends gridViewRowColumn19 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default19.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.header.row.js?disableCache=0265
var gridViewTableRow19 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/header/news.list.header.js?disableCache=0265
var newsListHeader19 = class extends extender38(news19, gridViewTableRow19) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody19();
title = new newsListHeaderTitle19();
price = new newsListHeaderPrice19();
actions = new newsListHeaderActions19();
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.header.js?disableCache=0265
var gridViewHeader19 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/news.list.table.header.js?disableCache=0265
var newsListTableHeader19 = class extends gridViewHeader19 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader19();
};
// framework/unify/renderCollection.js?disableCache=0265
var renderCollection21 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.body.js?disableCache=0265
var gridViewTableHeader19 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0265
function OR19(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR19, "OR");
// framework/unify/sql/LIKE.js?disableCache=0265
function LIKE19(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE19, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0265
function GREATER_OR_EQUAL19(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL19, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0265
function SMALLER_OR_EQUAL19(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL19, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Ios/Mobile/Light/demo/list/news.list.table.body.js?disableCache=0265
var newsListTableBody19 = class extends extender38(renderCollection21, gridViewTableHeader19) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR19(OR19(LIKE19(filter.title, searchTerm), LIKE19(filter.comments.body, searchTerm)), LIKE19(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL19(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL19(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default19.visitor, "READ");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.body.row.column.js?disableCache=0265
var gridViewBodyColumn19 = class extends tableCell19 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/item/news.list.item.body.js?disableCache=0265
var newsListItemBody19 = class extends extender38(body37, gridViewBodyColumn19) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/item/news.list.item.title.js?disableCache=0265
var newsListItemTitle19 = class extends extender38(title55, gridViewBodyColumn19) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/item/news.list.item.price.js?disableCache=0265
var newsListItemPrice19 = class extends extender38(price19, gridViewBodyColumn19) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0265
var deleteButton55 = class extends button19 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default19.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/item/news.list.item.actions.js?disableCache=0265
var newsListItemActions19 = class extends extender38(gridViewBodyColumn19, gridViewBodyColumn19) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton55();
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.body.row.js?disableCache=0265
var gridViewRow19 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/item/news.list.item.js?disableCache=0265
var newsListItem19 = class extends extender38(news19, gridViewRow19) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody19();
title = new newsListItemTitle19();
price = new newsListItemPrice19();
actions = new newsListItemActions19();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default19.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/gridView/gridView.js?disableCache=0265
var gridView19 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/list/news.list.table.js?disableCache=0265
var newsListTable19 = class extends gridView19 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader19();
body = new newsListTableBody19(newsListItem19, new collection23(news19));
};
// framework/cache/platforms/Ios/Mobile/Light/demo/edit/news.edit.title.js?disableCache=0265
var newsEditTitle19 = class extends extender38(input19, title55) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Ios/Mobile/Light/elements/textarea.js?disableCache=0265
var textarea19 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default38.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/edit/news.edit.body.js?disableCache=0265
var newsPageBody37 = class extends extender38(body37, textarea19) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/edit/news.edit.button.js?disableCache=0265
var editButton37 = class extends button19 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/edit/news.edit.price.js?disableCache=0265
var newsPagePrice19 = class extends extender38(price19, input19) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/label.js?disableCache=0265
var label37 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/label/left.js?disableCache=0265
var leftLabel19 = class extends label37 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Ios/Mobile/Light/elements/panel.js?disableCache=0265
var panel19 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Ios/Mobile/Light/elements/window/draggable.js?disableCache=0265
var vector256 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay55(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay55, "delay");
var draggable37 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector256(0, 0);
grabPosition = new vector256(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector256(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay55(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector256(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/panel/row.js?disableCache=0265
var panelRow19 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/window/header.js?disableCache=0265
var maximizeButton19 = class extends icon19 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton19 = class extends icon19 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl19 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton19();
maximizeButton = new maximizeButton19();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title57 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl19 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader19 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl19();
title = new title57();
rightControl = new rightControl19();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/edit/news.edit.js?disableCache=0265
var newsBodyRow19 = class extends panelRow19 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel19("Message");
body = new newsPageBody37();
};
var newsTitleRow19 = class extends panelRow19 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel19("Title");
title = new newsEditTitle19();
};
var newsPriceRow19 = class extends panelRow19 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel19("Price");
price = new newsPagePrice19();
};
var cancelButton37 = class extends button19 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow19 = class extends panelRow19 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton37();
newsEditbutton = new editButton37();
};
var newsEdit19 = class extends extender38(news19, panel19, draggable37) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader19("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow19();
newsPriceRow = new newsPriceRow19();
newsBodyRow = new newsBodyRow19();
newsButtonRow = new newsButtonRow19();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
this.allow(user_group_permission_default19.visitor, "READ");
this.allow(user_group_permission_default19.member, "WRITE");
this.allow(user_group_permission_default19.admin, "WRITE");
this.allow(user_group_permission_default19.visitor, "WRITE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsDialogButton.js?disableCache=0265
var newsDialogButton19 = class extends button19 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/search.input.js?disableCache=0265
var searchBar55 = class extends input19 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/select.js?disableCache=0265
var select19 = class extends renderCollection21 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default38.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default19.admin, "READ");
this.allow(user_group_permission_default19.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default38.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/search.select.js?disableCache=0265
var customSelect37 = class extends select19 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/search.widget.js?disableCache=0265
var searchWidget19 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar55();
select = new customSelect37();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0265
var paginationItem19 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsItemPage.pagination.js?disableCache=0265
var pagination19 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem19();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem19();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem19();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsItemPage.limit.js?disableCache=0265
var limit19 = class extends select19 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0265
var tableControl19 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label37("Select page:");
pagination = new pagination19();
limitLabel = new label37("Select items per page:");
limit = new limit19();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsItemPage.js?disableCache=0265
var testbutton19 = class extends button19 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage19 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header19("News Items");
searchWidget = new searchWidget19();
newsListTable = new newsListTable19();
tableControl = new tableControl19();
createNews = new newsEdit19();
testbutton = new testbutton19();
newsDialogButton = new newsDialogButton19();
};
// framework/cache/platforms/Ios/Mobile/Light/elements/flexbox.js?disableCache=0265
var flexbox37 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/page/news.page.title.js?disableCache=0265
var newsPageTitle19 = class extends extender38(title55, flexbox37) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/page/news.page.body.js?disableCache=0265
var newsPageBody38 = class extends extender38(flexbox37, body37) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/comments.messages.js?disableCache=0265
var commentsMessages19 = class extends renderCollection21 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR19(LIKE19(filter.body, this.value), LIKE19(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default19.visitor, "READ");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.saveButton.js?disableCache=0265
var saveEditButton19 = class extends button19 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.edit.title.js?disableCache=0265
var commentEditTitle37 = class extends title56 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.edit.body.js?disableCache=0265
var commentEditBody37 = class extends extender38(body38, flexbox37) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default38.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.userLabel.js?disableCache=0265
var userLabel37 = class extends label37 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0265
var deleteButton56 = class extends button19 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.editButton.js?disableCache=0265
var editButton38 = class extends button19 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.information.js?disableCache=0265
var information19 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton56();
_editButton = new editButton38();
_userLabel = new userLabel37();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/edit/comment.edit.js?disableCache=0265
var editComment19 = class extends comment20 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information19();
body = new commentEditBody37();
title = new commentEditTitle37();
saveButton = new saveEditButton19();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/create/comment.saveButton.js?disableCache=0265
var saveCommentButton19 = class extends button19 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/create/comment.create.body.js?disableCache=0265
var commentEditBody38 = class extends extender38(body38, textarea19) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/comment/create/comment.create.js?disableCache=0265
var createComment19 = class extends comment20 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody38();
saveButton = new saveCommentButton19();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default19.member, "WRITE");
this.allow(user_group_permission_default19.admin, "WRITE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/page/news.page.backButton.js?disableCache=0265
var backButton37 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/page/news.page.edit.button.js?disableCache=0265
var backButton38 = class extends button19 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/filler.js?disableCache=0265
var filler19 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/page/search.comments.js?disableCache=0265
var searchBar56 = class extends input19 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/page/news.page.js?disableCache=0265
var testDiv19 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle19();
};
var newsPage19 = class extends news19 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton37();
_testDiv = new testDiv19();
body = new newsPageBody38();
editButton = new backButton38();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar56();
commentsMessages = new commentsMessages19(editComment19, this.comments);
createComment = new createComment19(this.comments);
filler = new filler19();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default19.member, "WRITE");
this.allow(user_group_permission_default19.admin, "WRITE");
this.allow(user_group_permission_default19.visitor, "WRITE");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
this.allow(user_group_permission_default19.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/newsPages.js?disableCache=0265
var newsPages19 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage19();
newsPage = new newsPage19();
newsEdit = new newsEdit19();
width = 1800;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/preloaders/simpleSpinner.js?disableCache=0265
var line19 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask19 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line19();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox19 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask19();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0265
var themaSelectorImage19 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0265
var selectLabel19 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/themeSelector.js?disableCache=0265
var themeSelector19 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage19();
selectLabel = new selectLabel19();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0265
var themeOSSelectorItem19 = class extends themeSelector19 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default20.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0265
var osSelectorList19 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem19("Windows");
themeMacOS = new themeOSSelectorItem19("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default20.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/os.label.js?disableCache=0265
var osLabel19 = class extends label37 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/os.js?disableCache=0265
var os19 = class extends panelRow19 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel19("Os");
osSelector = new osSelectorList19();
spinner = new preloaderBox19();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0265
var themeTintSelector19 = class extends themeSelector19 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default20.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0265
var themeTintSelectors19 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector19("Light");
themeDark = new themeTintSelector19("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default20.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0265
var customLabel37 = class extends label37 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/rows/tint.js?disableCache=0265
var tint19 = class extends panelRow19 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel37("Appearance");
themeTintSelectors = new themeTintSelectors19();
spinner = new preloaderBox19();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/appearance/panel.js?disableCache=0265
var appearancePanel19 = class extends panel19 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os19();
tint = new tint19();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/pages/settings.js?disableCache=0265
var settings19 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header19("Appearance");
appearancePanel = new appearancePanel19();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0265
var Console20 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default20 = new Console20();
// framework/unify/promiseManager.js?disableCache=0265
var promiseManager20 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0265
var shared20 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object59 = new shared20();
var shared_default20 = object59.get();
// framework/cache/platforms/Ios/Mobile/Light/elements/fileUpload.js?disableCache=0265
var fileUpload19 = class extends input19 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager20();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0265
var delay56 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton19 = class extends icon19 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay56(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay56(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.icon.js?disableCache=0265
var fileIcon19 = class extends icon19 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton19();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.upload.js?disableCache=0265
var stream19 = class extends fileUpload19 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon19();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.list.js?disableCache=0265
var fileList19 = class extends panelRow19 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon19();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0265
var removeIcons19 = class extends icon19 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/page.js?disableCache=0265
var page19 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/image.js?disableCache=0265
var icon_id38 = 0;
var image19 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default38.createElement("img");
useCustomElement = true;
id = icon_id38++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0265
var previewImage19 = class extends image19 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0265
var imagePreviewWindow19 = class extends draggable37 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader19();
previewImage = new previewImage19();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0265
var fileChooserFileIcon19 = class extends icon19 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/checkbox.js?disableCache=0265
var checkbox19 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default38.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/fileChooser/fileChooser.file.js?disableCache=0265
var file19 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox19();
icon = new fileChooserFileIcon19();
label = new label37();
};
// framework/cache/platforms/Ios/Mobile/Light/elements/fileChooser/fileChooser.files.js?disableCache=0265
var fileChooserFiles19 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file19();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0265
var fileChooserSelectButton19 = class extends button19 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/fileChooser/fileChooser.js?disableCache=0265
var fileChooser19 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles19();
selectButton = new fileChooserSelectButton19();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/fileManager/fileManager.js?disableCache=0265
var fileManager19 = class extends page19 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header19("Upload");
fileupload = new stream19();
filesHeader = new header19("Files");
removeIcons = new removeIcons19();
fileList = new fileList19();
previewWindow = new imagePreviewWindow19();
fileChooser = new fileChooser19();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.move.js?disableCache=0265
var animationBlock127 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel127 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow19 = class extends panelRow19 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel127("Move");
animationBlock = new animationBlock127();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.rotate.js?disableCache=0265
var animationBlock128 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel128 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row109 = class extends panelRow19 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel128("Rotate");
animationBlock = new animationBlock128();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.color.js?disableCache=0265
var animationBlock129 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel129 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row110 = class extends panelRow19 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel129("Background color");
animationBlock = new animationBlock129();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.skewX.js?disableCache=0265
var animationBlock130 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel130 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row111 = class extends panelRow19 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel130("skewX");
animationBlock = new animationBlock130();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0265
var animationBlock131 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel131 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row112 = class extends panelRow19 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel131("Rotate + Move + Background");
animationBlock = new animationBlock131();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.reverse.js?disableCache=0265
var animationBlock132 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton19 = class extends button19 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton19 = class extends button19 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton19 = class extends button19 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton19 = class extends button19 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton19 = class extends button19 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel132 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons37 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton19();
pauseButton = new pauseButton19();
stopButton = new stopButton19();
forwardButton = new forwardButton19();
backwardButton = new backwardButton19();
flexDirection = "column";
};
var row113 = class extends panelRow19 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel132("Reverse");
buttons = new buttons37();
animationBlock = new animationBlock132();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animation.render.js?disableCache=0265
var animationBlock133 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel133 = class extends label37 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row114 = class extends panelRow19 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel133("RenderLoop");
animationBlock = new animationBlock133();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/animations/animations.js?disableCache=0265
var animations19 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow19();
rotateAnimation = new row109();
backgroundColor = new row110();
skewX = new row111();
rotateMoveColor = new row112();
reverse = new row113();
render = new row114();
};
// framework/cache/platforms/Ios/Mobile/Light/demo/examples/grids.js?disableCache=0265
var label38 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a19 = class extends input19 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b20 = class extends input19 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c19 = class extends input19 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d19 = class extends input19 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA19 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label38("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a19();
b = new b20();
c = new c19();
d = new d19();
};
var gridB19 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label38("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a19();
b = new b20();
c = new c19();
d = new d19();
};
var gridExample19 = class extends page19 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA19();
gridB = new gridB19();
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/header/user.userList.header.username.js?disableCache=0265
var userListHeaderUsername19 = class extends gridViewRowColumn19 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/header/user.userList.header.actions.js?disableCache=0265
var userListHeaderActions19 = class extends gridViewRowColumn19 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default19.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/header/user.userList.header.js?disableCache=0265
var userListHeader19 = class extends extender38(user20, gridViewTableRow19) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername19();
actions = new userListHeaderActions19();
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/user.userList.table.header.js?disableCache=0265
var userListTableHeader19 = class extends gridViewHeader19 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader19();
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/user.userList.table.body.js?disableCache=0265
var userListTableBody19 = class extends extender38(renderCollection21, gridViewTableHeader19) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE19(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default19.visitor, "READ");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/item/user.userList.item.username.js?disableCache=0265
var userListItemTitle19 = class extends extender38(username20, gridViewBodyColumn19) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0265
var deleteButton57 = class extends button19 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default19.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/item/user.userList.item.actions.js?disableCache=0265
var userListItemActions19 = class extends extender38(gridViewBodyColumn19, gridViewBodyColumn19) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton57();
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/item/user.userList.item.js?disableCache=0265
var userListItem19 = class extends extender38(user20, gridViewRow19) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle19();
actions = new userListItemActions19();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default19.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/user.userList.table.js?disableCache=0265
var userListTable19 = class extends gridView19 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader19();
body = new userListTableBody19(userListItem19, new collection23(user20));
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/search.js?disableCache=0265
var searchBar57 = class extends input19 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/userList/user.userList.page.js?disableCache=0265
var editPage19 = class extends page19 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header19("Users");
search = new searchBar57();
userTable = new userListTable19();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.username.js?disableCache=0265
var editUsername19 = class extends extender38(username20, input19) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.username.row.js?disableCache=0265
var usernameRow19 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label37("Username");
username = new editUsername19();
};
// framework/cache/platforms/Ios/Mobile/Light/elements/empty.js?disableCache=0265
var empty19 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/user.edit.button.js?disableCache=0265
var userEditButton19 = class extends button19 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/user.edit.button.row.js?disableCache=0265
var saveButtonRow19 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty19();
userEditButton = new userEditButton19();
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0265
var checkRenderCollection19 = class extends renderCollection21 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default19.admin, "WRITE");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
this.allow(user_group_permission_default19.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.checkbox.js?disableCache=0265
var customCheckbox37 = class extends checkbox19 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0265
var customCheckbox38 = class extends user20 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label37();
checkbox = new customCheckbox37();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.checkbox.row.js?disableCache=0265
var checkboxRow19 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label37("Select users");
renderCollection = new checkRenderCollection19(customCheckbox38, new collection23(user20));
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.select.option.js?disableCache=0265
var customOption19 = class extends extender38(option19, user20) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0265
var customSelect38 = class extends renderCollection21 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default38.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default19.admin, "WRITE");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
this.allow(user_group_permission_default19.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.select.row.js?disableCache=0265
var optionRow19 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label37("Select user");
renderCollection = new customSelect38(customOption19, new collection23(user20));
};
// framework/cache/platforms/Ios/Mobile/Light/user/edit/edit.user.js?disableCache=0265
var editUser19 = class extends extender38(user20, page19) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header19("Edit user");
usernameRow = new usernameRow19();
selectRow = new optionRow19();
checkboxRow = new checkboxRow19();
showSelectedUser = new customSelect38(customOption19, this.selectedUsers);
saveButtonRow = new saveButtonRow19();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default19.admin, "WRITE");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
this.allow(user_group_permission_default19.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/signup/signup.username.js?disableCache=0265
var signUpUsername19 = class extends extender38(username20, input19) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/inputPassword.js?disableCache=0265
var inputPassword19 = class extends input19 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/signup/signup.password.js?disableCache=0265
var signupPassword19 = class extends inputPassword19 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Ios/Mobile/Light/user/signup/signup.passwordCheck.js?disableCache=0265
var signupPasswordCheck19 = class extends inputPassword19 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0265
var cookieManager20 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default20 = new cookieManager20();
// framework/cache/platforms/Ios/Mobile/Light/user/signup/signup.button.js?disableCache=0265
var signupButton19 = class extends button19 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/signup/signup.customLabel.js?disableCache=0265
var customLabel38 = class extends label37 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Ios/Mobile/Light/user/signup/user.signup.js?disableCache=0265
var signup19 = class extends extender38(user20, page19) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default38.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header19("Signup");
// Children
userLabel = new customLabel38("Username");
username = new signUpUsername19();
passwordLabel = new customLabel38("Password");
password = new signupPassword19();
passwordAgainLabel = new customLabel38("Password again");
passwordAgain = new signupPasswordCheck19();
signUpButton = new signupButton19();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default19.visitor, "PROCESS");
this.allow(user_group_permission_default19.member, "PROCESS");
this.allow(user_group_permission_default19.admin, "PROCESS");
}
};
// framework/cache/platforms/Ios/Mobile/Light/user/signin/signin.username.js?disableCache=0265
var signinUsername19 = class extends extender38(username20, input19) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Ios/Mobile/Light/user/user.password.js?disableCache=0265
var password19 = class extends inputPassword19 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Ios/Mobile/Light/user/signin/signin.password.js?disableCache=0265
var signinPassword19 = class extends password19 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Ios/Mobile/Light/user/signin/signin.button.js?disableCache=0265
var signinFormButton19 = class extends button19 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0265
var unify20 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default20 = new unify20();
// framework/cache/platforms/Ios/Mobile/Light/user/signin/signin.cancel.button.js?disableCache=0265
var cancelButton38 = class extends button19 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Light/user/signin/user.signin.js?disableCache=0265
var tussenObject19 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword19();
width = "100%";
};
var buttons38 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton38();
signinButton = new signinFormButton19();
};
var hint19 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin19 = class extends extender38(user20, page19) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint19();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default38.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header19("Signin");
//userLabel = new label("Username");
username = new signinUsername19();
//passwordLabel = new label("Password");
tussenObject = new tussenObject19();
buttons = new buttons38();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user20();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default20.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user20();
client2.user = visitor62;
client2.user.error = false;
unify_default20.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default20.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default19.visitor, "PROCESS");
this.allow(user_group_permission_default19.member, "PROCESS");
this.allow(user_group_permission_default19.admin, "PROCESS");
this.allow(user_group_permission_default19.member, "READ");
this.allow(user_group_permission_default19.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/rightSide/rightSide.js?disableCache=0546
var rightSide19 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages19();
signup = new signup19();
signin = new signin19();
settings = new settings19();
fileManager = new fileManager19();
animations = new animations19();
gridExample = new gridExample19();
userListPage = new editPage19();
editUser = new editUser19();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0546
var documentTool39 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object60 = new documentTool39();
var document_default39 = object60.getDocument();
// framework/unify/math/vector2.js?disableCache=0546
var vector257 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/flexbox.js?disableCache=0546
var flexbox38 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Mobile/Light/elements/window/frostedGlass.js?disableCache=0546
var frostedGlass38 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Ios/Mobile/Light/elements/window/draggable.js?disableCache=0546
var vector258 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay57(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay57, "delay");
var draggable38 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector258(0, 0);
grabPosition = new vector258(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector258(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay57(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector258(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Mobile/Light/demo/application.js
var application20 = class extends extender37(frostedGlass38, flexbox38, draggable38) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton19();
leftSide = new leftSide19();
rightSide = new rightSide19();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default39.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector257(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0883
function extender39(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender39, "extender");
// framework/unify/extender.js?disableCache=0556
function extender40(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender40, "extender");
// framework/cache/platforms/Ios/Mobile/Dark/elements/button.js?disableCache=0556
var button20 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/icon.js?disableCache=0556
var icon_id39 = 0;
var icon20 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id39++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/minimizeButton.js?disableCache=0883
var minimizeButton20 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.js?disableCache=0556
var menuButton20 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0556
var newsButton20 = class extends menuButton20 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0556
var settingsButton58 = class extends menuButton20 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0556
var collection24 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0556
var datatype_default21 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0556
var documentTool40 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object61 = new documentTool40();
var document_default40 = object61.getDocument();
// framework/cache/platforms/Ios/Mobile/Dark/elements/option.js?disableCache=0556
var option20 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default40.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/group/user.group.js?disableCache=0556
var visitor40 = class extends option20 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member20 = class extends option20 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin39 = class extends option20 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups20 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member20();
admin = new admin39();
visitor = new visitor40();
};
// framework/cache/platforms/Ios/Mobile/Dark/user/group/user.group.permission.js?disableCache=0556
var user_group_permission_default20 = new groups20();
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0556
var signinPageButton20 = class extends menuButton20 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0556
var signinButton20 = class extends menuButton20 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0556
var visitor41 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager21 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor41();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default21 = new userManager21();
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0556
var signoutButton20 = class extends menuButton20 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default21.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default20.member, "PROCESS");
this.allow(user_group_permission_default20.admin, "PROCESS");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0556
var fileMangerButton20 = class extends menuButton20 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0556
var settingsButton59 = class extends menuButton20 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0556
var usersPageButton20 = class extends menuButton20 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default20.member, "PROCESS");
this.allow(user_group_permission_default20.admin, "PROCESS");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0556
var settingsButton60 = class extends menuButton20 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/header.js?disableCache=0556
var header20 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.header.js?disableCache=0556
var menuHeader20 = class extends header20 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/leftSide/leftSide.js?disableCache=0883
var leftSide20 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader20();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton20();
settingsButton = new settingsButton58();
usersButton = new usersPageButton20();
signinButton = new signinPageButton20();
signoutButton = new signoutButton20();
signupButton = new signinButton20();
animationsButton = new settingsButton59();
gridButton = new settingsButton60();
fileManagerButton = new fileMangerButton20();
};
// framework/unify/table.js?disableCache=0556
var table22 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0556
var column20 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/news.title.js?disableCache=0556
var title58 = class extends column20 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/news.body.js?disableCache=0556
var body39 = class extends column20 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/news.price.js?disableCache=0556
var price20 = class extends column20 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default21.REAL;
};
// framework/cache/platforms/Ios/Mobile/Dark/user/user.username.js?disableCache=0556
var username21 = class extends column20 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0556
var tools22 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll21(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default21 = new tools22();
// framework/cache/platforms/Ios/Mobile/Dark/elements/input.js?disableCache=0556
var input20 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default40.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default40.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default40.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/user.salt.js?disableCache=0556
var salt21 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default21.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/user.hash.js?disableCache=0556
var hash21 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default21.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/user.js?disableCache=0556
var user21 = class _user extends table22 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username21();
salt = new salt21();
hash = new hash21();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups20();
selectedUsers = new collection24(_user);
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/comment.body.js?disableCache=0556
var body40 = class extends column20 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/comment.title.js?disableCache=0556
var title59 = class extends column20 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/comment.js?disableCache=0556
var comment21 = class extends table22 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user21();
title = new title59();
body = new body40();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/news.js?disableCache=0556
var news20 = class extends table22 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title58();
body = new body39();
price = new price20();
comments = new collection24(comment21);
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/tableCell.js?disableCache=0556
var tableCell20 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0556
var sortBy20 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0556
var gridViewRowColumn20 = class extends tableCell20 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy20();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/header/news.list.header.body.js?disableCache=0556
var newsListHeaderBody20 = class extends gridViewRowColumn20 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/header/news.list.header.title.js?disableCache=0556
var newsListHeaderTitle20 = class extends gridViewRowColumn20 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/header/news.list.header.price.js?disableCache=0556
var newsListHeaderPrice20 = class extends gridViewRowColumn20 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/header/news.list.header.actions.js?disableCache=0556
var newsListHeaderActions20 = class extends gridViewRowColumn20 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default20.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.header.row.js?disableCache=0556
var gridViewTableRow20 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/header/news.list.header.js?disableCache=0556
var newsListHeader20 = class extends extender40(news20, gridViewTableRow20) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody20();
title = new newsListHeaderTitle20();
price = new newsListHeaderPrice20();
actions = new newsListHeaderActions20();
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.header.js?disableCache=0556
var gridViewHeader20 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/news.list.table.header.js?disableCache=0556
var newsListTableHeader20 = class extends gridViewHeader20 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader20();
};
// framework/unify/renderCollection.js?disableCache=0556
var renderCollection22 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.body.js?disableCache=0556
var gridViewTableHeader20 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0556
function OR20(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR20, "OR");
// framework/unify/sql/LIKE.js?disableCache=0556
function LIKE20(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE20, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0556
function GREATER_OR_EQUAL20(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL20, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0556
function SMALLER_OR_EQUAL20(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL20, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/news.list.table.body.js?disableCache=0556
var newsListTableBody20 = class extends extender40(renderCollection22, gridViewTableHeader20) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR20(OR20(LIKE20(filter.title, searchTerm), LIKE20(filter.comments.body, searchTerm)), LIKE20(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL20(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL20(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default20.visitor, "READ");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0556
var gridViewBodyColumn20 = class extends tableCell20 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/item/news.list.item.body.js?disableCache=0556
var newsListItemBody20 = class extends extender40(body39, gridViewBodyColumn20) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/item/news.list.item.title.js?disableCache=0556
var newsListItemTitle20 = class extends extender40(title58, gridViewBodyColumn20) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/item/news.list.item.price.js?disableCache=0556
var newsListItemPrice20 = class extends extender40(price20, gridViewBodyColumn20) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0556
var deleteButton58 = class extends button20 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default20.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/item/news.list.item.actions.js?disableCache=0556
var newsListItemActions20 = class extends extender40(gridViewBodyColumn20, gridViewBodyColumn20) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton58();
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.body.row.js?disableCache=0556
var gridViewRow20 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/item/news.list.item.js?disableCache=0556
var newsListItem20 = class extends extender40(news20, gridViewRow20) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody20();
title = new newsListItemTitle20();
price = new newsListItemPrice20();
actions = new newsListItemActions20();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default20.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/gridView/gridView.js?disableCache=0556
var gridView20 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/list/news.list.table.js?disableCache=0556
var newsListTable20 = class extends gridView20 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader20();
body = new newsListTableBody20(newsListItem20, new collection24(news20));
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/edit/news.edit.title.js?disableCache=0556
var newsEditTitle20 = class extends extender40(input20, title58) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/textarea.js?disableCache=0556
var textarea20 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default40.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/edit/news.edit.body.js?disableCache=0556
var newsPageBody39 = class extends extender40(body39, textarea20) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/edit/news.edit.button.js?disableCache=0556
var editButton39 = class extends button20 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/edit/news.edit.price.js?disableCache=0556
var newsPagePrice20 = class extends extender40(price20, input20) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/label.js?disableCache=0556
var label39 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/label/left.js?disableCache=0556
var leftLabel20 = class extends label39 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/panel.js?disableCache=0556
var panel20 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/window/draggable.js?disableCache=0556
var vector259 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay58(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay58, "delay");
var draggable39 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector259(0, 0);
grabPosition = new vector259(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector259(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay58(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector259(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/panel/row.js?disableCache=0556
var panelRow20 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/window/header.js?disableCache=0556
var maximizeButton20 = class extends icon20 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton20 = class extends icon20 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl20 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton20();
maximizeButton = new maximizeButton20();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title60 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl20 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader20 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl20();
title = new title60();
rightControl = new rightControl20();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/edit/news.edit.js?disableCache=0556
var newsBodyRow20 = class extends panelRow20 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel20("Message");
body = new newsPageBody39();
};
var newsTitleRow20 = class extends panelRow20 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel20("Title");
title = new newsEditTitle20();
};
var newsPriceRow20 = class extends panelRow20 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel20("Price");
price = new newsPagePrice20();
};
var cancelButton39 = class extends button20 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow20 = class extends panelRow20 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton39();
newsEditbutton = new editButton39();
};
var newsEdit20 = class extends extender40(news20, panel20, draggable39) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader20("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow20();
newsPriceRow = new newsPriceRow20();
newsBodyRow = new newsBodyRow20();
newsButtonRow = new newsButtonRow20();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
this.allow(user_group_permission_default20.visitor, "READ");
this.allow(user_group_permission_default20.member, "WRITE");
this.allow(user_group_permission_default20.admin, "WRITE");
this.allow(user_group_permission_default20.visitor, "WRITE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsDialogButton.js?disableCache=0556
var newsDialogButton20 = class extends button20 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/search.input.js?disableCache=0556
var searchBar58 = class extends input20 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/select.js?disableCache=0556
var select20 = class extends renderCollection22 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default40.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default20.admin, "READ");
this.allow(user_group_permission_default20.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default40.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/search.select.js?disableCache=0556
var customSelect39 = class extends select20 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/search.widget.js?disableCache=0556
var searchWidget20 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar58();
select = new customSelect39();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0556
var paginationItem20 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0556
var pagination20 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem20();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem20();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem20();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsItemPage.limit.js?disableCache=0556
var limit20 = class extends select20 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0556
var tableControl20 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label39("Select page:");
pagination = new pagination20();
limitLabel = new label39("Select items per page:");
limit = new limit20();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsItemPage.js?disableCache=0556
var testbutton20 = class extends button20 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage20 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header20("News Items");
searchWidget = new searchWidget20();
newsListTable = new newsListTable20();
tableControl = new tableControl20();
createNews = new newsEdit20();
testbutton = new testbutton20();
newsDialogButton = new newsDialogButton20();
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/flexbox.js?disableCache=0556
var flexbox39 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/page/news.page.title.js?disableCache=0556
var newsPageTitle20 = class extends extender40(title58, flexbox39) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/page/news.page.body.js?disableCache=0556
var newsPageBody40 = class extends extender40(flexbox39, body39) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/comments.messages.js?disableCache=0556
var commentsMessages20 = class extends renderCollection22 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR20(LIKE20(filter.body, this.value), LIKE20(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default20.visitor, "READ");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0556
var saveEditButton20 = class extends button20 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0556
var commentEditTitle39 = class extends title59 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0556
var commentEditBody39 = class extends extender40(body40, flexbox39) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default40.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0556
var userLabel39 = class extends label39 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0556
var deleteButton59 = class extends button20 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.editButton.js?disableCache=0556
var editButton40 = class extends button20 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.information.js?disableCache=0556
var information20 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton59();
_editButton = new editButton40();
_userLabel = new userLabel39();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/edit/comment.edit.js?disableCache=0556
var editComment20 = class extends comment21 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information20();
body = new commentEditBody39();
title = new commentEditTitle39();
saveButton = new saveEditButton20();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/create/comment.saveButton.js?disableCache=0556
var saveCommentButton20 = class extends button20 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/create/comment.create.body.js?disableCache=0556
var commentEditBody40 = class extends extender40(body40, textarea20) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/comment/create/comment.create.js?disableCache=0556
var createComment20 = class extends comment21 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody40();
saveButton = new saveCommentButton20();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default20.member, "WRITE");
this.allow(user_group_permission_default20.admin, "WRITE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/page/news.page.backButton.js?disableCache=0556
var backButton39 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/page/news.page.edit.button.js?disableCache=0556
var backButton40 = class extends button20 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/filler.js?disableCache=0556
var filler20 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/page/search.comments.js?disableCache=0556
var searchBar59 = class extends input20 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/page/news.page.js?disableCache=0556
var testDiv20 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle20();
};
var newsPage20 = class extends news20 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton39();
_testDiv = new testDiv20();
body = new newsPageBody40();
editButton = new backButton40();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar59();
commentsMessages = new commentsMessages20(editComment20, this.comments);
createComment = new createComment20(this.comments);
filler = new filler20();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default20.member, "WRITE");
this.allow(user_group_permission_default20.admin, "WRITE");
this.allow(user_group_permission_default20.visitor, "WRITE");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
this.allow(user_group_permission_default20.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/newsPages.js?disableCache=0556
var newsPages20 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage20();
newsPage = new newsPage20();
newsEdit = new newsEdit20();
width = 1800;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/preloaders/simpleSpinner.js?disableCache=0556
var line20 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask20 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line20();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox20 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask20();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0556
var themaSelectorImage20 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0556
var selectLabel20 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/themeSelector.js?disableCache=0556
var themeSelector20 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage20();
selectLabel = new selectLabel20();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0556
var themeOSSelectorItem20 = class extends themeSelector20 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default21.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0556
var osSelectorList20 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem20("Windows");
themeMacOS = new themeOSSelectorItem20("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default21.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0556
var osLabel20 = class extends label39 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/os.js?disableCache=0556
var os20 = class extends panelRow20 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel20("Os");
osSelector = new osSelectorList20();
spinner = new preloaderBox20();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0556
var themeTintSelector20 = class extends themeSelector20 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default21.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0556
var themeTintSelectors20 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector20("Light");
themeDark = new themeTintSelector20("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default21.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0556
var customLabel39 = class extends label39 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/rows/tint.js?disableCache=0556
var tint20 = class extends panelRow20 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel39("Appearance");
themeTintSelectors = new themeTintSelectors20();
spinner = new preloaderBox20();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/appearance/panel.js?disableCache=0556
var appearancePanel20 = class extends panel20 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os20();
tint = new tint20();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/pages/settings.js?disableCache=0556
var settings20 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header20("Appearance");
appearancePanel = new appearancePanel20();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0556
var Console21 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default21 = new Console21();
// framework/unify/promiseManager.js?disableCache=0556
var promiseManager21 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0556
var shared21 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object62 = new shared21();
var shared_default21 = object62.get();
// framework/cache/platforms/Ios/Mobile/Dark/elements/fileUpload.js?disableCache=0556
var fileUpload20 = class extends input20 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager21();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0556
var delay59 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton20 = class extends icon20 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay59(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay59(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.icon.js?disableCache=0556
var fileIcon20 = class extends icon20 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton20();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.upload.js?disableCache=0556
var stream20 = class extends fileUpload20 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon20();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.list.js?disableCache=0556
var fileList20 = class extends panelRow20 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon20();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0556
var removeIcons20 = class extends icon20 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/page.js?disableCache=0556
var page20 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/image.js?disableCache=0556
var icon_id40 = 0;
var image20 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default40.createElement("img");
useCustomElement = true;
id = icon_id40++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0556
var previewImage20 = class extends image20 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0556
var imagePreviewWindow20 = class extends draggable39 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader20();
previewImage = new previewImage20();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0556
var fileChooserFileIcon20 = class extends icon20 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/checkbox.js?disableCache=0556
var checkbox20 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default40.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0556
var file20 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox20();
icon = new fileChooserFileIcon20();
label = new label39();
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0556
var fileChooserFiles20 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file20();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0556
var fileChooserSelectButton20 = class extends button20 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/fileChooser/fileChooser.js?disableCache=0556
var fileChooser20 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles20();
selectButton = new fileChooserSelectButton20();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/fileManager/fileManager.js?disableCache=0556
var fileManager20 = class extends page20 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header20("Upload");
fileupload = new stream20();
filesHeader = new header20("Files");
removeIcons = new removeIcons20();
fileList = new fileList20();
previewWindow = new imagePreviewWindow20();
fileChooser = new fileChooser20();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.move.js?disableCache=0556
var animationBlock134 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel134 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow20 = class extends panelRow20 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel134("Move");
animationBlock = new animationBlock134();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.rotate.js?disableCache=0556
var animationBlock135 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel135 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row115 = class extends panelRow20 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel135("Rotate");
animationBlock = new animationBlock135();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.color.js?disableCache=0556
var animationBlock136 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel136 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row116 = class extends panelRow20 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel136("Background color");
animationBlock = new animationBlock136();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.skewX.js?disableCache=0556
var animationBlock137 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel137 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row117 = class extends panelRow20 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel137("skewX");
animationBlock = new animationBlock137();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0556
var animationBlock138 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel138 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row118 = class extends panelRow20 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel138("Rotate + Move + Background");
animationBlock = new animationBlock138();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.reverse.js?disableCache=0556
var animationBlock139 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton20 = class extends button20 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton20 = class extends button20 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton20 = class extends button20 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton20 = class extends button20 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton20 = class extends button20 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel139 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons39 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton20();
pauseButton = new pauseButton20();
stopButton = new stopButton20();
forwardButton = new forwardButton20();
backwardButton = new backwardButton20();
flexDirection = "column";
};
var row119 = class extends panelRow20 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel139("Reverse");
buttons = new buttons39();
animationBlock = new animationBlock139();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animation.render.js?disableCache=0556
var animationBlock140 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel140 = class extends label39 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row120 = class extends panelRow20 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel140("RenderLoop");
animationBlock = new animationBlock140();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/animations/animations.js?disableCache=0556
var animations20 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow20();
rotateAnimation = new row115();
backgroundColor = new row116();
skewX = new row117();
rotateMoveColor = new row118();
reverse = new row119();
render = new row120();
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/examples/grids.js?disableCache=0556
var label40 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a20 = class extends input20 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b21 = class extends input20 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c20 = class extends input20 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d20 = class extends input20 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA20 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label40("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a20();
b = new b21();
c = new c20();
d = new d20();
};
var gridB20 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label40("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a20();
b = new b21();
c = new c20();
d = new d20();
};
var gridExample20 = class extends page20 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA20();
gridB = new gridB20();
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/header/user.userList.header.username.js?disableCache=0556
var userListHeaderUsername20 = class extends gridViewRowColumn20 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0556
var userListHeaderActions20 = class extends gridViewRowColumn20 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default20.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/header/user.userList.header.js?disableCache=0556
var userListHeader20 = class extends extender40(user21, gridViewTableRow20) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername20();
actions = new userListHeaderActions20();
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/user.userList.table.header.js?disableCache=0556
var userListTableHeader20 = class extends gridViewHeader20 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader20();
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/user.userList.table.body.js?disableCache=0556
var userListTableBody20 = class extends extender40(renderCollection22, gridViewTableHeader20) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE20(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default20.visitor, "READ");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/item/user.userList.item.username.js?disableCache=0556
var userListItemTitle20 = class extends extender40(username21, gridViewBodyColumn20) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0556
var deleteButton60 = class extends button20 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default20.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0556
var userListItemActions20 = class extends extender40(gridViewBodyColumn20, gridViewBodyColumn20) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton60();
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/item/user.userList.item.js?disableCache=0556
var userListItem20 = class extends extender40(user21, gridViewRow20) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle20();
actions = new userListItemActions20();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default20.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/user.userList.table.js?disableCache=0556
var userListTable20 = class extends gridView20 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader20();
body = new userListTableBody20(userListItem20, new collection24(user21));
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/search.js?disableCache=0556
var searchBar60 = class extends input20 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/userList/user.userList.page.js?disableCache=0556
var editPage20 = class extends page20 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header20("Users");
search = new searchBar60();
userTable = new userListTable20();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.username.js?disableCache=0556
var editUsername20 = class extends extender40(username21, input20) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.username.row.js?disableCache=0556
var usernameRow20 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label39("Username");
username = new editUsername20();
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/empty.js?disableCache=0556
var empty20 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/user.edit.button.js?disableCache=0556
var userEditButton20 = class extends button20 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/user.edit.button.row.js?disableCache=0556
var saveButtonRow20 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty20();
userEditButton = new userEditButton20();
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0556
var checkRenderCollection20 = class extends renderCollection22 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default20.admin, "WRITE");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
this.allow(user_group_permission_default20.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.checkbox.js?disableCache=0556
var customCheckbox39 = class extends checkbox20 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0556
var customCheckbox40 = class extends user21 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label39();
checkbox = new customCheckbox39();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0556
var checkboxRow20 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label39("Select users");
renderCollection = new checkRenderCollection20(customCheckbox40, new collection24(user21));
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.select.option.js?disableCache=0556
var customOption20 = class extends extender40(option20, user21) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0556
var customSelect40 = class extends renderCollection22 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default40.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default20.admin, "WRITE");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
this.allow(user_group_permission_default20.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.select.row.js?disableCache=0556
var optionRow20 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label39("Select user");
renderCollection = new customSelect40(customOption20, new collection24(user21));
};
// framework/cache/platforms/Ios/Mobile/Dark/user/edit/edit.user.js?disableCache=0556
var editUser20 = class extends extender40(user21, page20) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header20("Edit user");
usernameRow = new usernameRow20();
selectRow = new optionRow20();
checkboxRow = new checkboxRow20();
showSelectedUser = new customSelect40(customOption20, this.selectedUsers);
saveButtonRow = new saveButtonRow20();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default20.admin, "WRITE");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
this.allow(user_group_permission_default20.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signup/signup.username.js?disableCache=0556
var signUpUsername20 = class extends extender40(username21, input20) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/inputPassword.js?disableCache=0556
var inputPassword20 = class extends input20 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signup/signup.password.js?disableCache=0556
var signupPassword20 = class extends inputPassword20 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signup/signup.passwordCheck.js?disableCache=0556
var signupPasswordCheck20 = class extends inputPassword20 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0556
var cookieManager21 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default21 = new cookieManager21();
// framework/cache/platforms/Ios/Mobile/Dark/user/signup/signup.button.js?disableCache=0556
var signupButton20 = class extends button20 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signup/signup.customLabel.js?disableCache=0556
var customLabel40 = class extends label39 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signup/user.signup.js?disableCache=0556
var signup20 = class extends extender40(user21, page20) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default40.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header20("Signup");
// Children
userLabel = new customLabel40("Username");
username = new signUpUsername20();
passwordLabel = new customLabel40("Password");
password = new signupPassword20();
passwordAgainLabel = new customLabel40("Password again");
passwordAgain = new signupPasswordCheck20();
signUpButton = new signupButton20();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default20.visitor, "PROCESS");
this.allow(user_group_permission_default20.member, "PROCESS");
this.allow(user_group_permission_default20.admin, "PROCESS");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signin/signin.username.js?disableCache=0556
var signinUsername20 = class extends extender40(username21, input20) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/user.password.js?disableCache=0556
var password20 = class extends inputPassword20 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signin/signin.password.js?disableCache=0556
var signinPassword20 = class extends password20 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signin/signin.button.js?disableCache=0556
var signinFormButton20 = class extends button20 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0556
var unify21 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default21 = new unify21();
// framework/cache/platforms/Ios/Mobile/Dark/user/signin/signin.cancel.button.js?disableCache=0556
var cancelButton40 = class extends button20 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Ios/Mobile/Dark/user/signin/user.signin.js?disableCache=0556
var tussenObject20 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword20();
width = "100%";
};
var buttons40 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton40();
signinButton = new signinFormButton20();
};
var hint20 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin20 = class extends extender40(user21, page20) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint20();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default40.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header20("Signin");
//userLabel = new label("Username");
username = new signinUsername20();
//passwordLabel = new label("Password");
tussenObject = new tussenObject20();
buttons = new buttons40();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user21();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default21.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user21();
client2.user = visitor62;
client2.user.error = false;
unify_default21.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default21.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default20.visitor, "PROCESS");
this.allow(user_group_permission_default20.member, "PROCESS");
this.allow(user_group_permission_default20.admin, "PROCESS");
this.allow(user_group_permission_default20.member, "READ");
this.allow(user_group_permission_default20.admin, "READ");
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/rightSide/rightSide.js?disableCache=0883
var rightSide20 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages20();
signup = new signup20();
signin = new signin20();
settings = new settings20();
fileManager = new fileManager20();
animations = new animations20();
gridExample = new gridExample20();
userListPage = new editPage20();
editUser = new editUser20();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0883
var documentTool41 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object63 = new documentTool41();
var document_default41 = object63.getDocument();
// framework/unify/math/vector2.js?disableCache=0883
var vector260 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/flexbox.js?disableCache=0883
var flexbox40 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/window/frostedGlass.js?disableCache=0883
var frostedGlass40 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Ios/Mobile/Dark/elements/window/draggable.js?disableCache=0883
var vector261 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay60(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay60, "delay");
var draggable40 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector261(0, 0);
grabPosition = new vector261(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector261(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay60(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector261(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Mobile/Dark/demo/application.js
var application21 = class extends extender39(frostedGlass40, flexbox40, draggable40) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton20();
leftSide = new leftSide20();
rightSide = new rightSide20();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default41.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector260(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0422
function extender41(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender41, "extender");
// framework/unify/extender.js?disableCache=0888
function extender42(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender42, "extender");
// framework/cache/platforms/Ios/Tablet/Light/elements/button.js?disableCache=0888
var button21 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/icon.js?disableCache=0888
var icon_id41 = 0;
var icon21 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id41++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/minimizeButton.js?disableCache=0422
var minimizeButton21 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.js?disableCache=0888
var menuButton21 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.news.js?disableCache=0888
var newsButton21 = class extends menuButton21 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0888
var settingsButton61 = class extends menuButton21 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0888
var collection25 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0888
var datatype_default22 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0888
var documentTool42 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object64 = new documentTool42();
var document_default42 = object64.getDocument();
// framework/cache/platforms/Ios/Tablet/Light/elements/option.js?disableCache=0888
var option21 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default42.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/group/user.group.js?disableCache=0888
var visitor42 = class extends option21 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member21 = class extends option21 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin41 = class extends option21 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups21 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member21();
admin = new admin41();
visitor = new visitor42();
};
// framework/cache/platforms/Ios/Tablet/Light/user/group/user.group.permission.js?disableCache=0888
var user_group_permission_default21 = new groups21();
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0888
var signinPageButton21 = class extends menuButton21 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0888
var signinButton21 = class extends menuButton21 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0888
var visitor43 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager22 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor43();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default22 = new userManager22();
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0888
var signoutButton21 = class extends menuButton21 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default22.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default21.member, "PROCESS");
this.allow(user_group_permission_default21.admin, "PROCESS");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0888
var fileMangerButton21 = class extends menuButton21 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0888
var settingsButton62 = class extends menuButton21 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.users.js?disableCache=0888
var usersPageButton21 = class extends menuButton21 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default21.member, "PROCESS");
this.allow(user_group_permission_default21.admin, "PROCESS");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0888
var settingsButton63 = class extends menuButton21 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/header.js?disableCache=0888
var header21 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.header.js?disableCache=0888
var menuHeader21 = class extends header21 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/leftSide/leftSide.js?disableCache=0422
var leftSide21 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader21();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton21();
settingsButton = new settingsButton61();
usersButton = new usersPageButton21();
signinButton = new signinPageButton21();
signoutButton = new signoutButton21();
signupButton = new signinButton21();
animationsButton = new settingsButton62();
gridButton = new settingsButton63();
fileManagerButton = new fileMangerButton21();
};
// framework/unify/table.js?disableCache=0888
var table23 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0888
var column21 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/news.title.js?disableCache=0888
var title61 = class extends column21 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/news.body.js?disableCache=0888
var body41 = class extends column21 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/news.price.js?disableCache=0888
var price21 = class extends column21 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default22.REAL;
};
// framework/cache/platforms/Ios/Tablet/Light/user/user.username.js?disableCache=0888
var username22 = class extends column21 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0888
var tools23 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll22(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default22 = new tools23();
// framework/cache/platforms/Ios/Tablet/Light/elements/input.js?disableCache=0888
var input21 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default42.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default42.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default42.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/user.salt.js?disableCache=0888
var salt22 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default22.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Light/user/user.hash.js?disableCache=0888
var hash22 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default22.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Light/user/user.js?disableCache=0888
var user22 = class _user extends table23 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username22();
salt = new salt22();
hash = new hash22();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups21();
selectedUsers = new collection25(_user);
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/comment.body.js?disableCache=0888
var body42 = class extends column21 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/comment.title.js?disableCache=0888
var title62 = class extends column21 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/comment.js?disableCache=0888
var comment22 = class extends table23 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user22();
title = new title62();
body = new body42();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/news.js?disableCache=0888
var news21 = class extends table23 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title61();
body = new body41();
price = new price21();
comments = new collection25(comment22);
};
// framework/cache/platforms/Ios/Tablet/Light/elements/tableCell.js?disableCache=0888
var tableCell21 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0888
var sortBy21 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.header.row.column.js?disableCache=0888
var gridViewRowColumn21 = class extends tableCell21 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy21();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/header/news.list.header.body.js?disableCache=0888
var newsListHeaderBody21 = class extends gridViewRowColumn21 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/header/news.list.header.title.js?disableCache=0888
var newsListHeaderTitle21 = class extends gridViewRowColumn21 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/header/news.list.header.price.js?disableCache=0888
var newsListHeaderPrice21 = class extends gridViewRowColumn21 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/header/news.list.header.actions.js?disableCache=0888
var newsListHeaderActions21 = class extends gridViewRowColumn21 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default21.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.header.row.js?disableCache=0888
var gridViewTableRow21 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/header/news.list.header.js?disableCache=0888
var newsListHeader21 = class extends extender42(news21, gridViewTableRow21) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody21();
title = new newsListHeaderTitle21();
price = new newsListHeaderPrice21();
actions = new newsListHeaderActions21();
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.header.js?disableCache=0888
var gridViewHeader21 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/news.list.table.header.js?disableCache=0888
var newsListTableHeader21 = class extends gridViewHeader21 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader21();
};
// framework/unify/renderCollection.js?disableCache=0888
var renderCollection23 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.body.js?disableCache=0888
var gridViewTableHeader21 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0888
function OR21(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR21, "OR");
// framework/unify/sql/LIKE.js?disableCache=0888
function LIKE21(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE21, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0888
function GREATER_OR_EQUAL21(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL21, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0888
function SMALLER_OR_EQUAL21(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL21, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Ios/Tablet/Light/demo/list/news.list.table.body.js?disableCache=0888
var newsListTableBody21 = class extends extender42(renderCollection23, gridViewTableHeader21) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR21(OR21(LIKE21(filter.title, searchTerm), LIKE21(filter.comments.body, searchTerm)), LIKE21(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL21(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL21(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default21.visitor, "READ");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.body.row.column.js?disableCache=0888
var gridViewBodyColumn21 = class extends tableCell21 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/item/news.list.item.body.js?disableCache=0888
var newsListItemBody21 = class extends extender42(body41, gridViewBodyColumn21) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/item/news.list.item.title.js?disableCache=0888
var newsListItemTitle21 = class extends extender42(title61, gridViewBodyColumn21) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/item/news.list.item.price.js?disableCache=0888
var newsListItemPrice21 = class extends extender42(price21, gridViewBodyColumn21) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0888
var deleteButton61 = class extends button21 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default21.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/item/news.list.item.actions.js?disableCache=0888
var newsListItemActions21 = class extends extender42(gridViewBodyColumn21, gridViewBodyColumn21) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton61();
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.body.row.js?disableCache=0888
var gridViewRow21 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/item/news.list.item.js?disableCache=0888
var newsListItem21 = class extends extender42(news21, gridViewRow21) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody21();
title = new newsListItemTitle21();
price = new newsListItemPrice21();
actions = new newsListItemActions21();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default21.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/gridView/gridView.js?disableCache=0888
var gridView21 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/list/news.list.table.js?disableCache=0888
var newsListTable21 = class extends gridView21 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader21();
body = new newsListTableBody21(newsListItem21, new collection25(news21));
};
// framework/cache/platforms/Ios/Tablet/Light/demo/edit/news.edit.title.js?disableCache=0888
var newsEditTitle21 = class extends extender42(input21, title61) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Ios/Tablet/Light/elements/textarea.js?disableCache=0888
var textarea21 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default42.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/edit/news.edit.body.js?disableCache=0888
var newsPageBody41 = class extends extender42(body41, textarea21) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/edit/news.edit.button.js?disableCache=0888
var editButton41 = class extends button21 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/edit/news.edit.price.js?disableCache=0888
var newsPagePrice21 = class extends extender42(price21, input21) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/label.js?disableCache=0888
var label41 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/label/left.js?disableCache=0888
var leftLabel21 = class extends label41 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Ios/Tablet/Light/elements/panel.js?disableCache=0888
var panel21 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Ios/Tablet/Light/elements/window/draggable.js?disableCache=0888
var vector262 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay61(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay61, "delay");
var draggable41 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector262(0, 0);
grabPosition = new vector262(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector262(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay61(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector262(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/panel/row.js?disableCache=0888
var panelRow21 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/window/header.js?disableCache=0888
var maximizeButton21 = class extends icon21 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton21 = class extends icon21 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl21 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton21();
maximizeButton = new maximizeButton21();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title63 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl21 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader21 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl21();
title = new title63();
rightControl = new rightControl21();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/edit/news.edit.js?disableCache=0888
var newsBodyRow21 = class extends panelRow21 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel21("Message");
body = new newsPageBody41();
};
var newsTitleRow21 = class extends panelRow21 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel21("Title");
title = new newsEditTitle21();
};
var newsPriceRow21 = class extends panelRow21 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel21("Price");
price = new newsPagePrice21();
};
var cancelButton41 = class extends button21 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow21 = class extends panelRow21 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton41();
newsEditbutton = new editButton41();
};
var newsEdit21 = class extends extender42(news21, panel21, draggable41) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader21("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow21();
newsPriceRow = new newsPriceRow21();
newsBodyRow = new newsBodyRow21();
newsButtonRow = new newsButtonRow21();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
this.allow(user_group_permission_default21.visitor, "READ");
this.allow(user_group_permission_default21.member, "WRITE");
this.allow(user_group_permission_default21.admin, "WRITE");
this.allow(user_group_permission_default21.visitor, "WRITE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsDialogButton.js?disableCache=0888
var newsDialogButton21 = class extends button21 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/search.input.js?disableCache=0888
var searchBar61 = class extends input21 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/select.js?disableCache=0888
var select21 = class extends renderCollection23 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default42.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default21.admin, "READ");
this.allow(user_group_permission_default21.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default42.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/search.select.js?disableCache=0888
var customSelect41 = class extends select21 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/search.widget.js?disableCache=0888
var searchWidget21 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar61();
select = new customSelect41();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0888
var paginationItem21 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsItemPage.pagination.js?disableCache=0888
var pagination21 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem21();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem21();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem21();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsItemPage.limit.js?disableCache=0888
var limit21 = class extends select21 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0888
var tableControl21 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label41("Select page:");
pagination = new pagination21();
limitLabel = new label41("Select items per page:");
limit = new limit21();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsItemPage.js?disableCache=0888
var testbutton21 = class extends button21 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage21 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header21("News Items");
searchWidget = new searchWidget21();
newsListTable = new newsListTable21();
tableControl = new tableControl21();
createNews = new newsEdit21();
testbutton = new testbutton21();
newsDialogButton = new newsDialogButton21();
};
// framework/cache/platforms/Ios/Tablet/Light/elements/flexbox.js?disableCache=0888
var flexbox41 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/page/news.page.title.js?disableCache=0888
var newsPageTitle21 = class extends extender42(title61, flexbox41) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/page/news.page.body.js?disableCache=0888
var newsPageBody42 = class extends extender42(flexbox41, body41) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/comments.messages.js?disableCache=0888
var commentsMessages21 = class extends renderCollection23 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR21(LIKE21(filter.body, this.value), LIKE21(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default21.visitor, "READ");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.saveButton.js?disableCache=0888
var saveEditButton21 = class extends button21 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.edit.title.js?disableCache=0888
var commentEditTitle41 = class extends title62 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.edit.body.js?disableCache=0888
var commentEditBody41 = class extends extender42(body42, flexbox41) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default42.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.userLabel.js?disableCache=0888
var userLabel41 = class extends label41 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0888
var deleteButton62 = class extends button21 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.editButton.js?disableCache=0888
var editButton42 = class extends button21 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.information.js?disableCache=0888
var information21 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton62();
_editButton = new editButton42();
_userLabel = new userLabel41();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/edit/comment.edit.js?disableCache=0888
var editComment21 = class extends comment22 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information21();
body = new commentEditBody41();
title = new commentEditTitle41();
saveButton = new saveEditButton21();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/create/comment.saveButton.js?disableCache=0888
var saveCommentButton21 = class extends button21 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/create/comment.create.body.js?disableCache=0888
var commentEditBody42 = class extends extender42(body42, textarea21) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/comment/create/comment.create.js?disableCache=0888
var createComment21 = class extends comment22 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody42();
saveButton = new saveCommentButton21();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default21.member, "WRITE");
this.allow(user_group_permission_default21.admin, "WRITE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/page/news.page.backButton.js?disableCache=0888
var backButton41 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/page/news.page.edit.button.js?disableCache=0888
var backButton42 = class extends button21 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/filler.js?disableCache=0888
var filler21 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/page/search.comments.js?disableCache=0888
var searchBar62 = class extends input21 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/page/news.page.js?disableCache=0888
var testDiv21 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle21();
};
var newsPage21 = class extends news21 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton41();
_testDiv = new testDiv21();
body = new newsPageBody42();
editButton = new backButton42();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar62();
commentsMessages = new commentsMessages21(editComment21, this.comments);
createComment = new createComment21(this.comments);
filler = new filler21();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default21.member, "WRITE");
this.allow(user_group_permission_default21.admin, "WRITE");
this.allow(user_group_permission_default21.visitor, "WRITE");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
this.allow(user_group_permission_default21.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/newsPages.js?disableCache=0888
var newsPages21 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage21();
newsPage = new newsPage21();
newsEdit = new newsEdit21();
width = 1800;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/preloaders/simpleSpinner.js?disableCache=0888
var line21 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask21 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line21();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox21 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask21();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0888
var themaSelectorImage21 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0888
var selectLabel21 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/themeSelector.js?disableCache=0888
var themeSelector21 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage21();
selectLabel = new selectLabel21();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0888
var themeOSSelectorItem21 = class extends themeSelector21 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default22.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0888
var osSelectorList21 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem21("Windows");
themeMacOS = new themeOSSelectorItem21("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default22.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/os.label.js?disableCache=0888
var osLabel21 = class extends label41 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/os.js?disableCache=0888
var os21 = class extends panelRow21 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel21("Os");
osSelector = new osSelectorList21();
spinner = new preloaderBox21();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0888
var themeTintSelector21 = class extends themeSelector21 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default22.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0888
var themeTintSelectors21 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector21("Light");
themeDark = new themeTintSelector21("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default22.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0888
var customLabel41 = class extends label41 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/rows/tint.js?disableCache=0888
var tint21 = class extends panelRow21 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel41("Appearance");
themeTintSelectors = new themeTintSelectors21();
spinner = new preloaderBox21();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/appearance/panel.js?disableCache=0888
var appearancePanel21 = class extends panel21 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os21();
tint = new tint21();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/pages/settings.js?disableCache=0888
var settings21 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header21("Appearance");
appearancePanel = new appearancePanel21();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0888
var Console22 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default22 = new Console22();
// framework/unify/promiseManager.js?disableCache=0888
var promiseManager22 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0888
var shared22 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object65 = new shared22();
var shared_default22 = object65.get();
// framework/cache/platforms/Ios/Tablet/Light/elements/fileUpload.js?disableCache=0888
var fileUpload21 = class extends input21 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager22();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0888
var delay62 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton21 = class extends icon21 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay62(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay62(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.icon.js?disableCache=0888
var fileIcon21 = class extends icon21 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton21();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.upload.js?disableCache=0888
var stream21 = class extends fileUpload21 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon21();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.list.js?disableCache=0888
var fileList21 = class extends panelRow21 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon21();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0888
var removeIcons21 = class extends icon21 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/page.js?disableCache=0888
var page21 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/image.js?disableCache=0888
var icon_id42 = 0;
var image21 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default42.createElement("img");
useCustomElement = true;
id = icon_id42++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0888
var previewImage21 = class extends image21 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0888
var imagePreviewWindow21 = class extends draggable41 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader21();
previewImage = new previewImage21();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0888
var fileChooserFileIcon21 = class extends icon21 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/checkbox.js?disableCache=0888
var checkbox21 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default42.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/fileChooser/fileChooser.file.js?disableCache=0888
var file21 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox21();
icon = new fileChooserFileIcon21();
label = new label41();
};
// framework/cache/platforms/Ios/Tablet/Light/elements/fileChooser/fileChooser.files.js?disableCache=0888
var fileChooserFiles21 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file21();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0888
var fileChooserSelectButton21 = class extends button21 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/fileChooser/fileChooser.js?disableCache=0888
var fileChooser21 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles21();
selectButton = new fileChooserSelectButton21();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/fileManager/fileManager.js?disableCache=0888
var fileManager21 = class extends page21 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header21("Upload");
fileupload = new stream21();
filesHeader = new header21("Files");
removeIcons = new removeIcons21();
fileList = new fileList21();
previewWindow = new imagePreviewWindow21();
fileChooser = new fileChooser21();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.move.js?disableCache=0888
var animationBlock141 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel141 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow21 = class extends panelRow21 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel141("Move");
animationBlock = new animationBlock141();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.rotate.js?disableCache=0888
var animationBlock142 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel142 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row121 = class extends panelRow21 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel142("Rotate");
animationBlock = new animationBlock142();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.color.js?disableCache=0888
var animationBlock143 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel143 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row122 = class extends panelRow21 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel143("Background color");
animationBlock = new animationBlock143();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.skewX.js?disableCache=0888
var animationBlock144 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel144 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row123 = class extends panelRow21 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel144("skewX");
animationBlock = new animationBlock144();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0888
var animationBlock145 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel145 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row124 = class extends panelRow21 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel145("Rotate + Move + Background");
animationBlock = new animationBlock145();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.reverse.js?disableCache=0888
var animationBlock146 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton21 = class extends button21 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton21 = class extends button21 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton21 = class extends button21 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton21 = class extends button21 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton21 = class extends button21 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel146 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons41 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton21();
pauseButton = new pauseButton21();
stopButton = new stopButton21();
forwardButton = new forwardButton21();
backwardButton = new backwardButton21();
flexDirection = "column";
};
var row125 = class extends panelRow21 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel146("Reverse");
buttons = new buttons41();
animationBlock = new animationBlock146();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animation.render.js?disableCache=0888
var animationBlock147 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel147 = class extends label41 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row126 = class extends panelRow21 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel147("RenderLoop");
animationBlock = new animationBlock147();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/animations/animations.js?disableCache=0888
var animations21 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow21();
rotateAnimation = new row121();
backgroundColor = new row122();
skewX = new row123();
rotateMoveColor = new row124();
reverse = new row125();
render = new row126();
};
// framework/cache/platforms/Ios/Tablet/Light/demo/examples/grids.js?disableCache=0888
var label42 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a21 = class extends input21 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b22 = class extends input21 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c21 = class extends input21 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d21 = class extends input21 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA21 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label42("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a21();
b = new b22();
c = new c21();
d = new d21();
};
var gridB21 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label42("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a21();
b = new b22();
c = new c21();
d = new d21();
};
var gridExample21 = class extends page21 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA21();
gridB = new gridB21();
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/header/user.userList.header.username.js?disableCache=0888
var userListHeaderUsername21 = class extends gridViewRowColumn21 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/header/user.userList.header.actions.js?disableCache=0888
var userListHeaderActions21 = class extends gridViewRowColumn21 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default21.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/header/user.userList.header.js?disableCache=0888
var userListHeader21 = class extends extender42(user22, gridViewTableRow21) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername21();
actions = new userListHeaderActions21();
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/user.userList.table.header.js?disableCache=0888
var userListTableHeader21 = class extends gridViewHeader21 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader21();
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/user.userList.table.body.js?disableCache=0888
var userListTableBody21 = class extends extender42(renderCollection23, gridViewTableHeader21) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE21(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default21.visitor, "READ");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/item/user.userList.item.username.js?disableCache=0888
var userListItemTitle21 = class extends extender42(username22, gridViewBodyColumn21) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0888
var deleteButton63 = class extends button21 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default21.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/item/user.userList.item.actions.js?disableCache=0888
var userListItemActions21 = class extends extender42(gridViewBodyColumn21, gridViewBodyColumn21) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton63();
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/item/user.userList.item.js?disableCache=0888
var userListItem21 = class extends extender42(user22, gridViewRow21) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle21();
actions = new userListItemActions21();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default21.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/user.userList.table.js?disableCache=0888
var userListTable21 = class extends gridView21 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader21();
body = new userListTableBody21(userListItem21, new collection25(user22));
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/search.js?disableCache=0888
var searchBar63 = class extends input21 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/userList/user.userList.page.js?disableCache=0888
var editPage21 = class extends page21 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header21("Users");
search = new searchBar63();
userTable = new userListTable21();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.username.js?disableCache=0888
var editUsername21 = class extends extender42(username22, input21) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.username.row.js?disableCache=0888
var usernameRow21 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label41("Username");
username = new editUsername21();
};
// framework/cache/platforms/Ios/Tablet/Light/elements/empty.js?disableCache=0888
var empty21 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/user.edit.button.js?disableCache=0888
var userEditButton21 = class extends button21 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/user.edit.button.row.js?disableCache=0888
var saveButtonRow21 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty21();
userEditButton = new userEditButton21();
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0888
var checkRenderCollection21 = class extends renderCollection23 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default21.admin, "WRITE");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
this.allow(user_group_permission_default21.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.checkbox.js?disableCache=0888
var customCheckbox41 = class extends checkbox21 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0888
var customCheckbox42 = class extends user22 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label41();
checkbox = new customCheckbox41();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.checkbox.row.js?disableCache=0888
var checkboxRow21 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label41("Select users");
renderCollection = new checkRenderCollection21(customCheckbox42, new collection25(user22));
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.select.option.js?disableCache=0888
var customOption21 = class extends extender42(option21, user22) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0888
var customSelect42 = class extends renderCollection23 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default42.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default21.admin, "WRITE");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
this.allow(user_group_permission_default21.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.select.row.js?disableCache=0888
var optionRow21 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label41("Select user");
renderCollection = new customSelect42(customOption21, new collection25(user22));
};
// framework/cache/platforms/Ios/Tablet/Light/user/edit/edit.user.js?disableCache=0888
var editUser21 = class extends extender42(user22, page21) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header21("Edit user");
usernameRow = new usernameRow21();
selectRow = new optionRow21();
checkboxRow = new checkboxRow21();
showSelectedUser = new customSelect42(customOption21, this.selectedUsers);
saveButtonRow = new saveButtonRow21();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default21.admin, "WRITE");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
this.allow(user_group_permission_default21.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/signup/signup.username.js?disableCache=0888
var signUpUsername21 = class extends extender42(username22, input21) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/inputPassword.js?disableCache=0888
var inputPassword21 = class extends input21 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/signup/signup.password.js?disableCache=0888
var signupPassword21 = class extends inputPassword21 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Ios/Tablet/Light/user/signup/signup.passwordCheck.js?disableCache=0888
var signupPasswordCheck21 = class extends inputPassword21 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0888
var cookieManager22 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default22 = new cookieManager22();
// framework/cache/platforms/Ios/Tablet/Light/user/signup/signup.button.js?disableCache=0888
var signupButton21 = class extends button21 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/signup/signup.customLabel.js?disableCache=0888
var customLabel42 = class extends label41 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Ios/Tablet/Light/user/signup/user.signup.js?disableCache=0888
var signup21 = class extends extender42(user22, page21) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default42.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header21("Signup");
// Children
userLabel = new customLabel42("Username");
username = new signUpUsername21();
passwordLabel = new customLabel42("Password");
password = new signupPassword21();
passwordAgainLabel = new customLabel42("Password again");
passwordAgain = new signupPasswordCheck21();
signUpButton = new signupButton21();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default21.visitor, "PROCESS");
this.allow(user_group_permission_default21.member, "PROCESS");
this.allow(user_group_permission_default21.admin, "PROCESS");
}
};
// framework/cache/platforms/Ios/Tablet/Light/user/signin/signin.username.js?disableCache=0888
var signinUsername21 = class extends extender42(username22, input21) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Ios/Tablet/Light/user/user.password.js?disableCache=0888
var password21 = class extends inputPassword21 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Ios/Tablet/Light/user/signin/signin.password.js?disableCache=0888
var signinPassword21 = class extends password21 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Ios/Tablet/Light/user/signin/signin.button.js?disableCache=0888
var signinFormButton21 = class extends button21 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0888
var unify22 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default22 = new unify22();
// framework/cache/platforms/Ios/Tablet/Light/user/signin/signin.cancel.button.js?disableCache=0888
var cancelButton42 = class extends button21 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Light/user/signin/user.signin.js?disableCache=0888
var tussenObject21 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword21();
width = "100%";
};
var buttons42 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton42();
signinButton = new signinFormButton21();
};
var hint21 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin21 = class extends extender42(user22, page21) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint21();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default42.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header21("Signin");
//userLabel = new label("Username");
username = new signinUsername21();
//passwordLabel = new label("Password");
tussenObject = new tussenObject21();
buttons = new buttons42();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user22();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default22.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user22();
client2.user = visitor62;
client2.user.error = false;
unify_default22.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default22.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default21.visitor, "PROCESS");
this.allow(user_group_permission_default21.member, "PROCESS");
this.allow(user_group_permission_default21.admin, "PROCESS");
this.allow(user_group_permission_default21.member, "READ");
this.allow(user_group_permission_default21.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/rightSide/rightSide.js?disableCache=0422
var rightSide21 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages21();
signup = new signup21();
signin = new signin21();
settings = new settings21();
fileManager = new fileManager21();
animations = new animations21();
gridExample = new gridExample21();
userListPage = new editPage21();
editUser = new editUser21();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0422
var documentTool43 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object66 = new documentTool43();
var document_default43 = object66.getDocument();
// framework/unify/math/vector2.js?disableCache=0422
var vector263 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/flexbox.js?disableCache=0422
var flexbox42 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Tablet/Light/elements/window/frostedGlass.js?disableCache=0422
var frostedGlass42 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Ios/Tablet/Light/elements/window/draggable.js?disableCache=0422
var vector264 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay63(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay63, "delay");
var draggable42 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector264(0, 0);
grabPosition = new vector264(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector264(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay63(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector264(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Tablet/Light/demo/application.js
var application22 = class extends extender41(frostedGlass42, flexbox42, draggable42) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton21();
leftSide = new leftSide21();
rightSide = new rightSide21();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default43.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector263(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0872
function extender43(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender43, "extender");
// framework/unify/extender.js?disableCache=0004
function extender44(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender44, "extender");
// framework/cache/platforms/Ios/Tablet/Dark/elements/button.js?disableCache=0004
var button22 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/icon.js?disableCache=0004
var icon_id43 = 0;
var icon22 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id43++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/minimizeButton.js?disableCache=0872
var minimizeButton22 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.js?disableCache=0004
var menuButton22 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0004
var newsButton22 = class extends menuButton22 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0004
var settingsButton64 = class extends menuButton22 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0004
var collection26 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0004
var datatype_default23 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0004
var documentTool44 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object67 = new documentTool44();
var document_default44 = object67.getDocument();
// framework/cache/platforms/Ios/Tablet/Dark/elements/option.js?disableCache=0004
var option22 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default44.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/group/user.group.js?disableCache=0004
var visitor44 = class extends option22 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member22 = class extends option22 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin43 = class extends option22 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups22 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member22();
admin = new admin43();
visitor = new visitor44();
};
// framework/cache/platforms/Ios/Tablet/Dark/user/group/user.group.permission.js?disableCache=0004
var user_group_permission_default22 = new groups22();
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0004
var signinPageButton22 = class extends menuButton22 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0004
var signinButton22 = class extends menuButton22 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0004
var visitor45 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager23 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor45();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default23 = new userManager23();
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0004
var signoutButton22 = class extends menuButton22 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default23.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default22.member, "PROCESS");
this.allow(user_group_permission_default22.admin, "PROCESS");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0004
var fileMangerButton22 = class extends menuButton22 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0004
var settingsButton65 = class extends menuButton22 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0004
var usersPageButton22 = class extends menuButton22 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default22.member, "PROCESS");
this.allow(user_group_permission_default22.admin, "PROCESS");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0004
var settingsButton66 = class extends menuButton22 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/header.js?disableCache=0004
var header22 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.header.js?disableCache=0004
var menuHeader22 = class extends header22 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/leftSide/leftSide.js?disableCache=0872
var leftSide22 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader22();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton22();
settingsButton = new settingsButton64();
usersButton = new usersPageButton22();
signinButton = new signinPageButton22();
signoutButton = new signoutButton22();
signupButton = new signinButton22();
animationsButton = new settingsButton65();
gridButton = new settingsButton66();
fileManagerButton = new fileMangerButton22();
};
// framework/unify/table.js?disableCache=0004
var table24 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0004
var column22 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/news.title.js?disableCache=0004
var title64 = class extends column22 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/news.body.js?disableCache=0004
var body43 = class extends column22 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/news.price.js?disableCache=0004
var price22 = class extends column22 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default23.REAL;
};
// framework/cache/platforms/Ios/Tablet/Dark/user/user.username.js?disableCache=0004
var username23 = class extends column22 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0004
var tools24 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll23(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default23 = new tools24();
// framework/cache/platforms/Ios/Tablet/Dark/elements/input.js?disableCache=0004
var input22 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default44.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default44.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default44.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/user.salt.js?disableCache=0004
var salt23 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default23.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/user.hash.js?disableCache=0004
var hash23 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default23.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/user.js?disableCache=0004
var user23 = class _user extends table24 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username23();
salt = new salt23();
hash = new hash23();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups22();
selectedUsers = new collection26(_user);
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/comment.body.js?disableCache=0004
var body44 = class extends column22 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/comment.title.js?disableCache=0004
var title65 = class extends column22 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/comment.js?disableCache=0004
var comment23 = class extends table24 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user23();
title = new title65();
body = new body44();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/news.js?disableCache=0004
var news22 = class extends table24 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title64();
body = new body43();
price = new price22();
comments = new collection26(comment23);
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/tableCell.js?disableCache=0004
var tableCell22 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0004
var sortBy22 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0004
var gridViewRowColumn22 = class extends tableCell22 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy22();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/header/news.list.header.body.js?disableCache=0004
var newsListHeaderBody22 = class extends gridViewRowColumn22 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/header/news.list.header.title.js?disableCache=0004
var newsListHeaderTitle22 = class extends gridViewRowColumn22 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/header/news.list.header.price.js?disableCache=0004
var newsListHeaderPrice22 = class extends gridViewRowColumn22 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/header/news.list.header.actions.js?disableCache=0004
var newsListHeaderActions22 = class extends gridViewRowColumn22 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default22.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.header.row.js?disableCache=0004
var gridViewTableRow22 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/header/news.list.header.js?disableCache=0004
var newsListHeader22 = class extends extender44(news22, gridViewTableRow22) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody22();
title = new newsListHeaderTitle22();
price = new newsListHeaderPrice22();
actions = new newsListHeaderActions22();
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.header.js?disableCache=0004
var gridViewHeader22 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/news.list.table.header.js?disableCache=0004
var newsListTableHeader22 = class extends gridViewHeader22 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader22();
};
// framework/unify/renderCollection.js?disableCache=0004
var renderCollection24 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.body.js?disableCache=0004
var gridViewTableHeader22 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0004
function OR22(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR22, "OR");
// framework/unify/sql/LIKE.js?disableCache=0004
function LIKE22(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE22, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0004
function GREATER_OR_EQUAL22(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL22, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0004
function SMALLER_OR_EQUAL22(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL22, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/news.list.table.body.js?disableCache=0004
var newsListTableBody22 = class extends extender44(renderCollection24, gridViewTableHeader22) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR22(OR22(LIKE22(filter.title, searchTerm), LIKE22(filter.comments.body, searchTerm)), LIKE22(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL22(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL22(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default22.visitor, "READ");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0004
var gridViewBodyColumn22 = class extends tableCell22 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/item/news.list.item.body.js?disableCache=0004
var newsListItemBody22 = class extends extender44(body43, gridViewBodyColumn22) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/item/news.list.item.title.js?disableCache=0004
var newsListItemTitle22 = class extends extender44(title64, gridViewBodyColumn22) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/item/news.list.item.price.js?disableCache=0004
var newsListItemPrice22 = class extends extender44(price22, gridViewBodyColumn22) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0004
var deleteButton64 = class extends button22 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default22.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/item/news.list.item.actions.js?disableCache=0004
var newsListItemActions22 = class extends extender44(gridViewBodyColumn22, gridViewBodyColumn22) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton64();
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.body.row.js?disableCache=0004
var gridViewRow22 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/item/news.list.item.js?disableCache=0004
var newsListItem22 = class extends extender44(news22, gridViewRow22) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody22();
title = new newsListItemTitle22();
price = new newsListItemPrice22();
actions = new newsListItemActions22();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default22.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/gridView/gridView.js?disableCache=0004
var gridView22 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/list/news.list.table.js?disableCache=0004
var newsListTable22 = class extends gridView22 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader22();
body = new newsListTableBody22(newsListItem22, new collection26(news22));
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/edit/news.edit.title.js?disableCache=0004
var newsEditTitle22 = class extends extender44(input22, title64) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/textarea.js?disableCache=0004
var textarea22 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default44.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/edit/news.edit.body.js?disableCache=0004
var newsPageBody43 = class extends extender44(body43, textarea22) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/edit/news.edit.button.js?disableCache=0004
var editButton43 = class extends button22 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/edit/news.edit.price.js?disableCache=0004
var newsPagePrice22 = class extends extender44(price22, input22) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/label.js?disableCache=0004
var label43 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/label/left.js?disableCache=0004
var leftLabel22 = class extends label43 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/panel.js?disableCache=0004
var panel22 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/window/draggable.js?disableCache=0004
var vector265 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay64(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay64, "delay");
var draggable43 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector265(0, 0);
grabPosition = new vector265(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector265(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay64(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector265(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/panel/row.js?disableCache=0004
var panelRow22 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/window/header.js?disableCache=0004
var maximizeButton22 = class extends icon22 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton22 = class extends icon22 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl22 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton22();
maximizeButton = new maximizeButton22();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title66 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl22 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader22 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl22();
title = new title66();
rightControl = new rightControl22();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/edit/news.edit.js?disableCache=0004
var newsBodyRow22 = class extends panelRow22 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel22("Message");
body = new newsPageBody43();
};
var newsTitleRow22 = class extends panelRow22 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel22("Title");
title = new newsEditTitle22();
};
var newsPriceRow22 = class extends panelRow22 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel22("Price");
price = new newsPagePrice22();
};
var cancelButton43 = class extends button22 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow22 = class extends panelRow22 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton43();
newsEditbutton = new editButton43();
};
var newsEdit22 = class extends extender44(news22, panel22, draggable43) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader22("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow22();
newsPriceRow = new newsPriceRow22();
newsBodyRow = new newsBodyRow22();
newsButtonRow = new newsButtonRow22();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
this.allow(user_group_permission_default22.visitor, "READ");
this.allow(user_group_permission_default22.member, "WRITE");
this.allow(user_group_permission_default22.admin, "WRITE");
this.allow(user_group_permission_default22.visitor, "WRITE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsDialogButton.js?disableCache=0004
var newsDialogButton22 = class extends button22 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/search.input.js?disableCache=0004
var searchBar64 = class extends input22 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/select.js?disableCache=0004
var select22 = class extends renderCollection24 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default44.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default22.admin, "READ");
this.allow(user_group_permission_default22.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default44.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/search.select.js?disableCache=0004
var customSelect43 = class extends select22 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/search.widget.js?disableCache=0004
var searchWidget22 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar64();
select = new customSelect43();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0004
var paginationItem22 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0004
var pagination22 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem22();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem22();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem22();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsItemPage.limit.js?disableCache=0004
var limit22 = class extends select22 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0004
var tableControl22 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label43("Select page:");
pagination = new pagination22();
limitLabel = new label43("Select items per page:");
limit = new limit22();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsItemPage.js?disableCache=0004
var testbutton22 = class extends button22 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage22 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header22("News Items");
searchWidget = new searchWidget22();
newsListTable = new newsListTable22();
tableControl = new tableControl22();
createNews = new newsEdit22();
testbutton = new testbutton22();
newsDialogButton = new newsDialogButton22();
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/flexbox.js?disableCache=0004
var flexbox43 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/page/news.page.title.js?disableCache=0004
var newsPageTitle22 = class extends extender44(title64, flexbox43) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/page/news.page.body.js?disableCache=0004
var newsPageBody44 = class extends extender44(flexbox43, body43) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/comments.messages.js?disableCache=0004
var commentsMessages22 = class extends renderCollection24 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR22(LIKE22(filter.body, this.value), LIKE22(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default22.visitor, "READ");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0004
var saveEditButton22 = class extends button22 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0004
var commentEditTitle43 = class extends title65 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0004
var commentEditBody43 = class extends extender44(body44, flexbox43) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default44.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0004
var userLabel43 = class extends label43 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0004
var deleteButton65 = class extends button22 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.editButton.js?disableCache=0004
var editButton44 = class extends button22 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.information.js?disableCache=0004
var information22 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton65();
_editButton = new editButton44();
_userLabel = new userLabel43();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/edit/comment.edit.js?disableCache=0004
var editComment22 = class extends comment23 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information22();
body = new commentEditBody43();
title = new commentEditTitle43();
saveButton = new saveEditButton22();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/create/comment.saveButton.js?disableCache=0004
var saveCommentButton22 = class extends button22 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/create/comment.create.body.js?disableCache=0004
var commentEditBody44 = class extends extender44(body44, textarea22) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/comment/create/comment.create.js?disableCache=0004
var createComment22 = class extends comment23 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody44();
saveButton = new saveCommentButton22();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default22.member, "WRITE");
this.allow(user_group_permission_default22.admin, "WRITE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/page/news.page.backButton.js?disableCache=0004
var backButton43 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/page/news.page.edit.button.js?disableCache=0004
var backButton44 = class extends button22 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/filler.js?disableCache=0004
var filler22 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/page/search.comments.js?disableCache=0004
var searchBar65 = class extends input22 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/page/news.page.js?disableCache=0004
var testDiv22 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle22();
};
var newsPage22 = class extends news22 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton43();
_testDiv = new testDiv22();
body = new newsPageBody44();
editButton = new backButton44();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar65();
commentsMessages = new commentsMessages22(editComment22, this.comments);
createComment = new createComment22(this.comments);
filler = new filler22();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default22.member, "WRITE");
this.allow(user_group_permission_default22.admin, "WRITE");
this.allow(user_group_permission_default22.visitor, "WRITE");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
this.allow(user_group_permission_default22.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/newsPages.js?disableCache=0004
var newsPages22 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage22();
newsPage = new newsPage22();
newsEdit = new newsEdit22();
width = 1800;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/preloaders/simpleSpinner.js?disableCache=0004
var line22 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask22 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line22();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox22 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask22();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0004
var themaSelectorImage22 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0004
var selectLabel22 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/themeSelector.js?disableCache=0004
var themeSelector22 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage22();
selectLabel = new selectLabel22();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0004
var themeOSSelectorItem22 = class extends themeSelector22 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default23.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0004
var osSelectorList22 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem22("Windows");
themeMacOS = new themeOSSelectorItem22("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default23.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0004
var osLabel22 = class extends label43 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/os.js?disableCache=0004
var os22 = class extends panelRow22 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel22("Os");
osSelector = new osSelectorList22();
spinner = new preloaderBox22();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0004
var themeTintSelector22 = class extends themeSelector22 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default23.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0004
var themeTintSelectors22 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector22("Light");
themeDark = new themeTintSelector22("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default23.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0004
var customLabel43 = class extends label43 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/rows/tint.js?disableCache=0004
var tint22 = class extends panelRow22 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel43("Appearance");
themeTintSelectors = new themeTintSelectors22();
spinner = new preloaderBox22();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/appearance/panel.js?disableCache=0004
var appearancePanel22 = class extends panel22 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os22();
tint = new tint22();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/pages/settings.js?disableCache=0004
var settings22 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header22("Appearance");
appearancePanel = new appearancePanel22();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0004
var Console23 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default23 = new Console23();
// framework/unify/promiseManager.js?disableCache=0004
var promiseManager23 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0004
var shared23 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object68 = new shared23();
var shared_default23 = object68.get();
// framework/cache/platforms/Ios/Tablet/Dark/elements/fileUpload.js?disableCache=0004
var fileUpload22 = class extends input22 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager23();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0004
var delay65 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton22 = class extends icon22 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay65(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay65(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.icon.js?disableCache=0004
var fileIcon22 = class extends icon22 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton22();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.upload.js?disableCache=0004
var stream22 = class extends fileUpload22 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon22();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.list.js?disableCache=0004
var fileList22 = class extends panelRow22 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon22();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0004
var removeIcons22 = class extends icon22 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/page.js?disableCache=0004
var page22 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/image.js?disableCache=0004
var icon_id44 = 0;
var image22 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default44.createElement("img");
useCustomElement = true;
id = icon_id44++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0004
var previewImage22 = class extends image22 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0004
var imagePreviewWindow22 = class extends draggable43 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader22();
previewImage = new previewImage22();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0004
var fileChooserFileIcon22 = class extends icon22 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/checkbox.js?disableCache=0004
var checkbox22 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default44.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0004
var file22 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox22();
icon = new fileChooserFileIcon22();
label = new label43();
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0004
var fileChooserFiles22 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file22();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0004
var fileChooserSelectButton22 = class extends button22 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/fileChooser/fileChooser.js?disableCache=0004
var fileChooser22 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles22();
selectButton = new fileChooserSelectButton22();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/fileManager/fileManager.js?disableCache=0004
var fileManager22 = class extends page22 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header22("Upload");
fileupload = new stream22();
filesHeader = new header22("Files");
removeIcons = new removeIcons22();
fileList = new fileList22();
previewWindow = new imagePreviewWindow22();
fileChooser = new fileChooser22();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.move.js?disableCache=0004
var animationBlock148 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel148 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow22 = class extends panelRow22 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel148("Move");
animationBlock = new animationBlock148();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.rotate.js?disableCache=0004
var animationBlock149 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel149 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row127 = class extends panelRow22 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel149("Rotate");
animationBlock = new animationBlock149();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.color.js?disableCache=0004
var animationBlock150 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel150 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row128 = class extends panelRow22 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel150("Background color");
animationBlock = new animationBlock150();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.skewX.js?disableCache=0004
var animationBlock151 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel151 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row129 = class extends panelRow22 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel151("skewX");
animationBlock = new animationBlock151();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0004
var animationBlock152 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel152 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row130 = class extends panelRow22 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel152("Rotate + Move + Background");
animationBlock = new animationBlock152();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.reverse.js?disableCache=0004
var animationBlock153 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton22 = class extends button22 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton22 = class extends button22 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton22 = class extends button22 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton22 = class extends button22 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton22 = class extends button22 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel153 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons43 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton22();
pauseButton = new pauseButton22();
stopButton = new stopButton22();
forwardButton = new forwardButton22();
backwardButton = new backwardButton22();
flexDirection = "column";
};
var row131 = class extends panelRow22 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel153("Reverse");
buttons = new buttons43();
animationBlock = new animationBlock153();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animation.render.js?disableCache=0004
var animationBlock154 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel154 = class extends label43 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row132 = class extends panelRow22 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel154("RenderLoop");
animationBlock = new animationBlock154();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/animations/animations.js?disableCache=0004
var animations22 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow22();
rotateAnimation = new row127();
backgroundColor = new row128();
skewX = new row129();
rotateMoveColor = new row130();
reverse = new row131();
render = new row132();
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/examples/grids.js?disableCache=0004
var label44 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a22 = class extends input22 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b23 = class extends input22 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c22 = class extends input22 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d22 = class extends input22 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA22 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label44("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a22();
b = new b23();
c = new c22();
d = new d22();
};
var gridB22 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label44("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a22();
b = new b23();
c = new c22();
d = new d22();
};
var gridExample22 = class extends page22 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA22();
gridB = new gridB22();
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/header/user.userList.header.username.js?disableCache=0004
var userListHeaderUsername22 = class extends gridViewRowColumn22 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0004
var userListHeaderActions22 = class extends gridViewRowColumn22 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default22.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/header/user.userList.header.js?disableCache=0004
var userListHeader22 = class extends extender44(user23, gridViewTableRow22) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername22();
actions = new userListHeaderActions22();
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/user.userList.table.header.js?disableCache=0004
var userListTableHeader22 = class extends gridViewHeader22 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader22();
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/user.userList.table.body.js?disableCache=0004
var userListTableBody22 = class extends extender44(renderCollection24, gridViewTableHeader22) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE22(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default22.visitor, "READ");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/item/user.userList.item.username.js?disableCache=0004
var userListItemTitle22 = class extends extender44(username23, gridViewBodyColumn22) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0004
var deleteButton66 = class extends button22 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default22.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0004
var userListItemActions22 = class extends extender44(gridViewBodyColumn22, gridViewBodyColumn22) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton66();
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/item/user.userList.item.js?disableCache=0004
var userListItem22 = class extends extender44(user23, gridViewRow22) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle22();
actions = new userListItemActions22();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default22.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/user.userList.table.js?disableCache=0004
var userListTable22 = class extends gridView22 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader22();
body = new userListTableBody22(userListItem22, new collection26(user23));
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/search.js?disableCache=0004
var searchBar66 = class extends input22 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/userList/user.userList.page.js?disableCache=0004
var editPage22 = class extends page22 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header22("Users");
search = new searchBar66();
userTable = new userListTable22();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.username.js?disableCache=0004
var editUsername22 = class extends extender44(username23, input22) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.username.row.js?disableCache=0004
var usernameRow22 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label43("Username");
username = new editUsername22();
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/empty.js?disableCache=0004
var empty22 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/user.edit.button.js?disableCache=0004
var userEditButton22 = class extends button22 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/user.edit.button.row.js?disableCache=0004
var saveButtonRow22 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty22();
userEditButton = new userEditButton22();
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0004
var checkRenderCollection22 = class extends renderCollection24 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default22.admin, "WRITE");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
this.allow(user_group_permission_default22.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.checkbox.js?disableCache=0004
var customCheckbox43 = class extends checkbox22 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0004
var customCheckbox44 = class extends user23 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label43();
checkbox = new customCheckbox43();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0004
var checkboxRow22 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label43("Select users");
renderCollection = new checkRenderCollection22(customCheckbox44, new collection26(user23));
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.select.option.js?disableCache=0004
var customOption22 = class extends extender44(option22, user23) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0004
var customSelect44 = class extends renderCollection24 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default44.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default22.admin, "WRITE");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
this.allow(user_group_permission_default22.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.select.row.js?disableCache=0004
var optionRow22 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label43("Select user");
renderCollection = new customSelect44(customOption22, new collection26(user23));
};
// framework/cache/platforms/Ios/Tablet/Dark/user/edit/edit.user.js?disableCache=0004
var editUser22 = class extends extender44(user23, page22) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header22("Edit user");
usernameRow = new usernameRow22();
selectRow = new optionRow22();
checkboxRow = new checkboxRow22();
showSelectedUser = new customSelect44(customOption22, this.selectedUsers);
saveButtonRow = new saveButtonRow22();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default22.admin, "WRITE");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
this.allow(user_group_permission_default22.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signup/signup.username.js?disableCache=0004
var signUpUsername22 = class extends extender44(username23, input22) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/inputPassword.js?disableCache=0004
var inputPassword22 = class extends input22 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signup/signup.password.js?disableCache=0004
var signupPassword22 = class extends inputPassword22 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signup/signup.passwordCheck.js?disableCache=0004
var signupPasswordCheck22 = class extends inputPassword22 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0004
var cookieManager23 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default23 = new cookieManager23();
// framework/cache/platforms/Ios/Tablet/Dark/user/signup/signup.button.js?disableCache=0004
var signupButton22 = class extends button22 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signup/signup.customLabel.js?disableCache=0004
var customLabel44 = class extends label43 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signup/user.signup.js?disableCache=0004
var signup22 = class extends extender44(user23, page22) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default44.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header22("Signup");
// Children
userLabel = new customLabel44("Username");
username = new signUpUsername22();
passwordLabel = new customLabel44("Password");
password = new signupPassword22();
passwordAgainLabel = new customLabel44("Password again");
passwordAgain = new signupPasswordCheck22();
signUpButton = new signupButton22();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default22.visitor, "PROCESS");
this.allow(user_group_permission_default22.member, "PROCESS");
this.allow(user_group_permission_default22.admin, "PROCESS");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signin/signin.username.js?disableCache=0004
var signinUsername22 = class extends extender44(username23, input22) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/user.password.js?disableCache=0004
var password22 = class extends inputPassword22 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signin/signin.password.js?disableCache=0004
var signinPassword22 = class extends password22 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signin/signin.button.js?disableCache=0004
var signinFormButton22 = class extends button22 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0004
var unify23 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default23 = new unify23();
// framework/cache/platforms/Ios/Tablet/Dark/user/signin/signin.cancel.button.js?disableCache=0004
var cancelButton44 = class extends button22 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Ios/Tablet/Dark/user/signin/user.signin.js?disableCache=0004
var tussenObject22 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword22();
width = "100%";
};
var buttons44 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton44();
signinButton = new signinFormButton22();
};
var hint22 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin22 = class extends extender44(user23, page22) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint22();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default44.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header22("Signin");
//userLabel = new label("Username");
username = new signinUsername22();
//passwordLabel = new label("Password");
tussenObject = new tussenObject22();
buttons = new buttons44();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user23();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default23.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user23();
client2.user = visitor62;
client2.user.error = false;
unify_default23.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default23.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default22.visitor, "PROCESS");
this.allow(user_group_permission_default22.member, "PROCESS");
this.allow(user_group_permission_default22.admin, "PROCESS");
this.allow(user_group_permission_default22.member, "READ");
this.allow(user_group_permission_default22.admin, "READ");
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/rightSide/rightSide.js?disableCache=0872
var rightSide22 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages22();
signup = new signup22();
signin = new signin22();
settings = new settings22();
fileManager = new fileManager22();
animations = new animations22();
gridExample = new gridExample22();
userListPage = new editPage22();
editUser = new editUser22();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0872
var documentTool45 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object69 = new documentTool45();
var document_default45 = object69.getDocument();
// framework/unify/math/vector2.js?disableCache=0872
var vector266 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/flexbox.js?disableCache=0872
var flexbox44 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/window/frostedGlass.js?disableCache=0872
var frostedGlass44 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Ios/Tablet/Dark/elements/window/draggable.js?disableCache=0872
var vector267 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay66(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay66, "delay");
var draggable44 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector267(0, 0);
grabPosition = new vector267(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector267(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay66(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector267(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Tablet/Dark/demo/application.js
var application23 = class extends extender43(frostedGlass44, flexbox44, draggable44) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton22();
leftSide = new leftSide22();
rightSide = new rightSide22();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default45.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector266(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0518
function extender45(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender45, "extender");
// framework/unify/extender.js?disableCache=0498
function extender46(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender46, "extender");
// framework/cache/platforms/Ios/Pc/Light/elements/button.js?disableCache=0498
var button23 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/icon.js?disableCache=0498
var icon_id45 = 0;
var icon23 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id45++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Ios/Pc/Light/demo/minimizeButton.js?disableCache=0518
var minimizeButton23 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.js?disableCache=0498
var menuButton23 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.news.js?disableCache=0498
var newsButton23 = class extends menuButton23 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0498
var settingsButton67 = class extends menuButton23 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0498
var collection27 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0498
var datatype_default24 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0498
var documentTool46 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object70 = new documentTool46();
var document_default46 = object70.getDocument();
// framework/cache/platforms/Ios/Pc/Light/elements/option.js?disableCache=0498
var option23 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default46.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Ios/Pc/Light/user/group/user.group.js?disableCache=0498
var visitor46 = class extends option23 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member23 = class extends option23 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin45 = class extends option23 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups23 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member23();
admin = new admin45();
visitor = new visitor46();
};
// framework/cache/platforms/Ios/Pc/Light/user/group/user.group.permission.js?disableCache=0498
var user_group_permission_default23 = new groups23();
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0498
var signinPageButton23 = class extends menuButton23 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0498
var signinButton23 = class extends menuButton23 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0498
var visitor47 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager24 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor47();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default24 = new userManager24();
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0498
var signoutButton23 = class extends menuButton23 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default24.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default23.member, "PROCESS");
this.allow(user_group_permission_default23.admin, "PROCESS");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0498
var fileMangerButton23 = class extends menuButton23 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0498
var settingsButton68 = class extends menuButton23 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.users.js?disableCache=0498
var usersPageButton23 = class extends menuButton23 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default23.member, "PROCESS");
this.allow(user_group_permission_default23.admin, "PROCESS");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0498
var settingsButton69 = class extends menuButton23 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/header.js?disableCache=0498
var header23 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.header.js?disableCache=0498
var menuHeader23 = class extends header23 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Light/demo/leftSide/leftSide.js?disableCache=0518
var leftSide23 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader23();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton23();
settingsButton = new settingsButton67();
usersButton = new usersPageButton23();
signinButton = new signinPageButton23();
signoutButton = new signoutButton23();
signupButton = new signinButton23();
animationsButton = new settingsButton68();
gridButton = new settingsButton69();
fileManagerButton = new fileMangerButton23();
};
// framework/unify/table.js?disableCache=0498
var table25 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0498
var column23 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/news.title.js?disableCache=0498
var title67 = class extends column23 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/demo/news.body.js?disableCache=0498
var body45 = class extends column23 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/demo/news.price.js?disableCache=0498
var price23 = class extends column23 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default24.REAL;
};
// framework/cache/platforms/Ios/Pc/Light/user/user.username.js?disableCache=0498
var username24 = class extends column23 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0498
var tools25 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll24(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default24 = new tools25();
// framework/cache/platforms/Ios/Pc/Light/elements/input.js?disableCache=0498
var input23 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default46.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default46.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default46.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Ios/Pc/Light/user/user.salt.js?disableCache=0498
var salt24 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default24.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Light/user/user.hash.js?disableCache=0498
var hash24 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default24.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Light/user/user.js?disableCache=0498
var user24 = class _user extends table25 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username24();
salt = new salt24();
hash = new hash24();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups23();
selectedUsers = new collection27(_user);
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/comment.body.js?disableCache=0498
var body46 = class extends column23 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/comment.title.js?disableCache=0498
var title68 = class extends column23 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/comment.js?disableCache=0498
var comment24 = class extends table25 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user24();
title = new title68();
body = new body46();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Pc/Light/demo/news.js?disableCache=0498
var news23 = class extends table25 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title67();
body = new body45();
price = new price23();
comments = new collection27(comment24);
};
// framework/cache/platforms/Ios/Pc/Light/elements/tableCell.js?disableCache=0498
var tableCell23 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0498
var sortBy23 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.header.row.column.js?disableCache=0498
var gridViewRowColumn23 = class extends tableCell23 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy23();
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/header/news.list.header.body.js?disableCache=0498
var newsListHeaderBody23 = class extends gridViewRowColumn23 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/header/news.list.header.title.js?disableCache=0498
var newsListHeaderTitle23 = class extends gridViewRowColumn23 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/header/news.list.header.price.js?disableCache=0498
var newsListHeaderPrice23 = class extends gridViewRowColumn23 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/header/news.list.header.actions.js?disableCache=0498
var newsListHeaderActions23 = class extends gridViewRowColumn23 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default23.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.header.row.js?disableCache=0498
var gridViewTableRow23 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/header/news.list.header.js?disableCache=0498
var newsListHeader23 = class extends extender46(news23, gridViewTableRow23) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody23();
title = new newsListHeaderTitle23();
price = new newsListHeaderPrice23();
actions = new newsListHeaderActions23();
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.header.js?disableCache=0498
var gridViewHeader23 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/news.list.table.header.js?disableCache=0498
var newsListTableHeader23 = class extends gridViewHeader23 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader23();
};
// framework/unify/renderCollection.js?disableCache=0498
var renderCollection25 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.body.js?disableCache=0498
var gridViewTableHeader23 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0498
function OR23(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR23, "OR");
// framework/unify/sql/LIKE.js?disableCache=0498
function LIKE23(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE23, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0498
function GREATER_OR_EQUAL23(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL23, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0498
function SMALLER_OR_EQUAL23(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL23, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Ios/Pc/Light/demo/list/news.list.table.body.js?disableCache=0498
var newsListTableBody23 = class extends extender46(renderCollection25, gridViewTableHeader23) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR23(OR23(LIKE23(filter.title, searchTerm), LIKE23(filter.comments.body, searchTerm)), LIKE23(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL23(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL23(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default23.visitor, "READ");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.body.row.column.js?disableCache=0498
var gridViewBodyColumn23 = class extends tableCell23 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/item/news.list.item.body.js?disableCache=0498
var newsListItemBody23 = class extends extender46(body45, gridViewBodyColumn23) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/item/news.list.item.title.js?disableCache=0498
var newsListItemTitle23 = class extends extender46(title67, gridViewBodyColumn23) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/item/news.list.item.price.js?disableCache=0498
var newsListItemPrice23 = class extends extender46(price23, gridViewBodyColumn23) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0498
var deleteButton67 = class extends button23 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default23.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/item/news.list.item.actions.js?disableCache=0498
var newsListItemActions23 = class extends extender46(gridViewBodyColumn23, gridViewBodyColumn23) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton67();
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.body.row.js?disableCache=0498
var gridViewRow23 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/item/news.list.item.js?disableCache=0498
var newsListItem23 = class extends extender46(news23, gridViewRow23) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody23();
title = new newsListItemTitle23();
price = new newsListItemPrice23();
actions = new newsListItemActions23();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default23.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/gridView/gridView.js?disableCache=0498
var gridView23 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Light/demo/list/news.list.table.js?disableCache=0498
var newsListTable23 = class extends gridView23 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader23();
body = new newsListTableBody23(newsListItem23, new collection27(news23));
};
// framework/cache/platforms/Ios/Pc/Light/demo/edit/news.edit.title.js?disableCache=0498
var newsEditTitle23 = class extends extender46(input23, title67) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Ios/Pc/Light/elements/textarea.js?disableCache=0498
var textarea23 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default46.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/edit/news.edit.body.js?disableCache=0498
var newsPageBody45 = class extends extender46(body45, textarea23) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/edit/news.edit.button.js?disableCache=0498
var editButton45 = class extends button23 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/edit/news.edit.price.js?disableCache=0498
var newsPagePrice23 = class extends extender46(price23, input23) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/label.js?disableCache=0498
var label45 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Ios/Pc/Light/elements/label/left.js?disableCache=0498
var leftLabel23 = class extends label45 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Ios/Pc/Light/elements/panel.js?disableCache=0498
var panel23 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Ios/Pc/Light/elements/window/draggable.js?disableCache=0498
var vector268 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay67(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay67, "delay");
var draggable45 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector268(0, 0);
grabPosition = new vector268(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector268(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay67(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector268(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/panel/row.js?disableCache=0498
var panelRow23 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/window/header.js?disableCache=0498
var maximizeButton23 = class extends icon23 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton23 = class extends icon23 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl23 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton23();
maximizeButton = new maximizeButton23();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title69 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl23 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader23 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl23();
title = new title69();
rightControl = new rightControl23();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Ios/Pc/Light/demo/edit/news.edit.js?disableCache=0498
var newsBodyRow23 = class extends panelRow23 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel23("Message");
body = new newsPageBody45();
};
var newsTitleRow23 = class extends panelRow23 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel23("Title");
title = new newsEditTitle23();
};
var newsPriceRow23 = class extends panelRow23 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel23("Price");
price = new newsPagePrice23();
};
var cancelButton45 = class extends button23 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow23 = class extends panelRow23 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton45();
newsEditbutton = new editButton45();
};
var newsEdit23 = class extends extender46(news23, panel23, draggable45) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader23("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow23();
newsPriceRow = new newsPriceRow23();
newsBodyRow = new newsBodyRow23();
newsButtonRow = new newsButtonRow23();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
this.allow(user_group_permission_default23.visitor, "READ");
this.allow(user_group_permission_default23.member, "WRITE");
this.allow(user_group_permission_default23.admin, "WRITE");
this.allow(user_group_permission_default23.visitor, "WRITE");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsDialogButton.js?disableCache=0498
var newsDialogButton23 = class extends button23 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/search.input.js?disableCache=0498
var searchBar67 = class extends input23 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/select.js?disableCache=0498
var select23 = class extends renderCollection25 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default46.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default23.admin, "READ");
this.allow(user_group_permission_default23.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default46.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/search.select.js?disableCache=0498
var customSelect45 = class extends select23 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/search.widget.js?disableCache=0498
var searchWidget23 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar67();
select = new customSelect45();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0498
var paginationItem23 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsItemPage.pagination.js?disableCache=0498
var pagination23 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem23();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem23();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem23();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsItemPage.limit.js?disableCache=0498
var limit23 = class extends select23 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0498
var tableControl23 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label45("Select page:");
pagination = new pagination23();
limitLabel = new label45("Select items per page:");
limit = new limit23();
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsItemPage.js?disableCache=0498
var testbutton23 = class extends button23 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage23 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header23("News Items");
searchWidget = new searchWidget23();
newsListTable = new newsListTable23();
tableControl = new tableControl23();
createNews = new newsEdit23();
testbutton = new testbutton23();
newsDialogButton = new newsDialogButton23();
};
// framework/cache/platforms/Ios/Pc/Light/elements/flexbox.js?disableCache=0498
var flexbox45 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Pc/Light/demo/page/news.page.title.js?disableCache=0498
var newsPageTitle23 = class extends extender46(title67, flexbox45) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Ios/Pc/Light/demo/page/news.page.body.js?disableCache=0498
var newsPageBody46 = class extends extender46(flexbox45, body45) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/comments.messages.js?disableCache=0498
var commentsMessages23 = class extends renderCollection25 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR23(LIKE23(filter.body, this.value), LIKE23(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default23.visitor, "READ");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.saveButton.js?disableCache=0498
var saveEditButton23 = class extends button23 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.edit.title.js?disableCache=0498
var commentEditTitle45 = class extends title68 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.edit.body.js?disableCache=0498
var commentEditBody45 = class extends extender46(body46, flexbox45) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default46.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.userLabel.js?disableCache=0498
var userLabel45 = class extends label45 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0498
var deleteButton68 = class extends button23 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.editButton.js?disableCache=0498
var editButton46 = class extends button23 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.information.js?disableCache=0498
var information23 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton68();
_editButton = new editButton46();
_userLabel = new userLabel45();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/edit/comment.edit.js?disableCache=0498
var editComment23 = class extends comment24 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information23();
body = new commentEditBody45();
title = new commentEditTitle45();
saveButton = new saveEditButton23();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/create/comment.saveButton.js?disableCache=0498
var saveCommentButton23 = class extends button23 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/create/comment.create.body.js?disableCache=0498
var commentEditBody46 = class extends extender46(body46, textarea23) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Ios/Pc/Light/demo/comment/create/comment.create.js?disableCache=0498
var createComment23 = class extends comment24 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody46();
saveButton = new saveCommentButton23();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default23.member, "WRITE");
this.allow(user_group_permission_default23.admin, "WRITE");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/page/news.page.backButton.js?disableCache=0498
var backButton45 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/page/news.page.edit.button.js?disableCache=0498
var backButton46 = class extends button23 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/filler.js?disableCache=0498
var filler23 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Pc/Light/demo/page/search.comments.js?disableCache=0498
var searchBar68 = class extends input23 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/page/news.page.js?disableCache=0498
var testDiv23 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle23();
};
var newsPage23 = class extends news23 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton45();
_testDiv = new testDiv23();
body = new newsPageBody46();
editButton = new backButton46();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar68();
commentsMessages = new commentsMessages23(editComment23, this.comments);
createComment = new createComment23(this.comments);
filler = new filler23();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default23.member, "WRITE");
this.allow(user_group_permission_default23.admin, "WRITE");
this.allow(user_group_permission_default23.visitor, "WRITE");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
this.allow(user_group_permission_default23.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/newsPages.js?disableCache=0498
var newsPages23 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage23();
newsPage = new newsPage23();
newsEdit = new newsEdit23();
width = 1800;
};
// framework/cache/platforms/Ios/Pc/Light/elements/preloaders/simpleSpinner.js?disableCache=0498
var line23 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask23 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line23();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox23 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask23();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0498
var themaSelectorImage23 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0498
var selectLabel23 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/themeSelector.js?disableCache=0498
var themeSelector23 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage23();
selectLabel = new selectLabel23();
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0498
var themeOSSelectorItem23 = class extends themeSelector23 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default24.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0498
var osSelectorList23 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem23("Windows");
themeMacOS = new themeOSSelectorItem23("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default24.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/os.label.js?disableCache=0498
var osLabel23 = class extends label45 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/os.js?disableCache=0498
var os23 = class extends panelRow23 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel23("Os");
osSelector = new osSelectorList23();
spinner = new preloaderBox23();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0498
var themeTintSelector23 = class extends themeSelector23 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default24.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0498
var themeTintSelectors23 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector23("Light");
themeDark = new themeTintSelector23("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default24.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0498
var customLabel45 = class extends label45 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/rows/tint.js?disableCache=0498
var tint23 = class extends panelRow23 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel45("Appearance");
themeTintSelectors = new themeTintSelectors23();
spinner = new preloaderBox23();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/appearance/panel.js?disableCache=0498
var appearancePanel23 = class extends panel23 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os23();
tint = new tint23();
};
// framework/cache/platforms/Ios/Pc/Light/demo/pages/settings.js?disableCache=0498
var settings23 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header23("Appearance");
appearancePanel = new appearancePanel23();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0498
var Console24 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default24 = new Console24();
// framework/unify/promiseManager.js?disableCache=0498
var promiseManager24 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0498
var shared24 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object71 = new shared24();
var shared_default24 = object71.get();
// framework/cache/platforms/Ios/Pc/Light/elements/fileUpload.js?disableCache=0498
var fileUpload23 = class extends input23 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager24();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0498
var delay68 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton23 = class extends icon23 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay68(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay68(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.icon.js?disableCache=0498
var fileIcon23 = class extends icon23 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton23();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.upload.js?disableCache=0498
var stream23 = class extends fileUpload23 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon23();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.list.js?disableCache=0498
var fileList23 = class extends panelRow23 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon23();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0498
var removeIcons23 = class extends icon23 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/page.js?disableCache=0498
var page23 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Ios/Pc/Light/elements/image.js?disableCache=0498
var icon_id46 = 0;
var image23 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default46.createElement("img");
useCustomElement = true;
id = icon_id46++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0498
var previewImage23 = class extends image23 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0498
var imagePreviewWindow23 = class extends draggable45 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader23();
previewImage = new previewImage23();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0498
var fileChooserFileIcon23 = class extends icon23 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/checkbox.js?disableCache=0498
var checkbox23 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default46.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/fileChooser/fileChooser.file.js?disableCache=0498
var file23 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox23();
icon = new fileChooserFileIcon23();
label = new label45();
};
// framework/cache/platforms/Ios/Pc/Light/elements/fileChooser/fileChooser.files.js?disableCache=0498
var fileChooserFiles23 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file23();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0498
var fileChooserSelectButton23 = class extends button23 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/fileChooser/fileChooser.js?disableCache=0498
var fileChooser23 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles23();
selectButton = new fileChooserSelectButton23();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/fileManager/fileManager.js?disableCache=0498
var fileManager23 = class extends page23 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header23("Upload");
fileupload = new stream23();
filesHeader = new header23("Files");
removeIcons = new removeIcons23();
fileList = new fileList23();
previewWindow = new imagePreviewWindow23();
fileChooser = new fileChooser23();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.move.js?disableCache=0498
var animationBlock155 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel155 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow23 = class extends panelRow23 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel155("Move");
animationBlock = new animationBlock155();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.rotate.js?disableCache=0498
var animationBlock156 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel156 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row133 = class extends panelRow23 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel156("Rotate");
animationBlock = new animationBlock156();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.color.js?disableCache=0498
var animationBlock157 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel157 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row134 = class extends panelRow23 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel157("Background color");
animationBlock = new animationBlock157();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.skewX.js?disableCache=0498
var animationBlock158 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel158 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row135 = class extends panelRow23 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel158("skewX");
animationBlock = new animationBlock158();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0498
var animationBlock159 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel159 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row136 = class extends panelRow23 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel159("Rotate + Move + Background");
animationBlock = new animationBlock159();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.reverse.js?disableCache=0498
var animationBlock160 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton23 = class extends button23 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton23 = class extends button23 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton23 = class extends button23 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton23 = class extends button23 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton23 = class extends button23 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel160 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons45 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton23();
pauseButton = new pauseButton23();
stopButton = new stopButton23();
forwardButton = new forwardButton23();
backwardButton = new backwardButton23();
flexDirection = "column";
};
var row137 = class extends panelRow23 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel160("Reverse");
buttons = new buttons45();
animationBlock = new animationBlock160();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animation.render.js?disableCache=0498
var animationBlock161 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel161 = class extends label45 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row138 = class extends panelRow23 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel161("RenderLoop");
animationBlock = new animationBlock161();
};
// framework/cache/platforms/Ios/Pc/Light/demo/animations/animations.js?disableCache=0498
var animations23 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow23();
rotateAnimation = new row133();
backgroundColor = new row134();
skewX = new row135();
rotateMoveColor = new row136();
reverse = new row137();
render = new row138();
};
// framework/cache/platforms/Ios/Pc/Light/demo/examples/grids.js?disableCache=0498
var label46 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a23 = class extends input23 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b24 = class extends input23 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c23 = class extends input23 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d23 = class extends input23 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA23 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label46("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a23();
b = new b24();
c = new c23();
d = new d23();
};
var gridB23 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label46("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a23();
b = new b24();
c = new c23();
d = new d23();
};
var gridExample23 = class extends page23 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA23();
gridB = new gridB23();
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/header/user.userList.header.username.js?disableCache=0498
var userListHeaderUsername23 = class extends gridViewRowColumn23 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/header/user.userList.header.actions.js?disableCache=0498
var userListHeaderActions23 = class extends gridViewRowColumn23 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default23.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/header/user.userList.header.js?disableCache=0498
var userListHeader23 = class extends extender46(user24, gridViewTableRow23) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername23();
actions = new userListHeaderActions23();
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/user.userList.table.header.js?disableCache=0498
var userListTableHeader23 = class extends gridViewHeader23 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader23();
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/user.userList.table.body.js?disableCache=0498
var userListTableBody23 = class extends extender46(renderCollection25, gridViewTableHeader23) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE23(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default23.visitor, "READ");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/item/user.userList.item.username.js?disableCache=0498
var userListItemTitle23 = class extends extender46(username24, gridViewBodyColumn23) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0498
var deleteButton69 = class extends button23 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default23.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/item/user.userList.item.actions.js?disableCache=0498
var userListItemActions23 = class extends extender46(gridViewBodyColumn23, gridViewBodyColumn23) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton69();
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/item/user.userList.item.js?disableCache=0498
var userListItem23 = class extends extender46(user24, gridViewRow23) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle23();
actions = new userListItemActions23();
cursor = "pointer";
background;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default23.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/user.userList.table.js?disableCache=0498
var userListTable23 = class extends gridView23 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader23();
body = new userListTableBody23(userListItem23, new collection27(user24));
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/search.js?disableCache=0498
var searchBar69 = class extends input23 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Pc/Light/user/userList/user.userList.page.js?disableCache=0498
var editPage23 = class extends page23 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header23("Users");
search = new searchBar69();
userTable = new userListTable23();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.username.js?disableCache=0498
var editUsername23 = class extends extender46(username24, input23) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.username.row.js?disableCache=0498
var usernameRow23 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label45("Username");
username = new editUsername23();
};
// framework/cache/platforms/Ios/Pc/Light/elements/empty.js?disableCache=0498
var empty23 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/user.edit.button.js?disableCache=0498
var userEditButton23 = class extends button23 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/user.edit.button.row.js?disableCache=0498
var saveButtonRow23 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty23();
userEditButton = new userEditButton23();
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0498
var checkRenderCollection23 = class extends renderCollection25 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default23.admin, "WRITE");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
this.allow(user_group_permission_default23.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.checkbox.js?disableCache=0498
var customCheckbox45 = class extends checkbox23 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0498
var customCheckbox46 = class extends user24 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label45();
checkbox = new customCheckbox45();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.checkbox.row.js?disableCache=0498
var checkboxRow23 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label45("Select users");
renderCollection = new checkRenderCollection23(customCheckbox46, new collection27(user24));
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.select.option.js?disableCache=0498
var customOption23 = class extends extender46(option23, user24) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0498
var customSelect46 = class extends renderCollection25 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default46.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default23.admin, "WRITE");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
this.allow(user_group_permission_default23.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.select.row.js?disableCache=0498
var optionRow23 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label45("Select user");
renderCollection = new customSelect46(customOption23, new collection27(user24));
};
// framework/cache/platforms/Ios/Pc/Light/user/edit/edit.user.js?disableCache=0498
var editUser23 = class extends extender46(user24, page23) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header23("Edit user");
usernameRow = new usernameRow23();
selectRow = new optionRow23();
checkboxRow = new checkboxRow23();
showSelectedUser = new customSelect46(customOption23, this.selectedUsers);
saveButtonRow = new saveButtonRow23();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default23.admin, "WRITE");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
this.allow(user_group_permission_default23.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/signup/signup.username.js?disableCache=0498
var signUpUsername23 = class extends extender46(username24, input23) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Light/elements/inputPassword.js?disableCache=0498
var inputPassword23 = class extends input23 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Pc/Light/user/signup/signup.password.js?disableCache=0498
var signupPassword23 = class extends inputPassword23 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Ios/Pc/Light/user/signup/signup.passwordCheck.js?disableCache=0498
var signupPasswordCheck23 = class extends inputPassword23 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0498
var cookieManager24 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default24 = new cookieManager24();
// framework/cache/platforms/Ios/Pc/Light/user/signup/signup.button.js?disableCache=0498
var signupButton23 = class extends button23 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Ios/Pc/Light/user/signup/signup.customLabel.js?disableCache=0498
var customLabel46 = class extends label45 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Ios/Pc/Light/user/signup/user.signup.js?disableCache=0498
var signup23 = class extends extender46(user24, page23) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default46.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header23("Signup");
// Children
userLabel = new customLabel46("Username");
username = new signUpUsername23();
passwordLabel = new customLabel46("Password");
password = new signupPassword23();
passwordAgainLabel = new customLabel46("Password again");
passwordAgain = new signupPasswordCheck23();
signUpButton = new signupButton23();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default23.visitor, "PROCESS");
this.allow(user_group_permission_default23.member, "PROCESS");
this.allow(user_group_permission_default23.admin, "PROCESS");
}
};
// framework/cache/platforms/Ios/Pc/Light/user/signin/signin.username.js?disableCache=0498
var signinUsername23 = class extends extender46(username24, input23) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Ios/Pc/Light/user/user.password.js?disableCache=0498
var password23 = class extends inputPassword23 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Ios/Pc/Light/user/signin/signin.password.js?disableCache=0498
var signinPassword23 = class extends password23 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Ios/Pc/Light/user/signin/signin.button.js?disableCache=0498
var signinFormButton23 = class extends button23 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0498
var unify24 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default24 = new unify24();
// framework/cache/platforms/Ios/Pc/Light/user/signin/signin.cancel.button.js?disableCache=0498
var cancelButton46 = class extends button23 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Light/user/signin/user.signin.js?disableCache=0498
var tussenObject23 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword23();
width = "100%";
};
var buttons46 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton46();
signinButton = new signinFormButton23();
};
var hint23 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin23 = class extends extender46(user24, page23) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint23();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default46.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header23("Signin");
//userLabel = new label("Username");
username = new signinUsername23();
//passwordLabel = new label("Password");
tussenObject = new tussenObject23();
buttons = new buttons46();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user24();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default24.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user24();
client2.user = visitor62;
client2.user.error = false;
unify_default24.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default24.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default23.visitor, "PROCESS");
this.allow(user_group_permission_default23.member, "PROCESS");
this.allow(user_group_permission_default23.admin, "PROCESS");
this.allow(user_group_permission_default23.member, "READ");
this.allow(user_group_permission_default23.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/rightSide/rightSide.js?disableCache=0518
var rightSide23 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages23();
signup = new signup23();
signin = new signin23();
settings = new settings23();
fileManager = new fileManager23();
animations = new animations23();
gridExample = new gridExample23();
userListPage = new editPage23();
editUser = new editUser23();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0518
var documentTool47 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object72 = new documentTool47();
var document_default47 = object72.getDocument();
// framework/unify/math/vector2.js?disableCache=0518
var vector269 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Ios/Pc/Light/elements/flexbox.js?disableCache=0518
var flexbox46 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Pc/Light/elements/window/frostedGlass.js?disableCache=0518
var frostedGlass46 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Ios/Pc/Light/elements/window/draggable.js?disableCache=0518
var vector270 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay69(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay69, "delay");
var draggable46 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector270(0, 0);
grabPosition = new vector270(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector270(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay69(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector270(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Pc/Light/demo/application.js
var application24 = class extends extender45(frostedGlass46, flexbox46, draggable46) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton23();
leftSide = new leftSide23();
rightSide = new rightSide23();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default47.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector269(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0133
function extender47(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender47, "extender");
// framework/cache/platforms/Ios/Pc/Dark/elements/button.js?disableCache=0133
var button24 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/icon.js?disableCache=0133
var icon_id47 = 0;
var icon24 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id47++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/minimizeButton.js?disableCache=0879
var minimizeButton24 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.js?disableCache=0133
var menuButton24 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0133
var newsButton24 = class extends menuButton24 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0133
var settingsButton70 = class extends menuButton24 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0133
var collection28 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0133
var datatype_default25 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0133
var documentTool48 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object73 = new documentTool48();
var document_default48 = object73.getDocument();
// framework/cache/platforms/Ios/Pc/Dark/elements/option.js?disableCache=0133
var option24 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default48.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/group/user.group.js?disableCache=0133
var visitor48 = class extends option24 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member24 = class extends option24 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin47 = class extends option24 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups24 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member24();
admin = new admin47();
visitor = new visitor48();
};
// framework/cache/platforms/Ios/Pc/Dark/user/group/user.group.permission.js?disableCache=0133
var user_group_permission_default24 = new groups24();
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0133
var signinPageButton24 = class extends menuButton24 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0133
var signinButton24 = class extends menuButton24 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0133
var visitor49 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager25 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor49();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default25 = new userManager25();
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0133
var signoutButton24 = class extends menuButton24 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default25.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default24.member, "PROCESS");
this.allow(user_group_permission_default24.admin, "PROCESS");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0133
var fileMangerButton24 = class extends menuButton24 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0133
var settingsButton71 = class extends menuButton24 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0133
var usersPageButton24 = class extends menuButton24 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default24.member, "PROCESS");
this.allow(user_group_permission_default24.admin, "PROCESS");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0133
var settingsButton72 = class extends menuButton24 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/header.js?disableCache=0133
var header24 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.header.js?disableCache=0133
var menuHeader24 = class extends header24 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/leftSide/leftSide.js?disableCache=0879
var leftSide24 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader24();
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton24();
settingsButton = new settingsButton70();
usersButton = new usersPageButton24();
signinButton = new signinPageButton24();
signoutButton = new signoutButton24();
signupButton = new signinButton24();
animationsButton = new settingsButton71();
gridButton = new settingsButton72();
fileManagerButton = new fileMangerButton24();
};
// framework/unify/table.js?disableCache=0133
var table26 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0133
var column24 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/news.title.js?disableCache=0133
var title70 = class extends column24 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/news.body.js?disableCache=0133
var body47 = class extends column24 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/news.price.js?disableCache=0133
var price24 = class extends column24 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default25.REAL;
};
// framework/cache/platforms/Ios/Pc/Dark/user/user.username.js?disableCache=0133
var username25 = class extends column24 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0133
var tools26 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll25(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default25 = new tools26();
// framework/cache/platforms/Ios/Pc/Dark/elements/input.js?disableCache=0133
var input24 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default48.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default48.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default48.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/user.salt.js?disableCache=0133
var salt25 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default25.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Dark/user/user.hash.js?disableCache=0133
var hash25 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default25.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Dark/user/user.js?disableCache=0133
var user25 = class _user extends table26 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username25();
salt = new salt25();
hash = new hash25();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups24();
selectedUsers = new collection28(_user);
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/comment.body.js?disableCache=0133
var body48 = class extends column24 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/comment.title.js?disableCache=0133
var title71 = class extends column24 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/comment.js?disableCache=0133
var comment25 = class extends table26 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user25();
title = new title71();
body = new body48();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/news.js?disableCache=0133
var news24 = class extends table26 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title70();
body = new body47();
price = new price24();
comments = new collection28(comment25);
};
// framework/cache/platforms/Ios/Pc/Dark/elements/tableCell.js?disableCache=0133
var tableCell24 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0133
var sortBy24 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0133
var gridViewRowColumn24 = class extends tableCell24 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
sortBy = new sortBy24();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/header/news.list.header.body.js?disableCache=0133
var newsListHeaderBody24 = class extends gridViewRowColumn24 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/header/news.list.header.title.js?disableCache=0133
var newsListHeaderTitle24 = class extends gridViewRowColumn24 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/header/news.list.header.price.js?disableCache=0133
var newsListHeaderPrice24 = class extends gridViewRowColumn24 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/header/news.list.header.actions.js?disableCache=0133
var newsListHeaderActions24 = class extends gridViewRowColumn24 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default24.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.header.row.js?disableCache=0133
var gridViewTableRow24 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/header/news.list.header.js?disableCache=0133
var newsListHeader24 = class extends extender47(news24, gridViewTableRow24) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody24();
title = new newsListHeaderTitle24();
price = new newsListHeaderPrice24();
actions = new newsListHeaderActions24();
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.header.js?disableCache=0133
var gridViewHeader24 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/news.list.table.header.js?disableCache=0133
var newsListTableHeader24 = class extends gridViewHeader24 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader24();
};
// framework/unify/renderCollection.js?disableCache=0133
var renderCollection26 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.body.js?disableCache=0133
var gridViewTableHeader24 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
};
// framework/unify/sql/OR.js?disableCache=0133
function OR24(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR24, "OR");
// framework/unify/sql/LIKE.js?disableCache=0133
function LIKE24(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE24, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0133
function GREATER_OR_EQUAL24(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL24, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0133
function SMALLER_OR_EQUAL24(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL24, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Ios/Pc/Dark/demo/list/news.list.table.body.js?disableCache=0133
var newsListTableBody24 = class extends extender47(renderCollection26, gridViewTableHeader24) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR24(OR24(LIKE24(filter.title, searchTerm), LIKE24(filter.comments.body, searchTerm)), LIKE24(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL24(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL24(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default24.visitor, "READ");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0133
var gridViewBodyColumn24 = class extends tableCell24 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/item/news.list.item.body.js?disableCache=0133
var newsListItemBody24 = class extends extender47(body47, gridViewBodyColumn24) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/item/news.list.item.title.js?disableCache=0133
var newsListItemTitle24 = class extends extender47(title70, gridViewBodyColumn24) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/item/news.list.item.price.js?disableCache=0133
var newsListItemPrice24 = class extends extender47(price24, gridViewBodyColumn24) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0133
var deleteButton70 = class extends button24 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default24.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/item/news.list.item.actions.js?disableCache=0133
var newsListItemActions24 = class extends extender47(gridViewBodyColumn24, gridViewBodyColumn24) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton70();
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.body.row.js?disableCache=0133
var gridViewRow24 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/item/news.list.item.js?disableCache=0133
var newsListItem24 = class extends extender47(news24, gridViewRow24) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody24();
title = new newsListItemTitle24();
price = new newsListItemPrice24();
actions = new newsListItemActions24();
cursor = "pointer";
background;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default24.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/gridView/gridView.js?disableCache=0133
var gridView24 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/list/news.list.table.js?disableCache=0133
var newsListTable24 = class extends gridView24 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader24();
body = new newsListTableBody24(newsListItem24, new collection28(news24));
};
// framework/cache/platforms/Ios/Pc/Dark/demo/edit/news.edit.title.js?disableCache=0133
var newsEditTitle24 = class extends extender47(input24, title70) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Ios/Pc/Dark/elements/textarea.js?disableCache=0133
var textarea24 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default48.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/edit/news.edit.body.js?disableCache=0133
var newsPageBody47 = class extends extender47(body47, textarea24) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/edit/news.edit.button.js?disableCache=0133
var editButton47 = class extends button24 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/edit/news.edit.price.js?disableCache=0133
var newsPagePrice24 = class extends extender47(price24, input24) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/label.js?disableCache=0133
var label47 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
};
// framework/cache/platforms/Ios/Pc/Dark/elements/label/left.js?disableCache=0133
var leftLabel24 = class extends label47 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Ios/Pc/Dark/elements/panel.js?disableCache=0133
var panel24 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
};
// framework/cache/platforms/Ios/Pc/Dark/elements/window/draggable.js?disableCache=0133
var vector271 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay70(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay70, "delay");
var draggable47 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector271(0, 0);
grabPosition = new vector271(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector271(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay70(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector271(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/panel/row.js?disableCache=0133
var panelRow24 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/window/header.js?disableCache=0133
var maximizeButton24 = class extends icon24 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton24 = class extends icon24 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl24 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton24();
maximizeButton = new maximizeButton24();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title72 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl24 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader24 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl24();
title = new title72();
rightControl = new rightControl24();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/edit/news.edit.js?disableCache=0133
var newsBodyRow24 = class extends panelRow24 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel24("Message");
body = new newsPageBody47();
};
var newsTitleRow24 = class extends panelRow24 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel24("Title");
title = new newsEditTitle24();
};
var newsPriceRow24 = class extends panelRow24 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel24("Price");
price = new newsPagePrice24();
};
var cancelButton47 = class extends button24 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow24 = class extends panelRow24 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton47();
newsEditbutton = new editButton47();
};
var newsEdit24 = class extends extender47(news24, panel24, draggable47) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader24("News");
layers = 2;
zIndex = 1e3;
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow24();
newsPriceRow = new newsPriceRow24();
newsBodyRow = new newsBodyRow24();
newsButtonRow = new newsButtonRow24();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
this.allow(user_group_permission_default24.visitor, "READ");
this.allow(user_group_permission_default24.member, "WRITE");
this.allow(user_group_permission_default24.admin, "WRITE");
this.allow(user_group_permission_default24.visitor, "WRITE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsDialogButton.js?disableCache=0133
var newsDialogButton24 = class extends button24 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/search.input.js?disableCache=0133
var searchBar70 = class extends input24 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/select.js?disableCache=0133
var select24 = class extends renderCollection26 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default48.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default24.admin, "READ");
this.allow(user_group_permission_default24.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default48.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/search.select.js?disableCache=0133
var customSelect47 = class extends select24 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/search.widget.js?disableCache=0133
var searchWidget24 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar70();
select = new customSelect47();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0133
var paginationItem24 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0133
var pagination24 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem24();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem24();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem24();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsItemPage.limit.js?disableCache=0133
var limit24 = class extends select24 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0133
var tableControl24 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label47("Select page:");
pagination = new pagination24();
limitLabel = new label47("Select items per page:");
limit = new limit24();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsItemPage.js?disableCache=0133
var testbutton24 = class extends button24 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage24 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header24("News Items");
searchWidget = new searchWidget24();
newsListTable = new newsListTable24();
tableControl = new tableControl24();
createNews = new newsEdit24();
testbutton = new testbutton24();
newsDialogButton = new newsDialogButton24();
};
// framework/cache/platforms/Ios/Pc/Dark/elements/flexbox.js?disableCache=0133
var flexbox47 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/page/news.page.title.js?disableCache=0133
var newsPageTitle24 = class extends extender47(title70, flexbox47) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/page/news.page.body.js?disableCache=0133
var newsPageBody48 = class extends extender47(flexbox47, body47) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/comments.messages.js?disableCache=0133
var commentsMessages24 = class extends renderCollection26 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR24(LIKE24(filter.body, this.value), LIKE24(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default24.visitor, "READ");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0133
var saveEditButton24 = class extends button24 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0133
var commentEditTitle47 = class extends title71 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0133
var commentEditBody47 = class extends extender47(body48, flexbox47) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default48.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0133
var userLabel47 = class extends label47 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0133
var deleteButton71 = class extends button24 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.editButton.js?disableCache=0133
var editButton48 = class extends button24 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.information.js?disableCache=0133
var information24 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton71();
_editButton = new editButton48();
_userLabel = new userLabel47();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/edit/comment.edit.js?disableCache=0133
var editComment24 = class extends comment25 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information24();
body = new commentEditBody47();
title = new commentEditTitle47();
saveButton = new saveEditButton24();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/create/comment.saveButton.js?disableCache=0133
var saveCommentButton24 = class extends button24 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/create/comment.create.body.js?disableCache=0133
var commentEditBody48 = class extends extender47(body48, textarea24) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/comment/create/comment.create.js?disableCache=0133
var createComment24 = class extends comment25 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody48();
saveButton = new saveCommentButton24();
title = false;
author = this.user;
// bug destroys the permission system
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default24.member, "WRITE");
this.allow(user_group_permission_default24.admin, "WRITE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/page/news.page.backButton.js?disableCache=0133
var backButton47 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/page/news.page.edit.button.js?disableCache=0133
var backButton48 = class extends button24 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/filler.js?disableCache=0133
var filler24 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/page/search.comments.js?disableCache=0133
var searchBar71 = class extends input24 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/page/news.page.js?disableCache=0133
var testDiv24 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle24();
};
var newsPage24 = class extends news24 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
flexDirection = "column";
_backButton = new backButton47();
_testDiv = new testDiv24();
body = new newsPageBody48();
editButton = new backButton48();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar71();
commentsMessages = new commentsMessages24(editComment24, this.comments);
createComment = new createComment24(this.comments);
filler = new filler24();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default24.member, "WRITE");
this.allow(user_group_permission_default24.admin, "WRITE");
this.allow(user_group_permission_default24.visitor, "WRITE");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
this.allow(user_group_permission_default24.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/newsPages.js?disableCache=0133
var newsPages24 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage24();
newsPage = new newsPage24();
newsEdit = new newsEdit24();
width = 1800;
};
// framework/cache/platforms/Ios/Pc/Dark/elements/preloaders/simpleSpinner.js?disableCache=0133
var line24 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask24 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line24();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox24 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask24();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0133
var themaSelectorImage24 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0133
var selectLabel24 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/themeSelector.js?disableCache=0133
var themeSelector24 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage24();
selectLabel = new selectLabel24();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0133
var themeOSSelectorItem24 = class extends themeSelector24 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default25.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0133
var osSelectorList24 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem24("Windows");
themeMacOS = new themeOSSelectorItem24("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default25.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0133
var osLabel24 = class extends label47 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/os.js?disableCache=0133
var os24 = class extends panelRow24 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel24("Os");
osSelector = new osSelectorList24();
spinner = new preloaderBox24();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0133
var themeTintSelector24 = class extends themeSelector24 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default25.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0133
var themeTintSelectors24 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector24("Light");
themeDark = new themeTintSelector24("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default25.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0133
var customLabel47 = class extends label47 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/rows/tint.js?disableCache=0133
var tint24 = class extends panelRow24 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel47("Appearance");
themeTintSelectors = new themeTintSelectors24();
spinner = new preloaderBox24();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/appearance/panel.js?disableCache=0133
var appearancePanel24 = class extends panel24 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os24();
tint = new tint24();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/pages/settings.js?disableCache=0133
var settings24 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header24("Appearance");
appearancePanel = new appearancePanel24();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0133
var Console25 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default25 = new Console25();
// framework/unify/promiseManager.js?disableCache=0133
var promiseManager25 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0133
var shared25 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object74 = new shared25();
var shared_default25 = object74.get();
// framework/cache/platforms/Ios/Pc/Dark/elements/fileUpload.js?disableCache=0133
var fileUpload24 = class extends input24 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager25();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0133
var delay71 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton24 = class extends icon24 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay71(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay71(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.icon.js?disableCache=0133
var fileIcon24 = class extends icon24 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton24();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.upload.js?disableCache=0133
var stream24 = class extends fileUpload24 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon24();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.list.js?disableCache=0133
var fileList24 = class extends panelRow24 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon24();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0133
var removeIcons24 = class extends icon24 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/page.js?disableCache=0133
var page24 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Ios/Pc/Dark/elements/image.js?disableCache=0133
var icon_id48 = 0;
var image24 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default48.createElement("img");
useCustomElement = true;
id = icon_id48++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0133
var previewImage24 = class extends image24 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0133
var imagePreviewWindow24 = class extends draggable47 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader24();
previewImage = new previewImage24();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0133
var fileChooserFileIcon24 = class extends icon24 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/checkbox.js?disableCache=0133
var checkbox24 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default48.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0133
var file24 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox24();
icon = new fileChooserFileIcon24();
label = new label47();
};
// framework/cache/platforms/Ios/Pc/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0133
var fileChooserFiles24 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file24();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0133
var fileChooserSelectButton24 = class extends button24 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/fileChooser/fileChooser.js?disableCache=0133
var fileChooser24 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles24();
selectButton = new fileChooserSelectButton24();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/fileManager/fileManager.js?disableCache=0133
var fileManager24 = class extends page24 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header24("Upload");
fileupload = new stream24();
filesHeader = new header24("Files");
removeIcons = new removeIcons24();
fileList = new fileList24();
previewWindow = new imagePreviewWindow24();
fileChooser = new fileChooser24();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.move.js?disableCache=0133
var animationBlock162 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel162 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow24 = class extends panelRow24 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel162("Move");
animationBlock = new animationBlock162();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.rotate.js?disableCache=0133
var animationBlock163 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel163 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row139 = class extends panelRow24 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel163("Rotate");
animationBlock = new animationBlock163();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.color.js?disableCache=0133
var animationBlock164 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel164 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row140 = class extends panelRow24 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel164("Background color");
animationBlock = new animationBlock164();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.skewX.js?disableCache=0133
var animationBlock165 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel165 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row141 = class extends panelRow24 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel165("skewX");
animationBlock = new animationBlock165();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0133
var animationBlock166 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel166 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row142 = class extends panelRow24 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel166("Rotate + Move + Background");
animationBlock = new animationBlock166();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.reverse.js?disableCache=0133
var animationBlock167 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton24 = class extends button24 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton24 = class extends button24 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton24 = class extends button24 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton24 = class extends button24 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton24 = class extends button24 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel167 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons47 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton24();
pauseButton = new pauseButton24();
stopButton = new stopButton24();
forwardButton = new forwardButton24();
backwardButton = new backwardButton24();
flexDirection = "column";
};
var row143 = class extends panelRow24 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel167("Reverse");
buttons = new buttons47();
animationBlock = new animationBlock167();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animation.render.js?disableCache=0133
var animationBlock168 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel168 = class extends label47 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row144 = class extends panelRow24 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel168("RenderLoop");
animationBlock = new animationBlock168();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/animations/animations.js?disableCache=0133
var animations24 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow24();
rotateAnimation = new row139();
backgroundColor = new row140();
skewX = new row141();
rotateMoveColor = new row142();
reverse = new row143();
render = new row144();
};
// framework/cache/platforms/Ios/Pc/Dark/demo/examples/grids.js?disableCache=0133
var label48 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a24 = class extends input24 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b25 = class extends input24 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c24 = class extends input24 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d24 = class extends input24 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA24 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label48("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a24();
b = new b25();
c = new c24();
d = new d24();
};
var gridB24 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label48("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a24();
b = new b25();
c = new c24();
d = new d24();
};
var gridExample24 = class extends page24 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA24();
gridB = new gridB24();
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/header/user.userList.header.username.js?disableCache=0133
var userListHeaderUsername24 = class extends gridViewRowColumn24 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0133
var userListHeaderActions24 = class extends gridViewRowColumn24 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default24.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/header/user.userList.header.js?disableCache=0133
var userListHeader24 = class extends extender47(user25, gridViewTableRow24) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername24();
actions = new userListHeaderActions24();
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/user.userList.table.header.js?disableCache=0133
var userListTableHeader24 = class extends gridViewHeader24 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader24();
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/user.userList.table.body.js?disableCache=0133
var userListTableBody24 = class extends extender47(renderCollection26, gridViewTableHeader24) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE24(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default24.visitor, "READ");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/item/user.userList.item.username.js?disableCache=0133
var userListItemTitle24 = class extends extender47(username25, gridViewBodyColumn24) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0133
var deleteButton72 = class extends button24 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default24.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0133
var userListItemActions24 = class extends extender47(gridViewBodyColumn24, gridViewBodyColumn24) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton72();
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/item/user.userList.item.js?disableCache=0133
var userListItem24 = class extends extender47(user25, gridViewRow24) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle24();
actions = new userListItemActions24();
cursor = "pointer";
background;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default24.admin, "DELETE");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/user.userList.table.js?disableCache=0133
var userListTable24 = class extends gridView24 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader24();
body = new userListTableBody24(userListItem24, new collection28(user25));
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/search.js?disableCache=0133
var searchBar72 = class extends input24 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/userList/user.userList.page.js?disableCache=0133
var editPage24 = class extends page24 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header24("Users");
search = new searchBar72();
userTable = new userListTable24();
flexDirection = "column";
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.username.js?disableCache=0133
var editUsername24 = class extends extender47(username25, input24) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.username.row.js?disableCache=0133
var usernameRow24 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label47("Username");
username = new editUsername24();
};
// framework/cache/platforms/Ios/Pc/Dark/elements/empty.js?disableCache=0133
var empty24 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/user.edit.button.js?disableCache=0133
var userEditButton24 = class extends button24 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/user.edit.button.row.js?disableCache=0133
var saveButtonRow24 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty24();
userEditButton = new userEditButton24();
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0133
var checkRenderCollection24 = class extends renderCollection26 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default24.admin, "WRITE");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
this.allow(user_group_permission_default24.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.checkbox.js?disableCache=0133
var customCheckbox47 = class extends checkbox24 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0133
var customCheckbox48 = class extends user25 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label47();
checkbox = new customCheckbox47();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0133
var checkboxRow24 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label47("Select users");
renderCollection = new checkRenderCollection24(customCheckbox48, new collection28(user25));
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.select.option.js?disableCache=0133
var customOption24 = class extends extender47(option24, user25) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0133
var customSelect48 = class extends renderCollection26 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default48.createElement("select");
useCustomElement = true;
debug = true;
permission() {
this.allow(user_group_permission_default24.admin, "WRITE");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
this.allow(user_group_permission_default24.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.select.row.js?disableCache=0133
var optionRow24 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label47("Select user");
renderCollection = new customSelect48(customOption24, new collection28(user25));
};
// framework/cache/platforms/Ios/Pc/Dark/user/edit/edit.user.js?disableCache=0133
var editUser24 = class extends extender47(user25, page24) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header24("Edit user");
usernameRow = new usernameRow24();
selectRow = new optionRow24();
checkboxRow = new checkboxRow24();
showSelectedUser = new customSelect48(customOption24, this.selectedUsers);
saveButtonRow = new saveButtonRow24();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default24.admin, "WRITE");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
this.allow(user_group_permission_default24.visitor, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/signup/signup.username.js?disableCache=0133
var signUpUsername24 = class extends extender47(username25, input24) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Ios/Pc/Dark/elements/inputPassword.js?disableCache=0133
var inputPassword24 = class extends input24 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/signup/signup.password.js?disableCache=0133
var signupPassword24 = class extends inputPassword24 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Ios/Pc/Dark/user/signup/signup.passwordCheck.js?disableCache=0133
var signupPasswordCheck24 = class extends inputPassword24 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0133
var cookieManager25 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default25 = new cookieManager25();
// framework/cache/platforms/Ios/Pc/Dark/user/signup/signup.button.js?disableCache=0133
var signupButton24 = class extends button24 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/signup/signup.customLabel.js?disableCache=0133
var customLabel48 = class extends label47 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Ios/Pc/Dark/user/signup/user.signup.js?disableCache=0133
var signup24 = class extends extender47(user25, page24) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default48.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header24("Signup");
// Children
userLabel = new customLabel48("Username");
username = new signUpUsername24();
passwordLabel = new customLabel48("Password");
password = new signupPassword24();
passwordAgainLabel = new customLabel48("Password again");
passwordAgain = new signupPasswordCheck24();
signUpButton = new signupButton24();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default24.visitor, "PROCESS");
this.allow(user_group_permission_default24.member, "PROCESS");
this.allow(user_group_permission_default24.admin, "PROCESS");
}
};
// framework/cache/platforms/Ios/Pc/Dark/user/signin/signin.username.js?disableCache=0133
var signinUsername24 = class extends extender47(username25, input24) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Ios/Pc/Dark/user/user.password.js?disableCache=0133
var password24 = class extends inputPassword24 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Ios/Pc/Dark/user/signin/signin.password.js?disableCache=0133
var signinPassword24 = class extends password24 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Ios/Pc/Dark/user/signin/signin.button.js?disableCache=0133
var signinFormButton24 = class extends button24 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0133
var unify25 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default25 = new unify25();
// framework/cache/platforms/Ios/Pc/Dark/user/signin/signin.cancel.button.js?disableCache=0133
var cancelButton48 = class extends button24 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Ios/Pc/Dark/user/signin/user.signin.js?disableCache=0133
var tussenObject24 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword24();
width = "100%";
};
var buttons48 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton48();
signinButton = new signinFormButton24();
};
var hint24 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin24 = class extends extender47(user25, page24) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint24();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default48.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header24("Signin");
//userLabel = new label("Username");
username = new signinUsername24();
//passwordLabel = new label("Password");
tussenObject = new tussenObject24();
buttons = new buttons48();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user25();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default25.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user25();
client2.user = visitor62;
client2.user.error = false;
unify_default25.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default25.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default24.visitor, "PROCESS");
this.allow(user_group_permission_default24.member, "PROCESS");
this.allow(user_group_permission_default24.admin, "PROCESS");
this.allow(user_group_permission_default24.member, "READ");
this.allow(user_group_permission_default24.admin, "READ");
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/rightSide/rightSide.js?disableCache=0879
var rightSide24 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages24();
signup = new signup24();
signin = new signin24();
settings = new settings24();
fileManager = new fileManager24();
animations = new animations24();
gridExample = new gridExample24();
userListPage = new editPage24();
editUser = new editUser24();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/flexbox.js?disableCache=0879
var flexbox48 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
};
// framework/cache/platforms/Ios/Pc/Dark/elements/window/frostedGlass.js?disableCache=0879
var frostedGlass48 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Ios/Pc/Dark/elements/window/draggable.js?disableCache=0879
var vector272 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay72(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay72, "delay");
var draggable48 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector272(0, 0);
grabPosition = new vector272(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector272(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay72(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector272(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Ios/Pc/Dark/demo/application.js
var application25 = class extends extender7(frostedGlass48, flexbox48, draggable48) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton24();
leftSide = new leftSide24();
rightSide = new rightSide24();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default9.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector212(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0357
function extender48(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender48, "extender");
// framework/unify/extender.js?disableCache=0896
function extender49(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender49, "extender");
// framework/cache/platforms/Macos/Mobile/Light/elements/button.js?disableCache=0896
var button25 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 2;
margin = "4px 2px";
padding = "4px 20px";
color = "black";
background = "white";
border = "1px solid #e3e1e1";
fontSize = 14;
opaqueBackgroundColor = "white";
hoverBackgroundColor = "rgb(230 231 230 / 65%)";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/icon.js?disableCache=0896
var icon_id49 = 0;
var icon25 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id49++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/minimizeButton.js?disableCache=0357
var minimizeButton25 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.js?disableCache=0896
var menuButton25 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
borderRadius = 8;
padding = 10;
paddingLeft = 20;
fontSize = 16;
fontWeight = "600";
hightlightBackgroundColor = "rgb(189 193 221 / 22%)";
color = "#343434";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.news.js?disableCache=0896
var newsButton25 = class extends menuButton25 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
borderTopLeftRadius = 8;
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0896
var settingsButton73 = class extends menuButton25 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0896
var collection29 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0896
var datatype_default26 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0896
var documentTool49 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object75 = new documentTool49();
var document_default49 = object75.getDocument();
// framework/cache/platforms/Macos/Mobile/Light/elements/option.js?disableCache=0896
var option25 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default49.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/group/user.group.js?disableCache=0896
var visitor50 = class extends option25 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member25 = class extends option25 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin49 = class extends option25 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups25 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member25();
admin = new admin49();
visitor = new visitor50();
};
// framework/cache/platforms/Macos/Mobile/Light/user/group/user.group.permission.js?disableCache=0896
var user_group_permission_default25 = new groups25();
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0896
var signinPageButton25 = class extends menuButton25 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0896
var signinButton25 = class extends menuButton25 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0896
var visitor51 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager26 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor51();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default26 = new userManager26();
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0896
var signoutButton25 = class extends menuButton25 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default26.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default25.member, "PROCESS");
this.allow(user_group_permission_default25.admin, "PROCESS");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0896
var fileMangerButton25 = class extends menuButton25 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0896
var settingsButton74 = class extends menuButton25 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.users.js?disableCache=0896
var usersPageButton25 = class extends menuButton25 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default25.member, "PROCESS");
this.allow(user_group_permission_default25.admin, "PROCESS");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0896
var settingsButton75 = class extends menuButton25 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/header.js?disableCache=0896
var header25 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
margin = 6;
fontWeight = "bold";
fontSize = 16;
marginLeft = 4;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.header.js?disableCache=0896
var menuHeader25 = class extends header25 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/leftSide/leftSide.js?disableCache=0357
var leftSide25 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader25();
paddingTop = 40;
paddingLeft = 20;
background = "rgb(255 255 255 / 75%)";
color = "black";
fontWeight = "200";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton25();
settingsButton = new settingsButton73();
usersButton = new usersPageButton25();
signinButton = new signinPageButton25();
signoutButton = new signoutButton25();
signupButton = new signinButton25();
animationsButton = new settingsButton74();
gridButton = new settingsButton75();
fileManagerButton = new fileMangerButton25();
};
// framework/unify/table.js?disableCache=0896
var table27 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0896
var column25 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/news.title.js?disableCache=0896
var title73 = class extends column25 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/news.body.js?disableCache=0896
var body49 = class extends column25 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/news.price.js?disableCache=0896
var price25 = class extends column25 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default26.REAL;
};
// framework/cache/platforms/Macos/Mobile/Light/user/user.username.js?disableCache=0896
var username26 = class extends column25 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0896
var tools27 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll26(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default26 = new tools27();
// framework/cache/platforms/Macos/Mobile/Light/elements/input.js?disableCache=0896
var input25 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default49.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default49.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default49.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/user.salt.js?disableCache=0896
var salt26 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default26.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Light/user/user.hash.js?disableCache=0896
var hash26 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default26.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Light/user/user.js?disableCache=0896
var user26 = class _user extends table27 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username26();
salt = new salt26();
hash = new hash26();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups25();
selectedUsers = new collection29(_user);
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/comment.body.js?disableCache=0896
var body50 = class extends column25 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/comment.title.js?disableCache=0896
var title74 = class extends column25 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/comment.js?disableCache=0896
var comment26 = class extends table27 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user26();
title = new title74();
body = new body50();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/news.js?disableCache=0896
var news25 = class extends table27 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title73();
body = new body49();
price = new price25();
comments = new collection29(comment26);
};
// framework/cache/platforms/Macos/Mobile/Light/elements/tableCell.js?disableCache=0896
var tableCell25 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0896
var sortBy25 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.header.row.column.js?disableCache=0896
var gridViewRowColumn25 = class extends tableCell25 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
sortBy = new sortBy25();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/header/news.list.header.body.js?disableCache=0896
var newsListHeaderBody25 = class extends gridViewRowColumn25 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/header/news.list.header.title.js?disableCache=0896
var newsListHeaderTitle25 = class extends gridViewRowColumn25 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/header/news.list.header.price.js?disableCache=0896
var newsListHeaderPrice25 = class extends gridViewRowColumn25 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/header/news.list.header.actions.js?disableCache=0896
var newsListHeaderActions25 = class extends gridViewRowColumn25 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default25.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.header.row.js?disableCache=0896
var gridViewTableRow25 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/header/news.list.header.js?disableCache=0896
var newsListHeader25 = class extends extender49(news25, gridViewTableRow25) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody25();
title = new newsListHeaderTitle25();
price = new newsListHeaderPrice25();
actions = new newsListHeaderActions25();
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.header.js?disableCache=0896
var gridViewHeader25 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "rgb(0 0 0 / 3%)";
borderBottom = "1px solid rgb(0 0 0 / 5%)";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/news.list.table.header.js?disableCache=0896
var newsListTableHeader25 = class extends gridViewHeader25 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader25();
};
// framework/unify/renderCollection.js?disableCache=0896
var renderCollection27 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.body.js?disableCache=0896
var gridViewTableHeader25 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "rgb(0 0 0 / 1%)";
};
// framework/unify/sql/OR.js?disableCache=0896
function OR25(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR25, "OR");
// framework/unify/sql/LIKE.js?disableCache=0896
function LIKE25(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE25, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0896
function GREATER_OR_EQUAL25(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL25, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0896
function SMALLER_OR_EQUAL25(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL25, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Macos/Mobile/Light/demo/list/news.list.table.body.js?disableCache=0896
var newsListTableBody25 = class extends extender49(renderCollection27, gridViewTableHeader25) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR25(OR25(LIKE25(filter.title, searchTerm), LIKE25(filter.comments.body, searchTerm)), LIKE25(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL25(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL25(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default25.visitor, "READ");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.body.row.column.js?disableCache=0896
var gridViewBodyColumn25 = class extends tableCell25 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 12;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/item/news.list.item.body.js?disableCache=0896
var newsListItemBody25 = class extends extender49(body49, gridViewBodyColumn25) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/item/news.list.item.title.js?disableCache=0896
var newsListItemTitle25 = class extends extender49(title73, gridViewBodyColumn25) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/item/news.list.item.price.js?disableCache=0896
var newsListItemPrice25 = class extends extender49(price25, gridViewBodyColumn25) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0896
var deleteButton73 = class extends button25 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default25.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/item/news.list.item.actions.js?disableCache=0896
var newsListItemActions25 = class extends extender49(gridViewBodyColumn25, gridViewBodyColumn25) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton73();
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.body.row.js?disableCache=0896
var gridViewRow25 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/item/news.list.item.js?disableCache=0896
var newsListItem25 = class extends extender49(news25, gridViewRow25) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody25();
title = new newsListItemTitle25();
price = new newsListItemPrice25();
actions = new newsListItemActions25();
cursor = "pointer";
background;
fontSize = 14;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default25.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/gridView/gridView.js?disableCache=0896
var gridView25 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 2;
borderRadius = 4;
border = "1px solid rgb(0 0 0 / 5%)";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/list/news.list.table.js?disableCache=0896
var newsListTable25 = class extends gridView25 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader25();
body = new newsListTableBody25(newsListItem25, new collection29(news25));
marginLeft = 6;
width = "auto";
margin = "6px -2px 10px 6px";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/edit/news.edit.title.js?disableCache=0896
var newsEditTitle25 = class extends extender49(input25, title73) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Macos/Mobile/Light/elements/textarea.js?disableCache=0896
var textarea25 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
width = "70%";
background = "rgb(0 0 0 / 3%)";
background = "rgb(0 0 0 / 3%)";
color = "black";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default49.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/edit/news.edit.body.js?disableCache=0896
var newsPageBody49 = class extends extender49(body49, textarea25) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/edit/news.edit.button.js?disableCache=0896
var editButton49 = class extends button25 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/edit/news.edit.price.js?disableCache=0896
var newsPagePrice25 = class extends extender49(price25, input25) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/label.js?disableCache=0896
var label49 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
padding = 10;
paddingLeft = 0;
boxWidth = "100%";
};
// framework/cache/platforms/Macos/Mobile/Light/elements/label/left.js?disableCache=0896
var leftLabel25 = class extends label49 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Macos/Mobile/Light/elements/panel.js?disableCache=0896
var panel25 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
border = "1px solid rgb(241 241 241)";
background = "#fbfbfb";
borderRadius = 6;
marginRight = 20;
};
// framework/cache/platforms/Macos/Mobile/Light/elements/window/draggable.js?disableCache=0896
var vector273 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay73(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay73, "delay");
var draggable49 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector273(0, 0);
grabPosition = new vector273(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector273(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay73(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector273(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/panel/row.js?disableCache=0896
var panelRow25 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
var children = this.parent.getChildren();
var count = children.length - 1;
var lastChild = children[count];
lastChild.borderBottom = "none";
}
margin = "0 6px";
borderBottom = "1px solid rgb(241 241 241)";
};
// framework/cache/platforms/Macos/Mobile/Light/elements/window/header.js?disableCache=0896
var maximizeButton25 = class extends icon25 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton25 = class extends icon25 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl25 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton25();
maximizeButton = new maximizeButton25();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title75 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl25 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader25 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl25();
title = new title75();
rightControl = new rightControl25();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
borderTopLeftRadius = "4px";
borderTopRightRadius = "4px";
//padding = 10;
//paddingLeft = 0;
boxWidth = "100%";
borderBottom = "1px solid #f1f1f1";
background = "white";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/edit/news.edit.js?disableCache=0896
var newsBodyRow25 = class extends panelRow25 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel25("Message");
body = new newsPageBody49();
};
var newsTitleRow25 = class extends panelRow25 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel25("Title");
title = new newsEditTitle25();
};
var newsPriceRow25 = class extends panelRow25 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel25("Price");
price = new newsPagePrice25();
};
var cancelButton49 = class extends button25 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow25 = class extends panelRow25 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton49();
newsEditbutton = new editButton49();
};
var newsEdit25 = class extends extender49(news25, panel25, draggable49) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader25("News");
layers = 2;
zIndex = 1e3;
fontFamily = "sf-ui";
width = 600;
//background = "white";
background = "#fdfdfdbf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow25();
newsPriceRow = new newsPriceRow25();
newsBodyRow = new newsBodyRow25();
newsButtonRow = new newsButtonRow25();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
this.allow(user_group_permission_default25.visitor, "READ");
this.allow(user_group_permission_default25.member, "WRITE");
this.allow(user_group_permission_default25.admin, "WRITE");
this.allow(user_group_permission_default25.visitor, "WRITE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsDialogButton.js?disableCache=0896
var newsDialogButton25 = class extends button25 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/search.input.js?disableCache=0896
var searchBar73 = class extends input25 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/select.js?disableCache=0896
var select25 = class extends renderCollection27 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default49.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default25.admin, "READ");
this.allow(user_group_permission_default25.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default49.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/search.select.js?disableCache=0896
var customSelect49 = class extends select25 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/search.widget.js?disableCache=0896
var searchWidget25 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar73();
select = new customSelect49();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0896
var paginationItem25 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsItemPage.pagination.js?disableCache=0896
var pagination25 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem25();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem25();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem25();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsItemPage.limit.js?disableCache=0896
var limit25 = class extends select25 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0896
var tableControl25 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label49("Select page:");
pagination = new pagination25();
limitLabel = new label49("Select items per page:");
limit = new limit25();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsItemPage.js?disableCache=0896
var testbutton25 = class extends button25 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage25 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#ffffff";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header25("News Items");
searchWidget = new searchWidget25();
newsListTable = new newsListTable25();
tableControl = new tableControl25();
createNews = new newsEdit25();
testbutton = new testbutton25();
newsDialogButton = new newsDialogButton25();
};
// framework/cache/platforms/Macos/Mobile/Light/elements/flexbox.js?disableCache=0896
var flexbox49 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/page/news.page.title.js?disableCache=0896
var newsPageTitle25 = class extends extender49(title73, flexbox49) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
background = "#ffffff";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/page/news.page.body.js?disableCache=0896
var newsPageBody50 = class extends extender49(flexbox49, body49) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
background = "#ffffff";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/comments.messages.js?disableCache=0896
var commentsMessages25 = class extends renderCollection27 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR25(LIKE25(filter.body, this.value), LIKE25(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default25.visitor, "READ");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.saveButton.js?disableCache=0896
var saveEditButton25 = class extends button25 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.edit.title.js?disableCache=0896
var commentEditTitle49 = class extends title74 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.edit.body.js?disableCache=0896
var commentEditBody49 = class extends extender49(body50, flexbox49) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default49.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "white";
color = "black";
borderRadius = 12;
margin = 6;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.userLabel.js?disableCache=0896
var userLabel49 = class extends label49 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0896
var deleteButton74 = class extends button25 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.editButton.js?disableCache=0896
var editButton50 = class extends button25 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.information.js?disableCache=0896
var information25 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton74();
_editButton = new editButton50();
_userLabel = new userLabel49();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/edit/comment.edit.js?disableCache=0896
var editComment25 = class extends comment26 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information25();
body = new commentEditBody49();
title = new commentEditTitle49();
saveButton = new saveEditButton25();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/create/comment.saveButton.js?disableCache=0896
var saveCommentButton25 = class extends button25 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/create/comment.create.body.js?disableCache=0896
var commentEditBody50 = class extends extender49(body50, textarea25) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/comment/create/comment.create.js?disableCache=0896
var createComment25 = class extends comment26 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody50();
saveButton = new saveCommentButton25();
title = false;
author = this.user;
// bug destroys the permission system
background = "#ffffffd1";
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default25.member, "WRITE");
this.allow(user_group_permission_default25.admin, "WRITE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/page/news.page.backButton.js?disableCache=0896
var backButton49 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
boxBackground = "#ffffff";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/page/news.page.edit.button.js?disableCache=0896
var backButton50 = class extends button25 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/filler.js?disableCache=0896
var filler25 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
background = "#ffffff";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/page/search.comments.js?disableCache=0896
var searchBar74 = class extends input25 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/page/news.page.js?disableCache=0896
var testDiv25 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle25();
};
var newsPage25 = class extends news25 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "white";
flexDirection = "column";
_backButton = new backButton49();
_testDiv = new testDiv25();
body = new newsPageBody50();
editButton = new backButton50();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar74();
commentsMessages = new commentsMessages25(editComment25, this.comments);
createComment = new createComment25(this.comments);
filler = new filler25();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default25.member, "WRITE");
this.allow(user_group_permission_default25.admin, "WRITE");
this.allow(user_group_permission_default25.visitor, "WRITE");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
this.allow(user_group_permission_default25.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/newsPages.js?disableCache=0896
var newsPages25 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage25();
newsPage = new newsPage25();
newsEdit = new newsEdit25();
width = 1800;
};
// framework/cache/platforms/Macos/Mobile/Light/elements/preloaders/simpleSpinner.js?disableCache=0896
var line25 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask25 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line25();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox25 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask25();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0896
var themaSelectorImage25 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0896
var selectLabel25 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/themeSelector.js?disableCache=0896
var themeSelector25 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage25();
selectLabel = new selectLabel25();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0896
var themeOSSelectorItem25 = class extends themeSelector25 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default26.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0896
var osSelectorList25 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem25("Windows");
themeMacOS = new themeOSSelectorItem25("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default26.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/os.label.js?disableCache=0896
var osLabel25 = class extends label49 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/os.js?disableCache=0896
var os25 = class extends panelRow25 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel25("Os");
osSelector = new osSelectorList25();
spinner = new preloaderBox25();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0896
var themeTintSelector25 = class extends themeSelector25 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default26.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0896
var themeTintSelectors25 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector25("Light");
themeDark = new themeTintSelector25("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default26.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0896
var customLabel49 = class extends label49 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/rows/tint.js?disableCache=0896
var tint25 = class extends panelRow25 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel49("Appearance");
themeTintSelectors = new themeTintSelectors25();
spinner = new preloaderBox25();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/appearance/panel.js?disableCache=0896
var appearancePanel25 = class extends panel25 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os25();
tint = new tint25();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/pages/settings.js?disableCache=0896
var settings25 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#fdfdfd";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header25("Appearance");
appearancePanel = new appearancePanel25();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0896
var Console26 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default26 = new Console26();
// framework/unify/promiseManager.js?disableCache=0896
var promiseManager26 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0896
var shared26 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object76 = new shared26();
var shared_default26 = object76.get();
// framework/cache/platforms/Macos/Mobile/Light/elements/fileUpload.js?disableCache=0896
var fileUpload25 = class extends input25 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager26();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0896
var delay74 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton25 = class extends icon25 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay74(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay74(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.icon.js?disableCache=0896
var fileIcon25 = class extends icon25 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton25();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.upload.js?disableCache=0896
var stream25 = class extends fileUpload25 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon25();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.list.js?disableCache=0896
var fileList25 = class extends panelRow25 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon25();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0896
var removeIcons25 = class extends icon25 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/page.js?disableCache=0896
var page25 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#fdfdfd";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Macos/Mobile/Light/elements/image.js?disableCache=0896
var icon_id50 = 0;
var image25 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default49.createElement("img");
useCustomElement = true;
id = icon_id50++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0896
var previewImage25 = class extends image25 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0896
var imagePreviewWindow25 = class extends draggable49 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader25();
previewImage = new previewImage25();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0896
var fileChooserFileIcon25 = class extends icon25 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/checkbox.js?disableCache=0896
var checkbox25 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default49.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/fileChooser/fileChooser.file.js?disableCache=0896
var file25 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox25();
icon = new fileChooserFileIcon25();
label = new label49();
};
// framework/cache/platforms/Macos/Mobile/Light/elements/fileChooser/fileChooser.files.js?disableCache=0896
var fileChooserFiles25 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file25();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0896
var fileChooserSelectButton25 = class extends button25 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/fileChooser/fileChooser.js?disableCache=0896
var fileChooser25 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles25();
selectButton = new fileChooserSelectButton25();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/fileManager/fileManager.js?disableCache=0896
var fileManager25 = class extends page25 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header25("Upload");
fileupload = new stream25();
filesHeader = new header25("Files");
removeIcons = new removeIcons25();
fileList = new fileList25();
previewWindow = new imagePreviewWindow25();
fileChooser = new fileChooser25();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.move.js?disableCache=0896
var animationBlock169 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel169 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow25 = class extends panelRow25 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel169("Move");
animationBlock = new animationBlock169();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.rotate.js?disableCache=0896
var animationBlock170 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel170 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row145 = class extends panelRow25 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel170("Rotate");
animationBlock = new animationBlock170();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.color.js?disableCache=0896
var animationBlock171 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel171 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row146 = class extends panelRow25 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel171("Background color");
animationBlock = new animationBlock171();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.skewX.js?disableCache=0896
var animationBlock172 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel172 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row147 = class extends panelRow25 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel172("skewX");
animationBlock = new animationBlock172();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0896
var animationBlock173 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel173 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row148 = class extends panelRow25 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel173("Rotate + Move + Background");
animationBlock = new animationBlock173();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.reverse.js?disableCache=0896
var animationBlock174 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton25 = class extends button25 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton25 = class extends button25 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton25 = class extends button25 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton25 = class extends button25 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton25 = class extends button25 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel174 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons49 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton25();
pauseButton = new pauseButton25();
stopButton = new stopButton25();
forwardButton = new forwardButton25();
backwardButton = new backwardButton25();
flexDirection = "column";
};
var row149 = class extends panelRow25 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel174("Reverse");
buttons = new buttons49();
animationBlock = new animationBlock174();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animation.render.js?disableCache=0896
var animationBlock175 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel175 = class extends label49 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row150 = class extends panelRow25 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel175("RenderLoop");
animationBlock = new animationBlock175();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/animations/animations.js?disableCache=0896
var animations25 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#fdfdfd";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow25();
rotateAnimation = new row145();
backgroundColor = new row146();
skewX = new row147();
rotateMoveColor = new row148();
reverse = new row149();
render = new row150();
};
// framework/cache/platforms/Macos/Mobile/Light/demo/examples/grids.js?disableCache=0896
var label50 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a25 = class extends input25 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b26 = class extends input25 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c25 = class extends input25 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d25 = class extends input25 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA25 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label50("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a25();
b = new b26();
c = new c25();
d = new d25();
};
var gridB25 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label50("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a25();
b = new b26();
c = new c25();
d = new d25();
};
var gridExample25 = class extends page25 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA25();
gridB = new gridB25();
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/header/user.userList.header.username.js?disableCache=0896
var userListHeaderUsername25 = class extends gridViewRowColumn25 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/header/user.userList.header.actions.js?disableCache=0896
var userListHeaderActions25 = class extends gridViewRowColumn25 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default25.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/header/user.userList.header.js?disableCache=0896
var userListHeader25 = class extends extender49(user26, gridViewTableRow25) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername25();
actions = new userListHeaderActions25();
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/user.userList.table.header.js?disableCache=0896
var userListTableHeader25 = class extends gridViewHeader25 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader25();
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/user.userList.table.body.js?disableCache=0896
var userListTableBody25 = class extends extender49(renderCollection27, gridViewTableHeader25) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE25(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default25.visitor, "READ");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/item/user.userList.item.username.js?disableCache=0896
var userListItemTitle25 = class extends extender49(username26, gridViewBodyColumn25) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0896
var deleteButton75 = class extends button25 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default25.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/item/user.userList.item.actions.js?disableCache=0896
var userListItemActions25 = class extends extender49(gridViewBodyColumn25, gridViewBodyColumn25) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton75();
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/item/user.userList.item.js?disableCache=0896
var userListItem25 = class extends extender49(user26, gridViewRow25) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle25();
actions = new userListItemActions25();
cursor = "pointer";
background;
fontSize = 14;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default25.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/user.userList.table.js?disableCache=0896
var userListTable25 = class extends gridView25 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader25();
body = new userListTableBody25(userListItem25, new collection29(user26));
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/search.js?disableCache=0896
var searchBar75 = class extends input25 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/userList/user.userList.page.js?disableCache=0896
var editPage25 = class extends page25 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header25("Users");
search = new searchBar75();
userTable = new userListTable25();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.username.js?disableCache=0896
var editUsername25 = class extends extender49(username26, input25) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.username.row.js?disableCache=0896
var usernameRow25 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label49("Username");
username = new editUsername25();
};
// framework/cache/platforms/Macos/Mobile/Light/elements/empty.js?disableCache=0896
var empty25 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/user.edit.button.js?disableCache=0896
var userEditButton25 = class extends button25 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/user.edit.button.row.js?disableCache=0896
var saveButtonRow25 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty25();
userEditButton = new userEditButton25();
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0896
var checkRenderCollection25 = class extends renderCollection27 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default25.admin, "WRITE");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
this.allow(user_group_permission_default25.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.checkbox.js?disableCache=0896
var customCheckbox49 = class extends checkbox25 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0896
var customCheckbox50 = class extends user26 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label49();
checkbox = new customCheckbox49();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.checkbox.row.js?disableCache=0896
var checkboxRow25 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label49("Select users");
renderCollection = new checkRenderCollection25(customCheckbox50, new collection29(user26));
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.select.option.js?disableCache=0896
var customOption25 = class extends extender49(option25, user26) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0896
var customSelect50 = class extends renderCollection27 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default49.createElement("select");
useCustomElement = true;
debug = true;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
permission() {
this.allow(user_group_permission_default25.admin, "WRITE");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
this.allow(user_group_permission_default25.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.select.row.js?disableCache=0896
var optionRow25 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label49("Select user");
renderCollection = new customSelect50(customOption25, new collection29(user26));
};
// framework/cache/platforms/Macos/Mobile/Light/user/edit/edit.user.js?disableCache=0896
var editUser25 = class extends extender49(user26, page25) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header25("Edit user");
usernameRow = new usernameRow25();
selectRow = new optionRow25();
checkboxRow = new checkboxRow25();
showSelectedUser = new customSelect50(customOption25, this.selectedUsers);
saveButtonRow = new saveButtonRow25();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default25.admin, "WRITE");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
this.allow(user_group_permission_default25.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/signup/signup.username.js?disableCache=0896
var signUpUsername25 = class extends extender49(username26, input25) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Light/elements/inputPassword.js?disableCache=0896
var inputPassword25 = class extends input25 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/signup/signup.password.js?disableCache=0896
var signupPassword25 = class extends inputPassword25 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Macos/Mobile/Light/user/signup/signup.passwordCheck.js?disableCache=0896
var signupPasswordCheck25 = class extends inputPassword25 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0896
var cookieManager26 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default26 = new cookieManager26();
// framework/cache/platforms/Macos/Mobile/Light/user/signup/signup.button.js?disableCache=0896
var signupButton25 = class extends button25 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/signup/signup.customLabel.js?disableCache=0896
var customLabel50 = class extends label49 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Macos/Mobile/Light/user/signup/user.signup.js?disableCache=0896
var signup25 = class extends extender49(user26, page25) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default49.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header25("Signup");
// Children
userLabel = new customLabel50("Username");
username = new signUpUsername25();
passwordLabel = new customLabel50("Password");
password = new signupPassword25();
passwordAgainLabel = new customLabel50("Password again");
passwordAgain = new signupPasswordCheck25();
signUpButton = new signupButton25();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default25.visitor, "PROCESS");
this.allow(user_group_permission_default25.member, "PROCESS");
this.allow(user_group_permission_default25.admin, "PROCESS");
}
};
// framework/cache/platforms/Macos/Mobile/Light/user/signin/signin.username.js?disableCache=0896
var signinUsername25 = class extends extender49(username26, input25) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Macos/Mobile/Light/user/user.password.js?disableCache=0896
var password25 = class extends inputPassword25 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Macos/Mobile/Light/user/signin/signin.password.js?disableCache=0896
var signinPassword25 = class extends password25 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Macos/Mobile/Light/user/signin/signin.button.js?disableCache=0896
var signinFormButton25 = class extends button25 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0896
var unify26 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default26 = new unify26();
// framework/cache/platforms/Macos/Mobile/Light/user/signin/signin.cancel.button.js?disableCache=0896
var cancelButton50 = class extends button25 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Light/user/signin/user.signin.js?disableCache=0896
var tussenObject25 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword25();
width = "100%";
};
var buttons50 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton50();
signinButton = new signinFormButton25();
};
var hint25 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin25 = class extends extender49(user26, page25) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint25();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default49.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header25("Signin");
//userLabel = new label("Username");
username = new signinUsername25();
//passwordLabel = new label("Password");
tussenObject = new tussenObject25();
buttons = new buttons50();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user26();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default26.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user26();
client2.user = visitor62;
client2.user.error = false;
unify_default26.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default26.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default25.visitor, "PROCESS");
this.allow(user_group_permission_default25.member, "PROCESS");
this.allow(user_group_permission_default25.admin, "PROCESS");
this.allow(user_group_permission_default25.member, "READ");
this.allow(user_group_permission_default25.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/rightSide/rightSide.js?disableCache=0357
var rightSide25 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages25();
signup = new signup25();
signin = new signin25();
settings = new settings25();
fileManager = new fileManager25();
animations = new animations25();
gridExample = new gridExample25();
userListPage = new editPage25();
editUser = new editUser25();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
boxShadow = "-1px 0px 1px 0px #00000008";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0357
var documentTool50 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object77 = new documentTool50();
var document_default50 = object77.getDocument();
// framework/unify/math/vector2.js?disableCache=0357
var vector274 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Macos/Mobile/Light/elements/flexbox.js?disableCache=0357
var flexbox50 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Macos/Mobile/Light/elements/window/frostedGlass.js?disableCache=0357
var frostedGlass50 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Macos/Mobile/Light/elements/window/draggable.js?disableCache=0357
var vector275 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay75(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay75, "delay");
var draggable50 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector275(0, 0);
grabPosition = new vector275(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector275(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay75(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector275(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Mobile/Light/demo/application.js
var application26 = class extends extender48(frostedGlass50, flexbox50, draggable50) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton25();
leftSide = new leftSide25();
rightSide = new rightSide25();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "Inter";
//boxBackgroundImage = "url('/assets/images/wallpapers/ventura/light/light.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default50.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector274(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0794
function extender50(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender50, "extender");
// framework/unify/extender.js?disableCache=0116
function extender51(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender51, "extender");
// framework/cache/platforms/Macos/Mobile/Dark/elements/button.js?disableCache=0116
var button26 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 2;
margin = "4px 2px";
padding = "4px 20px";
color = "white";
background = "#282828";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#282828";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/icon.js?disableCache=0116
var icon_id51 = 0;
var icon26 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id51++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/minimizeButton.js?disableCache=0794
var minimizeButton26 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.js?disableCache=0116
var menuButton26 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
borderRadius = 8;
padding = 10;
paddingLeft = 20;
fontSize = 16;
fontWeight = "600";
hightlightBackgroundColor = "rgb(189 193 221 / 22%)";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0116
var newsButton26 = class extends menuButton26 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
borderTopLeftRadius = 8;
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0116
var settingsButton76 = class extends menuButton26 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0116
var collection30 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0116
var datatype_default27 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0116
var documentTool51 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object78 = new documentTool51();
var document_default51 = object78.getDocument();
// framework/cache/platforms/Macos/Mobile/Dark/elements/option.js?disableCache=0116
var option26 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default51.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/group/user.group.js?disableCache=0116
var visitor52 = class extends option26 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member26 = class extends option26 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin51 = class extends option26 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups26 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member26();
admin = new admin51();
visitor = new visitor52();
};
// framework/cache/platforms/Macos/Mobile/Dark/user/group/user.group.permission.js?disableCache=0116
var user_group_permission_default26 = new groups26();
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0116
var signinPageButton26 = class extends menuButton26 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0116
var signinButton26 = class extends menuButton26 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0116
var visitor53 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager27 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor53();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default27 = new userManager27();
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0116
var signoutButton26 = class extends menuButton26 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default27.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default26.member, "PROCESS");
this.allow(user_group_permission_default26.admin, "PROCESS");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0116
var fileMangerButton26 = class extends menuButton26 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0116
var settingsButton77 = class extends menuButton26 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0116
var usersPageButton26 = class extends menuButton26 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default26.member, "PROCESS");
this.allow(user_group_permission_default26.admin, "PROCESS");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0116
var settingsButton78 = class extends menuButton26 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/header.js?disableCache=0116
var header26 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
margin = 6;
fontWeight = "bold";
fontSize = 16;
marginLeft = 4;
color = "white";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.header.js?disableCache=0116
var menuHeader26 = class extends header26 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/leftSide/leftSide.js?disableCache=0794
var leftSide26 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader26();
paddingTop = 40;
paddingLeft = 20;
background = "rgb(40 22 22 / 75%)";
color = "white";
borderRight = "1px solid black";
fontWeight = "bold";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton26();
settingsButton = new settingsButton76();
usersButton = new usersPageButton26();
signinButton = new signinPageButton26();
signoutButton = new signoutButton26();
signupButton = new signinButton26();
animationsButton = new settingsButton77();
gridButton = new settingsButton78();
fileManagerButton = new fileMangerButton26();
};
// framework/unify/table.js?disableCache=0116
var table28 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0116
var column26 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/news.title.js?disableCache=0116
var title76 = class extends column26 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/news.body.js?disableCache=0116
var body51 = class extends column26 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/news.price.js?disableCache=0116
var price26 = class extends column26 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default27.REAL;
};
// framework/cache/platforms/Macos/Mobile/Dark/user/user.username.js?disableCache=0116
var username27 = class extends column26 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0116
var tools28 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll27(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default27 = new tools28();
// framework/cache/platforms/Macos/Mobile/Dark/elements/input.js?disableCache=0116
var input26 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default51.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default51.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default51.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/user.salt.js?disableCache=0116
var salt27 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default27.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/user.hash.js?disableCache=0116
var hash27 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default27.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/user.js?disableCache=0116
var user27 = class _user extends table28 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username27();
salt = new salt27();
hash = new hash27();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups26();
selectedUsers = new collection30(_user);
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/comment.body.js?disableCache=0116
var body52 = class extends column26 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/comment.title.js?disableCache=0116
var title77 = class extends column26 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/comment.js?disableCache=0116
var comment27 = class extends table28 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user27();
title = new title77();
body = new body52();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/news.js?disableCache=0116
var news26 = class extends table28 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title76();
body = new body51();
price = new price26();
comments = new collection30(comment27);
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/tableCell.js?disableCache=0116
var tableCell26 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0116
var sortBy26 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0116
var gridViewRowColumn26 = class extends tableCell26 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
sortBy = new sortBy26();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/header/news.list.header.body.js?disableCache=0116
var newsListHeaderBody26 = class extends gridViewRowColumn26 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/header/news.list.header.title.js?disableCache=0116
var newsListHeaderTitle26 = class extends gridViewRowColumn26 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/header/news.list.header.price.js?disableCache=0116
var newsListHeaderPrice26 = class extends gridViewRowColumn26 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/header/news.list.header.actions.js?disableCache=0116
var newsListHeaderActions26 = class extends gridViewRowColumn26 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default26.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.header.row.js?disableCache=0116
var gridViewTableRow26 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/header/news.list.header.js?disableCache=0116
var newsListHeader26 = class extends extender51(news26, gridViewTableRow26) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody26();
title = new newsListHeaderTitle26();
price = new newsListHeaderPrice26();
actions = new newsListHeaderActions26();
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.header.js?disableCache=0116
var gridViewHeader26 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "#393939";
borderBottom = "2px solid #3f3f3f";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/news.list.table.header.js?disableCache=0116
var newsListTableHeader26 = class extends gridViewHeader26 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader26();
};
// framework/unify/renderCollection.js?disableCache=0116
var renderCollection28 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.body.js?disableCache=0116
var gridViewTableHeader26 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "#2c2c2c";
fontWeight = "bold";
};
// framework/unify/sql/OR.js?disableCache=0116
function OR26(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR26, "OR");
// framework/unify/sql/LIKE.js?disableCache=0116
function LIKE26(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE26, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0116
function GREATER_OR_EQUAL26(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL26, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0116
function SMALLER_OR_EQUAL26(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL26, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/news.list.table.body.js?disableCache=0116
var newsListTableBody26 = class extends extender51(renderCollection28, gridViewTableHeader26) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR26(OR26(LIKE26(filter.title, searchTerm), LIKE26(filter.comments.body, searchTerm)), LIKE26(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL26(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL26(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default26.visitor, "READ");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0116
var gridViewBodyColumn26 = class extends tableCell26 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 12;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/item/news.list.item.body.js?disableCache=0116
var newsListItemBody26 = class extends extender51(body51, gridViewBodyColumn26) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/item/news.list.item.title.js?disableCache=0116
var newsListItemTitle26 = class extends extender51(title76, gridViewBodyColumn26) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/item/news.list.item.price.js?disableCache=0116
var newsListItemPrice26 = class extends extender51(price26, gridViewBodyColumn26) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0116
var deleteButton76 = class extends button26 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default26.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/item/news.list.item.actions.js?disableCache=0116
var newsListItemActions26 = class extends extender51(gridViewBodyColumn26, gridViewBodyColumn26) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton76();
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.body.row.js?disableCache=0116
var gridViewRow26 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/item/news.list.item.js?disableCache=0116
var newsListItem26 = class extends extender51(news26, gridViewRow26) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody26();
title = new newsListItemTitle26();
price = new newsListItemPrice26();
actions = new newsListItemActions26();
cursor = "pointer";
background;
fontSize = 14;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default26.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/gridView/gridView.js?disableCache=0116
var gridView26 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 2;
borderRadius = 4;
color = "white";
border = "1px solid #4f4f4f";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/list/news.list.table.js?disableCache=0116
var newsListTable26 = class extends gridView26 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader26();
body = new newsListTableBody26(newsListItem26, new collection30(news26));
marginLeft = 6;
width = "auto";
margin = "6px -2px 10px 6px";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/edit/news.edit.title.js?disableCache=0116
var newsEditTitle26 = class extends extender51(input26, title76) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/textarea.js?disableCache=0116
var textarea26 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
width = "70%";
background = "rgb(255 255 255 / 3%)";
background = "#3e3c3c!important";
color = "white";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default51.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/edit/news.edit.body.js?disableCache=0116
var newsPageBody51 = class extends extender51(body51, textarea26) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/edit/news.edit.button.js?disableCache=0116
var editButton51 = class extends button26 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/edit/news.edit.price.js?disableCache=0116
var newsPagePrice26 = class extends extender51(price26, input26) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/label.js?disableCache=0116
var label51 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
padding = 10;
paddingLeft = 0;
boxWidth = "100%";
color = "white";
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/label/left.js?disableCache=0116
var leftLabel26 = class extends label51 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/panel.js?disableCache=0116
var panel26 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
border = "1px solid #ffffff26";
background = "rgb(255 255 255 / 4%)";
width = "100%";
borderRadius = 6;
marginRight = 20;
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/window/draggable.js?disableCache=0116
var vector276 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay76(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay76, "delay");
var draggable51 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector276(0, 0);
grabPosition = new vector276(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector276(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay76(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector276(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/panel/row.js?disableCache=0116
var panelRow26 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
var children = this.parent.getChildren();
var count = children.length - 1;
var lastChild = children[count];
lastChild.borderBottom = "none";
}
margin = "0 6px";
borderBottom = "1px solid #ffffff26";
width = "96%";
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/window/header.js?disableCache=0116
var maximizeButton26 = class extends icon26 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton26 = class extends icon26 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl26 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton26();
maximizeButton = new maximizeButton26();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title78 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl26 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader26 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl26();
title = new title78();
rightControl = new rightControl26();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
borderTopLeftRadius = "4px";
borderTopRightRadius = "4px";
//padding = 10;
//paddingLeft = 0;
boxWidth = "100%";
color = "white";
borderBottom = "1px solid black";
background = "#1c1c1c";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/edit/news.edit.js?disableCache=0116
var newsBodyRow26 = class extends panelRow26 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel26("Message");
body = new newsPageBody51();
};
var newsTitleRow26 = class extends panelRow26 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel26("Title");
title = new newsEditTitle26();
};
var newsPriceRow26 = class extends panelRow26 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel26("Price");
price = new newsPagePrice26();
};
var cancelButton51 = class extends button26 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow26 = class extends panelRow26 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton51();
newsEditbutton = new editButton51();
};
var newsEdit26 = class extends extender51(news26, panel26, draggable51) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader26("News");
layers = 2;
zIndex = 1e3;
fontFamily = "sf-ui";
width = 600;
background = "#161110bf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow26();
newsPriceRow = new newsPriceRow26();
newsBodyRow = new newsBodyRow26();
newsButtonRow = new newsButtonRow26();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
this.allow(user_group_permission_default26.visitor, "READ");
this.allow(user_group_permission_default26.member, "WRITE");
this.allow(user_group_permission_default26.admin, "WRITE");
this.allow(user_group_permission_default26.visitor, "WRITE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsDialogButton.js?disableCache=0116
var newsDialogButton26 = class extends button26 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/search.input.js?disableCache=0116
var searchBar76 = class extends input26 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/select.js?disableCache=0116
var select26 = class extends renderCollection28 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default51.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default26.admin, "READ");
this.allow(user_group_permission_default26.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default51.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/search.select.js?disableCache=0116
var customSelect51 = class extends select26 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/search.widget.js?disableCache=0116
var searchWidget26 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar76();
select = new customSelect51();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0116
var paginationItem26 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0116
var pagination26 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem26();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem26();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem26();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsItemPage.limit.js?disableCache=0116
var limit26 = class extends select26 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0116
var tableControl26 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label51("Select page:");
pagination = new pagination26();
limitLabel = new label51("Select items per page:");
limit = new limit26();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsItemPage.js?disableCache=0116
var testbutton26 = class extends button26 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage26 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#282828";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header26("News Items");
searchWidget = new searchWidget26();
newsListTable = new newsListTable26();
tableControl = new tableControl26();
createNews = new newsEdit26();
testbutton = new testbutton26();
newsDialogButton = new newsDialogButton26();
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/flexbox.js?disableCache=0116
var flexbox51 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/page/news.page.title.js?disableCache=0116
var newsPageTitle26 = class extends extender51(title76, flexbox51) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
background = "#282828";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/page/news.page.body.js?disableCache=0116
var newsPageBody52 = class extends extender51(flexbox51, body51) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
background = "#282828";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/comments.messages.js?disableCache=0116
var commentsMessages26 = class extends renderCollection28 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR26(LIKE26(filter.body, this.value), LIKE26(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default26.visitor, "READ");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0116
var saveEditButton26 = class extends button26 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0116
var commentEditTitle51 = class extends title77 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0116
var commentEditBody51 = class extends extender51(body52, flexbox51) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default51.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "#282828!important";
//color = "white";
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0116
var userLabel51 = class extends label51 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0116
var deleteButton77 = class extends button26 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.editButton.js?disableCache=0116
var editButton52 = class extends button26 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.information.js?disableCache=0116
var information26 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton77();
_editButton = new editButton52();
_userLabel = new userLabel51();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/edit/comment.edit.js?disableCache=0116
var editComment26 = class extends comment27 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information26();
body = new commentEditBody51();
title = new commentEditTitle51();
saveButton = new saveEditButton26();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/create/comment.saveButton.js?disableCache=0116
var saveCommentButton26 = class extends button26 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/create/comment.create.body.js?disableCache=0116
var commentEditBody52 = class extends extender51(body52, textarea26) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/comment/create/comment.create.js?disableCache=0116
var createComment26 = class extends comment27 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody52();
saveButton = new saveCommentButton26();
title = false;
author = this.user;
// bug destroys the permission system
background = "#00000042";
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default26.member, "WRITE");
this.allow(user_group_permission_default26.admin, "WRITE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/page/news.page.backButton.js?disableCache=0116
var backButton51 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
boxBackground = "#282828";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/page/news.page.edit.button.js?disableCache=0116
var backButton52 = class extends button26 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/filler.js?disableCache=0116
var filler26 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
background = "#282828";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/page/search.comments.js?disableCache=0116
var searchBar77 = class extends input26 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/page/news.page.js?disableCache=0116
var testDiv26 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle26();
};
var newsPage26 = class extends news26 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#282828";
flexDirection = "column";
_backButton = new backButton51();
_testDiv = new testDiv26();
body = new newsPageBody52();
editButton = new backButton52();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar77();
commentsMessages = new commentsMessages26(editComment26, this.comments);
createComment = new createComment26(this.comments);
filler = new filler26();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default26.member, "WRITE");
this.allow(user_group_permission_default26.admin, "WRITE");
this.allow(user_group_permission_default26.visitor, "WRITE");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
this.allow(user_group_permission_default26.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/newsPages.js?disableCache=0116
var newsPages26 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage26();
newsPage = new newsPage26();
newsEdit = new newsEdit26();
width = 1800;
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/preloaders/simpleSpinner.js?disableCache=0116
var line26 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask26 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line26();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox26 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask26();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0116
var themaSelectorImage26 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0116
var selectLabel26 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/themeSelector.js?disableCache=0116
var themeSelector26 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage26();
selectLabel = new selectLabel26();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0116
var themeOSSelectorItem26 = class extends themeSelector26 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default27.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0116
var osSelectorList26 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem26("Windows");
themeMacOS = new themeOSSelectorItem26("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default27.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0116
var osLabel26 = class extends label51 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/os.js?disableCache=0116
var os26 = class extends panelRow26 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel26("Os");
osSelector = new osSelectorList26();
spinner = new preloaderBox26();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0116
var themeTintSelector26 = class extends themeSelector26 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default27.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0116
var themeTintSelectors26 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector26("Light");
themeDark = new themeTintSelector26("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default27.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0116
var customLabel51 = class extends label51 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/rows/tint.js?disableCache=0116
var tint26 = class extends panelRow26 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel51("Appearance");
themeTintSelectors = new themeTintSelectors26();
spinner = new preloaderBox26();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/appearance/panel.js?disableCache=0116
var appearancePanel26 = class extends panel26 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os26();
tint = new tint26();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/pages/settings.js?disableCache=0116
var settings26 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#282828";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header26("Appearance");
appearancePanel = new appearancePanel26();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0116
var Console27 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default27 = new Console27();
// framework/unify/promiseManager.js?disableCache=0116
var promiseManager27 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0116
var shared27 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object79 = new shared27();
var shared_default27 = object79.get();
// framework/cache/platforms/Macos/Mobile/Dark/elements/fileUpload.js?disableCache=0116
var fileUpload26 = class extends input26 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager27();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0116
var delay77 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton26 = class extends icon26 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay77(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay77(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.icon.js?disableCache=0116
var fileIcon26 = class extends icon26 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton26();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.upload.js?disableCache=0116
var stream26 = class extends fileUpload26 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon26();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.list.js?disableCache=0116
var fileList26 = class extends panelRow26 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon26();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0116
var removeIcons26 = class extends icon26 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/page.js?disableCache=0116
var page26 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#282828";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/image.js?disableCache=0116
var icon_id52 = 0;
var image26 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default51.createElement("img");
useCustomElement = true;
id = icon_id52++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0116
var previewImage26 = class extends image26 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0116
var imagePreviewWindow26 = class extends draggable51 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader26();
previewImage = new previewImage26();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0116
var fileChooserFileIcon26 = class extends icon26 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/checkbox.js?disableCache=0116
var checkbox26 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default51.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0116
var file26 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox26();
icon = new fileChooserFileIcon26();
label = new label51();
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0116
var fileChooserFiles26 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file26();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0116
var fileChooserSelectButton26 = class extends button26 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/fileChooser/fileChooser.js?disableCache=0116
var fileChooser26 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles26();
selectButton = new fileChooserSelectButton26();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/fileManager/fileManager.js?disableCache=0116
var fileManager26 = class extends page26 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header26("Upload");
fileupload = new stream26();
filesHeader = new header26("Files");
removeIcons = new removeIcons26();
fileList = new fileList26();
previewWindow = new imagePreviewWindow26();
fileChooser = new fileChooser26();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.move.js?disableCache=0116
var animationBlock176 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel176 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow26 = class extends panelRow26 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel176("Move");
animationBlock = new animationBlock176();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.rotate.js?disableCache=0116
var animationBlock177 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel177 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row151 = class extends panelRow26 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel177("Rotate");
animationBlock = new animationBlock177();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.color.js?disableCache=0116
var animationBlock178 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel178 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row152 = class extends panelRow26 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel178("Background color");
animationBlock = new animationBlock178();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.skewX.js?disableCache=0116
var animationBlock179 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel179 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row153 = class extends panelRow26 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel179("skewX");
animationBlock = new animationBlock179();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0116
var animationBlock180 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel180 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row154 = class extends panelRow26 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel180("Rotate + Move + Background");
animationBlock = new animationBlock180();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.reverse.js?disableCache=0116
var animationBlock181 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton26 = class extends button26 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton26 = class extends button26 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton26 = class extends button26 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton26 = class extends button26 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton26 = class extends button26 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel181 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons51 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton26();
pauseButton = new pauseButton26();
stopButton = new stopButton26();
forwardButton = new forwardButton26();
backwardButton = new backwardButton26();
flexDirection = "column";
};
var row155 = class extends panelRow26 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel181("Reverse");
buttons = new buttons51();
animationBlock = new animationBlock181();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animation.render.js?disableCache=0116
var animationBlock182 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel182 = class extends label51 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row156 = class extends panelRow26 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel182("RenderLoop");
animationBlock = new animationBlock182();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/animations/animations.js?disableCache=0116
var animations26 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#282828";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow26();
rotateAnimation = new row151();
backgroundColor = new row152();
skewX = new row153();
rotateMoveColor = new row154();
reverse = new row155();
render = new row156();
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/examples/grids.js?disableCache=0116
var label52 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a26 = class extends input26 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b27 = class extends input26 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c26 = class extends input26 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d26 = class extends input26 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA26 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label52("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a26();
b = new b27();
c = new c26();
d = new d26();
};
var gridB26 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label52("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a26();
b = new b27();
c = new c26();
d = new d26();
};
var gridExample26 = class extends page26 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA26();
gridB = new gridB26();
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/header/user.userList.header.username.js?disableCache=0116
var userListHeaderUsername26 = class extends gridViewRowColumn26 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0116
var userListHeaderActions26 = class extends gridViewRowColumn26 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default26.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/header/user.userList.header.js?disableCache=0116
var userListHeader26 = class extends extender51(user27, gridViewTableRow26) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername26();
actions = new userListHeaderActions26();
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/user.userList.table.header.js?disableCache=0116
var userListTableHeader26 = class extends gridViewHeader26 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader26();
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/user.userList.table.body.js?disableCache=0116
var userListTableBody26 = class extends extender51(renderCollection28, gridViewTableHeader26) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE26(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default26.visitor, "READ");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/item/user.userList.item.username.js?disableCache=0116
var userListItemTitle26 = class extends extender51(username27, gridViewBodyColumn26) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0116
var deleteButton78 = class extends button26 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default26.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0116
var userListItemActions26 = class extends extender51(gridViewBodyColumn26, gridViewBodyColumn26) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton78();
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/item/user.userList.item.js?disableCache=0116
var userListItem26 = class extends extender51(user27, gridViewRow26) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle26();
actions = new userListItemActions26();
cursor = "pointer";
background;
fontSize = 14;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default26.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/user.userList.table.js?disableCache=0116
var userListTable26 = class extends gridView26 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader26();
body = new userListTableBody26(userListItem26, new collection30(user27));
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/search.js?disableCache=0116
var searchBar78 = class extends input26 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/userList/user.userList.page.js?disableCache=0116
var editPage26 = class extends page26 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header26("Users");
search = new searchBar78();
userTable = new userListTable26();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.username.js?disableCache=0116
var editUsername26 = class extends extender51(username27, input26) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.username.row.js?disableCache=0116
var usernameRow26 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label51("Username");
username = new editUsername26();
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/empty.js?disableCache=0116
var empty26 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/user.edit.button.js?disableCache=0116
var userEditButton26 = class extends button26 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/user.edit.button.row.js?disableCache=0116
var saveButtonRow26 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty26();
userEditButton = new userEditButton26();
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0116
var checkRenderCollection26 = class extends renderCollection28 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default26.admin, "WRITE");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
this.allow(user_group_permission_default26.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.checkbox.js?disableCache=0116
var customCheckbox51 = class extends checkbox26 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0116
var customCheckbox52 = class extends user27 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label51();
checkbox = new customCheckbox51();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0116
var checkboxRow26 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label51("Select users");
renderCollection = new checkRenderCollection26(customCheckbox52, new collection30(user27));
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.select.option.js?disableCache=0116
var customOption26 = class extends extender51(option26, user27) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0116
var customSelect52 = class extends renderCollection28 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default51.createElement("select");
useCustomElement = true;
debug = true;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
permission() {
this.allow(user_group_permission_default26.admin, "WRITE");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
this.allow(user_group_permission_default26.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.select.row.js?disableCache=0116
var optionRow26 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label51("Select user");
renderCollection = new customSelect52(customOption26, new collection30(user27));
};
// framework/cache/platforms/Macos/Mobile/Dark/user/edit/edit.user.js?disableCache=0116
var editUser26 = class extends extender51(user27, page26) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header26("Edit user");
usernameRow = new usernameRow26();
selectRow = new optionRow26();
checkboxRow = new checkboxRow26();
showSelectedUser = new customSelect52(customOption26, this.selectedUsers);
saveButtonRow = new saveButtonRow26();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default26.admin, "WRITE");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
this.allow(user_group_permission_default26.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signup/signup.username.js?disableCache=0116
var signUpUsername26 = class extends extender51(username27, input26) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/inputPassword.js?disableCache=0116
var inputPassword26 = class extends input26 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signup/signup.password.js?disableCache=0116
var signupPassword26 = class extends inputPassword26 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signup/signup.passwordCheck.js?disableCache=0116
var signupPasswordCheck26 = class extends inputPassword26 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0116
var cookieManager27 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default27 = new cookieManager27();
// framework/cache/platforms/Macos/Mobile/Dark/user/signup/signup.button.js?disableCache=0116
var signupButton26 = class extends button26 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signup/signup.customLabel.js?disableCache=0116
var customLabel52 = class extends label51 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signup/user.signup.js?disableCache=0116
var signup26 = class extends extender51(user27, page26) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default51.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header26("Signup");
// Children
userLabel = new customLabel52("Username");
username = new signUpUsername26();
passwordLabel = new customLabel52("Password");
password = new signupPassword26();
passwordAgainLabel = new customLabel52("Password again");
passwordAgain = new signupPasswordCheck26();
signUpButton = new signupButton26();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default26.visitor, "PROCESS");
this.allow(user_group_permission_default26.member, "PROCESS");
this.allow(user_group_permission_default26.admin, "PROCESS");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signin/signin.username.js?disableCache=0116
var signinUsername26 = class extends extender51(username27, input26) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/user.password.js?disableCache=0116
var password26 = class extends inputPassword26 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signin/signin.password.js?disableCache=0116
var signinPassword26 = class extends password26 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signin/signin.button.js?disableCache=0116
var signinFormButton26 = class extends button26 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0116
var unify27 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default27 = new unify27();
// framework/cache/platforms/Macos/Mobile/Dark/user/signin/signin.cancel.button.js?disableCache=0116
var cancelButton52 = class extends button26 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Macos/Mobile/Dark/user/signin/user.signin.js?disableCache=0116
var tussenObject26 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword26();
width = "100%";
};
var buttons52 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton52();
signinButton = new signinFormButton26();
};
var hint26 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin26 = class extends extender51(user27, page26) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint26();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default51.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header26("Signin");
//userLabel = new label("Username");
username = new signinUsername26();
//passwordLabel = new label("Password");
tussenObject = new tussenObject26();
buttons = new buttons52();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user27();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default27.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user27();
client2.user = visitor62;
client2.user.error = false;
unify_default27.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default27.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default26.visitor, "PROCESS");
this.allow(user_group_permission_default26.member, "PROCESS");
this.allow(user_group_permission_default26.admin, "PROCESS");
this.allow(user_group_permission_default26.member, "READ");
this.allow(user_group_permission_default26.admin, "READ");
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/rightSide/rightSide.js?disableCache=0794
var rightSide26 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages26();
signup = new signup26();
signin = new signin26();
settings = new settings26();
fileManager = new fileManager26();
animations = new animations26();
gridExample = new gridExample26();
userListPage = new editPage26();
editUser = new editUser26();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
boxShadow = "-1px 0px 1px 0px #00000008";
background = "#2a2525e6";
background = "#282828";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0794
var documentTool52 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object80 = new documentTool52();
var document_default52 = object80.getDocument();
// framework/unify/math/vector2.js?disableCache=0794
var vector277 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/flexbox.js?disableCache=0794
var flexbox52 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/window/frostedGlass.js?disableCache=0794
var frostedGlass52 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.jpg')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Macos/Mobile/Dark/elements/window/draggable.js?disableCache=0794
var vector278 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay78(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay78, "delay");
var draggable52 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector278(0, 0);
grabPosition = new vector278(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector278(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay78(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector278(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Mobile/Dark/demo/application.js
var application27 = class extends extender50(frostedGlass52, flexbox52, draggable52) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton26();
leftSide = new leftSide26();
rightSide = new rightSide26();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "Inter";
//boxBackgroundImage = "url('/assets/images/wallpapers/ventura/dark/dark.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/ventura/dark/darkBlur.jpg')";
border = "1px solid #8f8f8f59";
outline = "1px solid black";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default52.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector277(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0382
function extender52(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender52, "extender");
// framework/unify/extender.js?disableCache=0989
function extender53(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender53, "extender");
// framework/cache/platforms/Macos/Tablet/Light/elements/button.js?disableCache=0989
var button27 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 2;
margin = "4px 2px";
padding = "4px 20px";
color = "black";
background = "white";
border = "1px solid #e3e1e1";
fontSize = 14;
opaqueBackgroundColor = "white";
hoverBackgroundColor = "rgb(230 231 230 / 65%)";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/icon.js?disableCache=0989
var icon_id53 = 0;
var icon27 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id53++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/minimizeButton.js?disableCache=0382
var minimizeButton27 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.js?disableCache=0989
var menuButton27 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
borderRadius = 8;
padding = 10;
paddingLeft = 20;
fontSize = 16;
fontWeight = "600";
hightlightBackgroundColor = "rgb(189 193 221 / 22%)";
color = "#343434";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.news.js?disableCache=0989
var newsButton27 = class extends menuButton27 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
borderTopLeftRadius = 8;
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0989
var settingsButton79 = class extends menuButton27 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0989
var collection31 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0989
var datatype_default28 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0989
var documentTool53 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object81 = new documentTool53();
var document_default53 = object81.getDocument();
// framework/cache/platforms/Macos/Tablet/Light/elements/option.js?disableCache=0989
var option27 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default53.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/group/user.group.js?disableCache=0989
var visitor54 = class extends option27 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member27 = class extends option27 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin53 = class extends option27 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups27 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member27();
admin = new admin53();
visitor = new visitor54();
};
// framework/cache/platforms/Macos/Tablet/Light/user/group/user.group.permission.js?disableCache=0989
var user_group_permission_default27 = new groups27();
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0989
var signinPageButton27 = class extends menuButton27 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0989
var signinButton27 = class extends menuButton27 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0989
var visitor55 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager28 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor55();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default28 = new userManager28();
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0989
var signoutButton27 = class extends menuButton27 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default28.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default27.member, "PROCESS");
this.allow(user_group_permission_default27.admin, "PROCESS");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0989
var fileMangerButton27 = class extends menuButton27 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0989
var settingsButton80 = class extends menuButton27 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.users.js?disableCache=0989
var usersPageButton27 = class extends menuButton27 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default27.member, "PROCESS");
this.allow(user_group_permission_default27.admin, "PROCESS");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0989
var settingsButton81 = class extends menuButton27 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/header.js?disableCache=0989
var header27 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
margin = 6;
fontWeight = "bold";
fontSize = 16;
marginLeft = 4;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.header.js?disableCache=0989
var menuHeader27 = class extends header27 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/leftSide/leftSide.js?disableCache=0382
var leftSide27 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader27();
paddingTop = 40;
paddingLeft = 20;
background = "rgb(255 255 255 / 75%)";
color = "black";
fontWeight = "200";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton27();
settingsButton = new settingsButton79();
usersButton = new usersPageButton27();
signinButton = new signinPageButton27();
signoutButton = new signoutButton27();
signupButton = new signinButton27();
animationsButton = new settingsButton80();
gridButton = new settingsButton81();
fileManagerButton = new fileMangerButton27();
};
// framework/unify/table.js?disableCache=0989
var table29 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0989
var column27 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/news.title.js?disableCache=0989
var title79 = class extends column27 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/news.body.js?disableCache=0989
var body53 = class extends column27 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/news.price.js?disableCache=0989
var price27 = class extends column27 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default28.REAL;
};
// framework/cache/platforms/Macos/Tablet/Light/user/user.username.js?disableCache=0989
var username28 = class extends column27 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0989
var tools29 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll28(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default28 = new tools29();
// framework/cache/platforms/Macos/Tablet/Light/elements/input.js?disableCache=0989
var input27 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default53.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default53.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default53.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/user.salt.js?disableCache=0989
var salt28 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default28.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Light/user/user.hash.js?disableCache=0989
var hash28 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default28.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Light/user/user.js?disableCache=0989
var user28 = class _user extends table29 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username28();
salt = new salt28();
hash = new hash28();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups27();
selectedUsers = new collection31(_user);
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/comment.body.js?disableCache=0989
var body54 = class extends column27 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/comment.title.js?disableCache=0989
var title80 = class extends column27 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/comment.js?disableCache=0989
var comment28 = class extends table29 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user28();
title = new title80();
body = new body54();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/news.js?disableCache=0989
var news27 = class extends table29 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title79();
body = new body53();
price = new price27();
comments = new collection31(comment28);
};
// framework/cache/platforms/Macos/Tablet/Light/elements/tableCell.js?disableCache=0989
var tableCell27 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0989
var sortBy27 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.header.row.column.js?disableCache=0989
var gridViewRowColumn27 = class extends tableCell27 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
sortBy = new sortBy27();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/header/news.list.header.body.js?disableCache=0989
var newsListHeaderBody27 = class extends gridViewRowColumn27 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/header/news.list.header.title.js?disableCache=0989
var newsListHeaderTitle27 = class extends gridViewRowColumn27 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/header/news.list.header.price.js?disableCache=0989
var newsListHeaderPrice27 = class extends gridViewRowColumn27 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/header/news.list.header.actions.js?disableCache=0989
var newsListHeaderActions27 = class extends gridViewRowColumn27 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default27.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.header.row.js?disableCache=0989
var gridViewTableRow27 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/header/news.list.header.js?disableCache=0989
var newsListHeader27 = class extends extender53(news27, gridViewTableRow27) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody27();
title = new newsListHeaderTitle27();
price = new newsListHeaderPrice27();
actions = new newsListHeaderActions27();
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.header.js?disableCache=0989
var gridViewHeader27 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "rgb(0 0 0 / 3%)";
borderBottom = "1px solid rgb(0 0 0 / 5%)";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/news.list.table.header.js?disableCache=0989
var newsListTableHeader27 = class extends gridViewHeader27 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader27();
};
// framework/unify/renderCollection.js?disableCache=0989
var renderCollection29 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.body.js?disableCache=0989
var gridViewTableHeader27 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "rgb(0 0 0 / 1%)";
};
// framework/unify/sql/OR.js?disableCache=0989
function OR27(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR27, "OR");
// framework/unify/sql/LIKE.js?disableCache=0989
function LIKE27(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE27, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0989
function GREATER_OR_EQUAL27(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL27, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0989
function SMALLER_OR_EQUAL27(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL27, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Macos/Tablet/Light/demo/list/news.list.table.body.js?disableCache=0989
var newsListTableBody27 = class extends extender53(renderCollection29, gridViewTableHeader27) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR27(OR27(LIKE27(filter.title, searchTerm), LIKE27(filter.comments.body, searchTerm)), LIKE27(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL27(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL27(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default27.visitor, "READ");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.body.row.column.js?disableCache=0989
var gridViewBodyColumn27 = class extends tableCell27 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 12;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/item/news.list.item.body.js?disableCache=0989
var newsListItemBody27 = class extends extender53(body53, gridViewBodyColumn27) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/item/news.list.item.title.js?disableCache=0989
var newsListItemTitle27 = class extends extender53(title79, gridViewBodyColumn27) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/item/news.list.item.price.js?disableCache=0989
var newsListItemPrice27 = class extends extender53(price27, gridViewBodyColumn27) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0989
var deleteButton79 = class extends button27 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default27.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/item/news.list.item.actions.js?disableCache=0989
var newsListItemActions27 = class extends extender53(gridViewBodyColumn27, gridViewBodyColumn27) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton79();
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.body.row.js?disableCache=0989
var gridViewRow27 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/item/news.list.item.js?disableCache=0989
var newsListItem27 = class extends extender53(news27, gridViewRow27) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody27();
title = new newsListItemTitle27();
price = new newsListItemPrice27();
actions = new newsListItemActions27();
cursor = "pointer";
background;
fontSize = 14;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default27.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/gridView/gridView.js?disableCache=0989
var gridView27 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 2;
borderRadius = 4;
border = "1px solid rgb(0 0 0 / 5%)";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/list/news.list.table.js?disableCache=0989
var newsListTable27 = class extends gridView27 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader27();
body = new newsListTableBody27(newsListItem27, new collection31(news27));
marginLeft = 6;
width = "auto";
margin = "6px -2px 10px 6px";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/edit/news.edit.title.js?disableCache=0989
var newsEditTitle27 = class extends extender53(input27, title79) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Macos/Tablet/Light/elements/textarea.js?disableCache=0989
var textarea27 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
width = "70%";
background = "rgb(0 0 0 / 3%)";
background = "rgb(0 0 0 / 3%)";
color = "black";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default53.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/edit/news.edit.body.js?disableCache=0989
var newsPageBody53 = class extends extender53(body53, textarea27) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/edit/news.edit.button.js?disableCache=0989
var editButton53 = class extends button27 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/edit/news.edit.price.js?disableCache=0989
var newsPagePrice27 = class extends extender53(price27, input27) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/label.js?disableCache=0989
var label53 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
padding = 10;
paddingLeft = 0;
boxWidth = "100%";
};
// framework/cache/platforms/Macos/Tablet/Light/elements/label/left.js?disableCache=0989
var leftLabel27 = class extends label53 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Macos/Tablet/Light/elements/panel.js?disableCache=0989
var panel27 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
border = "1px solid rgb(241 241 241)";
background = "#fbfbfb";
borderRadius = 6;
marginRight = 20;
};
// framework/cache/platforms/Macos/Tablet/Light/elements/window/draggable.js?disableCache=0989
var vector279 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay79(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay79, "delay");
var draggable53 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector279(0, 0);
grabPosition = new vector279(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector279(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay79(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector279(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/panel/row.js?disableCache=0989
var panelRow27 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
var children = this.parent.getChildren();
var count = children.length - 1;
var lastChild = children[count];
lastChild.borderBottom = "none";
}
margin = "0 6px";
borderBottom = "1px solid rgb(241 241 241)";
};
// framework/cache/platforms/Macos/Tablet/Light/elements/window/header.js?disableCache=0989
var maximizeButton27 = class extends icon27 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton27 = class extends icon27 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl27 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton27();
maximizeButton = new maximizeButton27();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title81 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl27 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader27 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl27();
title = new title81();
rightControl = new rightControl27();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
borderTopLeftRadius = "4px";
borderTopRightRadius = "4px";
//padding = 10;
//paddingLeft = 0;
boxWidth = "100%";
borderBottom = "1px solid #f1f1f1";
background = "white";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/edit/news.edit.js?disableCache=0989
var newsBodyRow27 = class extends panelRow27 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel27("Message");
body = new newsPageBody53();
};
var newsTitleRow27 = class extends panelRow27 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel27("Title");
title = new newsEditTitle27();
};
var newsPriceRow27 = class extends panelRow27 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel27("Price");
price = new newsPagePrice27();
};
var cancelButton53 = class extends button27 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow27 = class extends panelRow27 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton53();
newsEditbutton = new editButton53();
};
var newsEdit27 = class extends extender53(news27, panel27, draggable53) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader27("News");
layers = 2;
zIndex = 1e3;
fontFamily = "sf-ui";
width = 600;
//background = "white";
background = "#fdfdfdbf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow27();
newsPriceRow = new newsPriceRow27();
newsBodyRow = new newsBodyRow27();
newsButtonRow = new newsButtonRow27();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
this.allow(user_group_permission_default27.visitor, "READ");
this.allow(user_group_permission_default27.member, "WRITE");
this.allow(user_group_permission_default27.admin, "WRITE");
this.allow(user_group_permission_default27.visitor, "WRITE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsDialogButton.js?disableCache=0989
var newsDialogButton27 = class extends button27 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/search.input.js?disableCache=0989
var searchBar79 = class extends input27 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/select.js?disableCache=0989
var select27 = class extends renderCollection29 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default53.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default27.admin, "READ");
this.allow(user_group_permission_default27.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default53.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/search.select.js?disableCache=0989
var customSelect53 = class extends select27 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/search.widget.js?disableCache=0989
var searchWidget27 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar79();
select = new customSelect53();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0989
var paginationItem27 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsItemPage.pagination.js?disableCache=0989
var pagination27 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem27();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem27();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem27();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsItemPage.limit.js?disableCache=0989
var limit27 = class extends select27 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0989
var tableControl27 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label53("Select page:");
pagination = new pagination27();
limitLabel = new label53("Select items per page:");
limit = new limit27();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsItemPage.js?disableCache=0989
var testbutton27 = class extends button27 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage27 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#ffffff";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header27("News Items");
searchWidget = new searchWidget27();
newsListTable = new newsListTable27();
tableControl = new tableControl27();
createNews = new newsEdit27();
testbutton = new testbutton27();
newsDialogButton = new newsDialogButton27();
};
// framework/cache/platforms/Macos/Tablet/Light/elements/flexbox.js?disableCache=0989
var flexbox53 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/page/news.page.title.js?disableCache=0989
var newsPageTitle27 = class extends extender53(title79, flexbox53) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
background = "#ffffff";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/page/news.page.body.js?disableCache=0989
var newsPageBody54 = class extends extender53(flexbox53, body53) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
background = "#ffffff";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/comments.messages.js?disableCache=0989
var commentsMessages27 = class extends renderCollection29 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR27(LIKE27(filter.body, this.value), LIKE27(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default27.visitor, "READ");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.saveButton.js?disableCache=0989
var saveEditButton27 = class extends button27 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.edit.title.js?disableCache=0989
var commentEditTitle53 = class extends title80 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.edit.body.js?disableCache=0989
var commentEditBody53 = class extends extender53(body54, flexbox53) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default53.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "white";
color = "black";
borderRadius = 12;
margin = 6;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.userLabel.js?disableCache=0989
var userLabel53 = class extends label53 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0989
var deleteButton80 = class extends button27 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.editButton.js?disableCache=0989
var editButton54 = class extends button27 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.information.js?disableCache=0989
var information27 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton80();
_editButton = new editButton54();
_userLabel = new userLabel53();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/edit/comment.edit.js?disableCache=0989
var editComment27 = class extends comment28 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information27();
body = new commentEditBody53();
title = new commentEditTitle53();
saveButton = new saveEditButton27();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/create/comment.saveButton.js?disableCache=0989
var saveCommentButton27 = class extends button27 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/create/comment.create.body.js?disableCache=0989
var commentEditBody54 = class extends extender53(body54, textarea27) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/comment/create/comment.create.js?disableCache=0989
var createComment27 = class extends comment28 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody54();
saveButton = new saveCommentButton27();
title = false;
author = this.user;
// bug destroys the permission system
background = "#ffffffd1";
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default27.member, "WRITE");
this.allow(user_group_permission_default27.admin, "WRITE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/page/news.page.backButton.js?disableCache=0989
var backButton53 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
boxBackground = "#ffffff";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/page/news.page.edit.button.js?disableCache=0989
var backButton54 = class extends button27 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/filler.js?disableCache=0989
var filler27 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
background = "#ffffff";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/page/search.comments.js?disableCache=0989
var searchBar80 = class extends input27 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/page/news.page.js?disableCache=0989
var testDiv27 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle27();
};
var newsPage27 = class extends news27 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "white";
flexDirection = "column";
_backButton = new backButton53();
_testDiv = new testDiv27();
body = new newsPageBody54();
editButton = new backButton54();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar80();
commentsMessages = new commentsMessages27(editComment27, this.comments);
createComment = new createComment27(this.comments);
filler = new filler27();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default27.member, "WRITE");
this.allow(user_group_permission_default27.admin, "WRITE");
this.allow(user_group_permission_default27.visitor, "WRITE");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
this.allow(user_group_permission_default27.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/newsPages.js?disableCache=0989
var newsPages27 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage27();
newsPage = new newsPage27();
newsEdit = new newsEdit27();
width = 1800;
};
// framework/cache/platforms/Macos/Tablet/Light/elements/preloaders/simpleSpinner.js?disableCache=0989
var line27 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask27 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line27();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox27 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask27();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0989
var themaSelectorImage27 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0989
var selectLabel27 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/themeSelector.js?disableCache=0989
var themeSelector27 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage27();
selectLabel = new selectLabel27();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0989
var themeOSSelectorItem27 = class extends themeSelector27 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default28.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0989
var osSelectorList27 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem27("Windows");
themeMacOS = new themeOSSelectorItem27("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default28.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/os.label.js?disableCache=0989
var osLabel27 = class extends label53 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/os.js?disableCache=0989
var os27 = class extends panelRow27 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel27("Os");
osSelector = new osSelectorList27();
spinner = new preloaderBox27();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0989
var themeTintSelector27 = class extends themeSelector27 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default28.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0989
var themeTintSelectors27 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector27("Light");
themeDark = new themeTintSelector27("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default28.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0989
var customLabel53 = class extends label53 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/rows/tint.js?disableCache=0989
var tint27 = class extends panelRow27 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel53("Appearance");
themeTintSelectors = new themeTintSelectors27();
spinner = new preloaderBox27();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/appearance/panel.js?disableCache=0989
var appearancePanel27 = class extends panel27 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os27();
tint = new tint27();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/pages/settings.js?disableCache=0989
var settings27 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#fdfdfd";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header27("Appearance");
appearancePanel = new appearancePanel27();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0989
var Console28 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default28 = new Console28();
// framework/unify/promiseManager.js?disableCache=0989
var promiseManager28 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0989
var shared28 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object82 = new shared28();
var shared_default28 = object82.get();
// framework/cache/platforms/Macos/Tablet/Light/elements/fileUpload.js?disableCache=0989
var fileUpload27 = class extends input27 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager28();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0989
var delay80 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton27 = class extends icon27 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay80(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay80(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.icon.js?disableCache=0989
var fileIcon27 = class extends icon27 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton27();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.upload.js?disableCache=0989
var stream27 = class extends fileUpload27 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon27();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.list.js?disableCache=0989
var fileList27 = class extends panelRow27 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon27();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0989
var removeIcons27 = class extends icon27 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/page.js?disableCache=0989
var page27 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#fdfdfd";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Macos/Tablet/Light/elements/image.js?disableCache=0989
var icon_id54 = 0;
var image27 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default53.createElement("img");
useCustomElement = true;
id = icon_id54++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0989
var previewImage27 = class extends image27 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0989
var imagePreviewWindow27 = class extends draggable53 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader27();
previewImage = new previewImage27();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0989
var fileChooserFileIcon27 = class extends icon27 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/checkbox.js?disableCache=0989
var checkbox27 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default53.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/fileChooser/fileChooser.file.js?disableCache=0989
var file27 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox27();
icon = new fileChooserFileIcon27();
label = new label53();
};
// framework/cache/platforms/Macos/Tablet/Light/elements/fileChooser/fileChooser.files.js?disableCache=0989
var fileChooserFiles27 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file27();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0989
var fileChooserSelectButton27 = class extends button27 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/fileChooser/fileChooser.js?disableCache=0989
var fileChooser27 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles27();
selectButton = new fileChooserSelectButton27();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/fileManager/fileManager.js?disableCache=0989
var fileManager27 = class extends page27 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header27("Upload");
fileupload = new stream27();
filesHeader = new header27("Files");
removeIcons = new removeIcons27();
fileList = new fileList27();
previewWindow = new imagePreviewWindow27();
fileChooser = new fileChooser27();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.move.js?disableCache=0989
var animationBlock183 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel183 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow27 = class extends panelRow27 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel183("Move");
animationBlock = new animationBlock183();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.rotate.js?disableCache=0989
var animationBlock184 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel184 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row157 = class extends panelRow27 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel184("Rotate");
animationBlock = new animationBlock184();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.color.js?disableCache=0989
var animationBlock185 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel185 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row158 = class extends panelRow27 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel185("Background color");
animationBlock = new animationBlock185();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.skewX.js?disableCache=0989
var animationBlock186 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel186 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row159 = class extends panelRow27 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel186("skewX");
animationBlock = new animationBlock186();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0989
var animationBlock187 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel187 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row160 = class extends panelRow27 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel187("Rotate + Move + Background");
animationBlock = new animationBlock187();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.reverse.js?disableCache=0989
var animationBlock188 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton27 = class extends button27 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton27 = class extends button27 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton27 = class extends button27 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton27 = class extends button27 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton27 = class extends button27 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel188 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons53 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton27();
pauseButton = new pauseButton27();
stopButton = new stopButton27();
forwardButton = new forwardButton27();
backwardButton = new backwardButton27();
flexDirection = "column";
};
var row161 = class extends panelRow27 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel188("Reverse");
buttons = new buttons53();
animationBlock = new animationBlock188();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animation.render.js?disableCache=0989
var animationBlock189 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel189 = class extends label53 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row162 = class extends panelRow27 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel189("RenderLoop");
animationBlock = new animationBlock189();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/animations/animations.js?disableCache=0989
var animations27 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#fdfdfd";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow27();
rotateAnimation = new row157();
backgroundColor = new row158();
skewX = new row159();
rotateMoveColor = new row160();
reverse = new row161();
render = new row162();
};
// framework/cache/platforms/Macos/Tablet/Light/demo/examples/grids.js?disableCache=0989
var label54 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a27 = class extends input27 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b28 = class extends input27 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c27 = class extends input27 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d27 = class extends input27 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA27 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label54("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a27();
b = new b28();
c = new c27();
d = new d27();
};
var gridB27 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label54("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a27();
b = new b28();
c = new c27();
d = new d27();
};
var gridExample27 = class extends page27 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA27();
gridB = new gridB27();
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/header/user.userList.header.username.js?disableCache=0989
var userListHeaderUsername27 = class extends gridViewRowColumn27 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/header/user.userList.header.actions.js?disableCache=0989
var userListHeaderActions27 = class extends gridViewRowColumn27 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default27.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/header/user.userList.header.js?disableCache=0989
var userListHeader27 = class extends extender53(user28, gridViewTableRow27) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername27();
actions = new userListHeaderActions27();
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/user.userList.table.header.js?disableCache=0989
var userListTableHeader27 = class extends gridViewHeader27 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader27();
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/user.userList.table.body.js?disableCache=0989
var userListTableBody27 = class extends extender53(renderCollection29, gridViewTableHeader27) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE27(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default27.visitor, "READ");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/item/user.userList.item.username.js?disableCache=0989
var userListItemTitle27 = class extends extender53(username28, gridViewBodyColumn27) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0989
var deleteButton81 = class extends button27 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default27.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/item/user.userList.item.actions.js?disableCache=0989
var userListItemActions27 = class extends extender53(gridViewBodyColumn27, gridViewBodyColumn27) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton81();
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/item/user.userList.item.js?disableCache=0989
var userListItem27 = class extends extender53(user28, gridViewRow27) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle27();
actions = new userListItemActions27();
cursor = "pointer";
background;
fontSize = 14;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default27.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/user.userList.table.js?disableCache=0989
var userListTable27 = class extends gridView27 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader27();
body = new userListTableBody27(userListItem27, new collection31(user28));
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/search.js?disableCache=0989
var searchBar81 = class extends input27 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/userList/user.userList.page.js?disableCache=0989
var editPage27 = class extends page27 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header27("Users");
search = new searchBar81();
userTable = new userListTable27();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.username.js?disableCache=0989
var editUsername27 = class extends extender53(username28, input27) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.username.row.js?disableCache=0989
var usernameRow27 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label53("Username");
username = new editUsername27();
};
// framework/cache/platforms/Macos/Tablet/Light/elements/empty.js?disableCache=0989
var empty27 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/user.edit.button.js?disableCache=0989
var userEditButton27 = class extends button27 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/user.edit.button.row.js?disableCache=0989
var saveButtonRow27 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty27();
userEditButton = new userEditButton27();
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0989
var checkRenderCollection27 = class extends renderCollection29 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default27.admin, "WRITE");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
this.allow(user_group_permission_default27.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.checkbox.js?disableCache=0989
var customCheckbox53 = class extends checkbox27 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0989
var customCheckbox54 = class extends user28 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label53();
checkbox = new customCheckbox53();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.checkbox.row.js?disableCache=0989
var checkboxRow27 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label53("Select users");
renderCollection = new checkRenderCollection27(customCheckbox54, new collection31(user28));
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.select.option.js?disableCache=0989
var customOption27 = class extends extender53(option27, user28) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0989
var customSelect54 = class extends renderCollection29 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default53.createElement("select");
useCustomElement = true;
debug = true;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
permission() {
this.allow(user_group_permission_default27.admin, "WRITE");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
this.allow(user_group_permission_default27.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.select.row.js?disableCache=0989
var optionRow27 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label53("Select user");
renderCollection = new customSelect54(customOption27, new collection31(user28));
};
// framework/cache/platforms/Macos/Tablet/Light/user/edit/edit.user.js?disableCache=0989
var editUser27 = class extends extender53(user28, page27) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header27("Edit user");
usernameRow = new usernameRow27();
selectRow = new optionRow27();
checkboxRow = new checkboxRow27();
showSelectedUser = new customSelect54(customOption27, this.selectedUsers);
saveButtonRow = new saveButtonRow27();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default27.admin, "WRITE");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
this.allow(user_group_permission_default27.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/signup/signup.username.js?disableCache=0989
var signUpUsername27 = class extends extender53(username28, input27) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Light/elements/inputPassword.js?disableCache=0989
var inputPassword27 = class extends input27 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/signup/signup.password.js?disableCache=0989
var signupPassword27 = class extends inputPassword27 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Macos/Tablet/Light/user/signup/signup.passwordCheck.js?disableCache=0989
var signupPasswordCheck27 = class extends inputPassword27 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0989
var cookieManager28 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default28 = new cookieManager28();
// framework/cache/platforms/Macos/Tablet/Light/user/signup/signup.button.js?disableCache=0989
var signupButton27 = class extends button27 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/signup/signup.customLabel.js?disableCache=0989
var customLabel54 = class extends label53 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Macos/Tablet/Light/user/signup/user.signup.js?disableCache=0989
var signup27 = class extends extender53(user28, page27) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default53.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header27("Signup");
// Children
userLabel = new customLabel54("Username");
username = new signUpUsername27();
passwordLabel = new customLabel54("Password");
password = new signupPassword27();
passwordAgainLabel = new customLabel54("Password again");
passwordAgain = new signupPasswordCheck27();
signUpButton = new signupButton27();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default27.visitor, "PROCESS");
this.allow(user_group_permission_default27.member, "PROCESS");
this.allow(user_group_permission_default27.admin, "PROCESS");
}
};
// framework/cache/platforms/Macos/Tablet/Light/user/signin/signin.username.js?disableCache=0989
var signinUsername27 = class extends extender53(username28, input27) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Macos/Tablet/Light/user/user.password.js?disableCache=0989
var password27 = class extends inputPassword27 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Macos/Tablet/Light/user/signin/signin.password.js?disableCache=0989
var signinPassword27 = class extends password27 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Macos/Tablet/Light/user/signin/signin.button.js?disableCache=0989
var signinFormButton27 = class extends button27 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0989
var unify28 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default28 = new unify28();
// framework/cache/platforms/Macos/Tablet/Light/user/signin/signin.cancel.button.js?disableCache=0989
var cancelButton54 = class extends button27 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Light/user/signin/user.signin.js?disableCache=0989
var tussenObject27 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword27();
width = "100%";
};
var buttons54 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton54();
signinButton = new signinFormButton27();
};
var hint27 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin27 = class extends extender53(user28, page27) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint27();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default53.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header27("Signin");
//userLabel = new label("Username");
username = new signinUsername27();
//passwordLabel = new label("Password");
tussenObject = new tussenObject27();
buttons = new buttons54();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user28();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default28.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user28();
client2.user = visitor62;
client2.user.error = false;
unify_default28.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default28.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default27.visitor, "PROCESS");
this.allow(user_group_permission_default27.member, "PROCESS");
this.allow(user_group_permission_default27.admin, "PROCESS");
this.allow(user_group_permission_default27.member, "READ");
this.allow(user_group_permission_default27.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/rightSide/rightSide.js?disableCache=0382
var rightSide27 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages27();
signup = new signup27();
signin = new signin27();
settings = new settings27();
fileManager = new fileManager27();
animations = new animations27();
gridExample = new gridExample27();
userListPage = new editPage27();
editUser = new editUser27();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
boxShadow = "-1px 0px 1px 0px #00000008";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0382
var documentTool54 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object83 = new documentTool54();
var document_default54 = object83.getDocument();
// framework/unify/math/vector2.js?disableCache=0382
var vector280 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Macos/Tablet/Light/elements/flexbox.js?disableCache=0382
var flexbox54 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Macos/Tablet/Light/elements/window/frostedGlass.js?disableCache=0382
var frostedGlass54 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Macos/Tablet/Light/elements/window/draggable.js?disableCache=0382
var vector281 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay81(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay81, "delay");
var draggable54 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector281(0, 0);
grabPosition = new vector281(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector281(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay81(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector281(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Tablet/Light/demo/application.js
var application28 = class extends extender52(frostedGlass54, flexbox54, draggable54) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton27();
leftSide = new leftSide27();
rightSide = new rightSide27();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "Inter";
//boxBackgroundImage = "url('/assets/images/wallpapers/ventura/light/light.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default54.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector280(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0013
function extender54(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender54, "extender");
// framework/unify/extender.js?disableCache=0239
function extender55(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender55, "extender");
// framework/cache/platforms/Macos/Tablet/Dark/elements/button.js?disableCache=0239
var button28 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 2;
margin = "4px 2px";
padding = "4px 20px";
color = "white";
background = "#282828";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#282828";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/icon.js?disableCache=0239
var icon_id55 = 0;
var icon28 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id55++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/minimizeButton.js?disableCache=0013
var minimizeButton28 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.js?disableCache=0239
var menuButton28 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
borderRadius = 8;
padding = 10;
paddingLeft = 20;
fontSize = 16;
fontWeight = "600";
hightlightBackgroundColor = "rgb(189 193 221 / 22%)";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0239
var newsButton28 = class extends menuButton28 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
borderTopLeftRadius = 8;
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0239
var settingsButton82 = class extends menuButton28 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0239
var collection32 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0239
var datatype_default29 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0239
var documentTool55 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object84 = new documentTool55();
var document_default55 = object84.getDocument();
// framework/cache/platforms/Macos/Tablet/Dark/elements/option.js?disableCache=0239
var option28 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default55.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/group/user.group.js?disableCache=0239
var visitor56 = class extends option28 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member28 = class extends option28 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin55 = class extends option28 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups28 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member28();
admin = new admin55();
visitor = new visitor56();
};
// framework/cache/platforms/Macos/Tablet/Dark/user/group/user.group.permission.js?disableCache=0239
var user_group_permission_default28 = new groups28();
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0239
var signinPageButton28 = class extends menuButton28 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0239
var signinButton28 = class extends menuButton28 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0239
var visitor57 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager29 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor57();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default29 = new userManager29();
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0239
var signoutButton28 = class extends menuButton28 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default29.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default28.member, "PROCESS");
this.allow(user_group_permission_default28.admin, "PROCESS");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0239
var fileMangerButton28 = class extends menuButton28 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0239
var settingsButton83 = class extends menuButton28 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0239
var usersPageButton28 = class extends menuButton28 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default28.member, "PROCESS");
this.allow(user_group_permission_default28.admin, "PROCESS");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0239
var settingsButton84 = class extends menuButton28 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/header.js?disableCache=0239
var header28 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
margin = 6;
fontWeight = "bold";
fontSize = 16;
marginLeft = 4;
color = "white";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.header.js?disableCache=0239
var menuHeader28 = class extends header28 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/leftSide/leftSide.js?disableCache=0013
var leftSide28 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader28();
paddingTop = 40;
paddingLeft = 20;
background = "rgb(40 22 22 / 75%)";
color = "white";
borderRight = "1px solid black";
fontWeight = "bold";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton28();
settingsButton = new settingsButton82();
usersButton = new usersPageButton28();
signinButton = new signinPageButton28();
signoutButton = new signoutButton28();
signupButton = new signinButton28();
animationsButton = new settingsButton83();
gridButton = new settingsButton84();
fileManagerButton = new fileMangerButton28();
};
// framework/unify/table.js?disableCache=0239
var table30 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0239
var column28 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/news.title.js?disableCache=0239
var title82 = class extends column28 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/news.body.js?disableCache=0239
var body55 = class extends column28 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/news.price.js?disableCache=0239
var price28 = class extends column28 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default29.REAL;
};
// framework/cache/platforms/Macos/Tablet/Dark/user/user.username.js?disableCache=0239
var username29 = class extends column28 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0239
var tools30 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll29(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default29 = new tools30();
// framework/cache/platforms/Macos/Tablet/Dark/elements/input.js?disableCache=0239
var input28 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default55.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default55.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default55.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/user.salt.js?disableCache=0239
var salt29 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default29.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/user.hash.js?disableCache=0239
var hash29 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default29.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/user.js?disableCache=0239
var user29 = class _user extends table30 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username29();
salt = new salt29();
hash = new hash29();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups28();
selectedUsers = new collection32(_user);
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/comment.body.js?disableCache=0239
var body56 = class extends column28 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/comment.title.js?disableCache=0239
var title83 = class extends column28 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/comment.js?disableCache=0239
var comment29 = class extends table30 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user29();
title = new title83();
body = new body56();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/news.js?disableCache=0239
var news28 = class extends table30 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title82();
body = new body55();
price = new price28();
comments = new collection32(comment29);
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/tableCell.js?disableCache=0239
var tableCell28 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0239
var sortBy28 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0239
var gridViewRowColumn28 = class extends tableCell28 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
sortBy = new sortBy28();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/header/news.list.header.body.js?disableCache=0239
var newsListHeaderBody28 = class extends gridViewRowColumn28 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/header/news.list.header.title.js?disableCache=0239
var newsListHeaderTitle28 = class extends gridViewRowColumn28 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/header/news.list.header.price.js?disableCache=0239
var newsListHeaderPrice28 = class extends gridViewRowColumn28 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/header/news.list.header.actions.js?disableCache=0239
var newsListHeaderActions28 = class extends gridViewRowColumn28 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default28.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.header.row.js?disableCache=0239
var gridViewTableRow28 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/header/news.list.header.js?disableCache=0239
var newsListHeader28 = class extends extender55(news28, gridViewTableRow28) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody28();
title = new newsListHeaderTitle28();
price = new newsListHeaderPrice28();
actions = new newsListHeaderActions28();
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.header.js?disableCache=0239
var gridViewHeader28 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "#393939";
borderBottom = "2px solid #3f3f3f";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/news.list.table.header.js?disableCache=0239
var newsListTableHeader28 = class extends gridViewHeader28 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader28();
};
// framework/unify/renderCollection.js?disableCache=0239
var renderCollection30 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.body.js?disableCache=0239
var gridViewTableHeader28 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "#2c2c2c";
fontWeight = "bold";
};
// framework/unify/sql/OR.js?disableCache=0239
function OR28(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR28, "OR");
// framework/unify/sql/LIKE.js?disableCache=0239
function LIKE28(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE28, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0239
function GREATER_OR_EQUAL28(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL28, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0239
function SMALLER_OR_EQUAL28(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL28, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/news.list.table.body.js?disableCache=0239
var newsListTableBody28 = class extends extender55(renderCollection30, gridViewTableHeader28) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR28(OR28(LIKE28(filter.title, searchTerm), LIKE28(filter.comments.body, searchTerm)), LIKE28(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL28(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL28(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default28.visitor, "READ");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0239
var gridViewBodyColumn28 = class extends tableCell28 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 12;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/item/news.list.item.body.js?disableCache=0239
var newsListItemBody28 = class extends extender55(body55, gridViewBodyColumn28) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/item/news.list.item.title.js?disableCache=0239
var newsListItemTitle28 = class extends extender55(title82, gridViewBodyColumn28) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/item/news.list.item.price.js?disableCache=0239
var newsListItemPrice28 = class extends extender55(price28, gridViewBodyColumn28) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0239
var deleteButton82 = class extends button28 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default28.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/item/news.list.item.actions.js?disableCache=0239
var newsListItemActions28 = class extends extender55(gridViewBodyColumn28, gridViewBodyColumn28) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton82();
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.body.row.js?disableCache=0239
var gridViewRow28 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/item/news.list.item.js?disableCache=0239
var newsListItem28 = class extends extender55(news28, gridViewRow28) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody28();
title = new newsListItemTitle28();
price = new newsListItemPrice28();
actions = new newsListItemActions28();
cursor = "pointer";
background;
fontSize = 14;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default28.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/gridView/gridView.js?disableCache=0239
var gridView28 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 2;
borderRadius = 4;
color = "white";
border = "1px solid #4f4f4f";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/list/news.list.table.js?disableCache=0239
var newsListTable28 = class extends gridView28 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader28();
body = new newsListTableBody28(newsListItem28, new collection32(news28));
marginLeft = 6;
width = "auto";
margin = "6px -2px 10px 6px";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/edit/news.edit.title.js?disableCache=0239
var newsEditTitle28 = class extends extender55(input28, title82) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/textarea.js?disableCache=0239
var textarea28 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
width = "70%";
background = "rgb(255 255 255 / 3%)";
background = "#3e3c3c!important";
color = "white";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default55.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/edit/news.edit.body.js?disableCache=0239
var newsPageBody55 = class extends extender55(body55, textarea28) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/edit/news.edit.button.js?disableCache=0239
var editButton55 = class extends button28 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/edit/news.edit.price.js?disableCache=0239
var newsPagePrice28 = class extends extender55(price28, input28) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/label.js?disableCache=0239
var label55 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
padding = 10;
paddingLeft = 0;
boxWidth = "100%";
color = "white";
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/label/left.js?disableCache=0239
var leftLabel28 = class extends label55 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/panel.js?disableCache=0239
var panel28 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
border = "1px solid #ffffff26";
background = "rgb(255 255 255 / 4%)";
width = "100%";
borderRadius = 6;
marginRight = 20;
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/window/draggable.js?disableCache=0239
var vector282 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay82(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay82, "delay");
var draggable55 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector282(0, 0);
grabPosition = new vector282(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector282(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay82(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector282(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/panel/row.js?disableCache=0239
var panelRow28 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
var children = this.parent.getChildren();
var count = children.length - 1;
var lastChild = children[count];
lastChild.borderBottom = "none";
}
margin = "0 6px";
borderBottom = "1px solid #ffffff26";
width = "96%";
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/window/header.js?disableCache=0239
var maximizeButton28 = class extends icon28 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton28 = class extends icon28 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl28 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton28();
maximizeButton = new maximizeButton28();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title84 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl28 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader28 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl28();
title = new title84();
rightControl = new rightControl28();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
borderTopLeftRadius = "4px";
borderTopRightRadius = "4px";
//padding = 10;
//paddingLeft = 0;
boxWidth = "100%";
color = "white";
borderBottom = "1px solid black";
background = "#1c1c1c";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/edit/news.edit.js?disableCache=0239
var newsBodyRow28 = class extends panelRow28 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel28("Message");
body = new newsPageBody55();
};
var newsTitleRow28 = class extends panelRow28 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel28("Title");
title = new newsEditTitle28();
};
var newsPriceRow28 = class extends panelRow28 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel28("Price");
price = new newsPagePrice28();
};
var cancelButton55 = class extends button28 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow28 = class extends panelRow28 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton55();
newsEditbutton = new editButton55();
};
var newsEdit28 = class extends extender55(news28, panel28, draggable55) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader28("News");
layers = 2;
zIndex = 1e3;
fontFamily = "sf-ui";
width = 600;
background = "#161110bf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow28();
newsPriceRow = new newsPriceRow28();
newsBodyRow = new newsBodyRow28();
newsButtonRow = new newsButtonRow28();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
this.allow(user_group_permission_default28.visitor, "READ");
this.allow(user_group_permission_default28.member, "WRITE");
this.allow(user_group_permission_default28.admin, "WRITE");
this.allow(user_group_permission_default28.visitor, "WRITE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsDialogButton.js?disableCache=0239
var newsDialogButton28 = class extends button28 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/search.input.js?disableCache=0239
var searchBar82 = class extends input28 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/select.js?disableCache=0239
var select28 = class extends renderCollection30 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default55.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default28.admin, "READ");
this.allow(user_group_permission_default28.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default55.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/search.select.js?disableCache=0239
var customSelect55 = class extends select28 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/search.widget.js?disableCache=0239
var searchWidget28 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar82();
select = new customSelect55();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0239
var paginationItem28 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0239
var pagination28 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem28();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem28();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem28();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsItemPage.limit.js?disableCache=0239
var limit28 = class extends select28 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0239
var tableControl28 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label55("Select page:");
pagination = new pagination28();
limitLabel = new label55("Select items per page:");
limit = new limit28();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsItemPage.js?disableCache=0239
var testbutton28 = class extends button28 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage28 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#282828";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header28("News Items");
searchWidget = new searchWidget28();
newsListTable = new newsListTable28();
tableControl = new tableControl28();
createNews = new newsEdit28();
testbutton = new testbutton28();
newsDialogButton = new newsDialogButton28();
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/flexbox.js?disableCache=0239
var flexbox55 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/page/news.page.title.js?disableCache=0239
var newsPageTitle28 = class extends extender55(title82, flexbox55) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
background = "#282828";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/page/news.page.body.js?disableCache=0239
var newsPageBody56 = class extends extender55(flexbox55, body55) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
background = "#282828";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/comments.messages.js?disableCache=0239
var commentsMessages28 = class extends renderCollection30 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR28(LIKE28(filter.body, this.value), LIKE28(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default28.visitor, "READ");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0239
var saveEditButton28 = class extends button28 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0239
var commentEditTitle55 = class extends title83 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0239
var commentEditBody55 = class extends extender55(body56, flexbox55) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default55.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "#282828!important";
//color = "white";
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0239
var userLabel55 = class extends label55 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0239
var deleteButton83 = class extends button28 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.editButton.js?disableCache=0239
var editButton56 = class extends button28 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.information.js?disableCache=0239
var information28 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton83();
_editButton = new editButton56();
_userLabel = new userLabel55();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/edit/comment.edit.js?disableCache=0239
var editComment28 = class extends comment29 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information28();
body = new commentEditBody55();
title = new commentEditTitle55();
saveButton = new saveEditButton28();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/create/comment.saveButton.js?disableCache=0239
var saveCommentButton28 = class extends button28 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/create/comment.create.body.js?disableCache=0239
var commentEditBody56 = class extends extender55(body56, textarea28) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/comment/create/comment.create.js?disableCache=0239
var createComment28 = class extends comment29 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody56();
saveButton = new saveCommentButton28();
title = false;
author = this.user;
// bug destroys the permission system
background = "#00000042";
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default28.member, "WRITE");
this.allow(user_group_permission_default28.admin, "WRITE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/page/news.page.backButton.js?disableCache=0239
var backButton55 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
boxBackground = "#282828";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/page/news.page.edit.button.js?disableCache=0239
var backButton56 = class extends button28 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/filler.js?disableCache=0239
var filler28 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
background = "#282828";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/page/search.comments.js?disableCache=0239
var searchBar83 = class extends input28 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/page/news.page.js?disableCache=0239
var testDiv28 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle28();
};
var newsPage28 = class extends news28 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#282828";
flexDirection = "column";
_backButton = new backButton55();
_testDiv = new testDiv28();
body = new newsPageBody56();
editButton = new backButton56();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar83();
commentsMessages = new commentsMessages28(editComment28, this.comments);
createComment = new createComment28(this.comments);
filler = new filler28();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default28.member, "WRITE");
this.allow(user_group_permission_default28.admin, "WRITE");
this.allow(user_group_permission_default28.visitor, "WRITE");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
this.allow(user_group_permission_default28.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/newsPages.js?disableCache=0239
var newsPages28 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage28();
newsPage = new newsPage28();
newsEdit = new newsEdit28();
width = 1800;
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/preloaders/simpleSpinner.js?disableCache=0239
var line28 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask28 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line28();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox28 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask28();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0239
var themaSelectorImage28 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0239
var selectLabel28 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/themeSelector.js?disableCache=0239
var themeSelector28 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage28();
selectLabel = new selectLabel28();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0239
var themeOSSelectorItem28 = class extends themeSelector28 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default29.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0239
var osSelectorList28 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem28("Windows");
themeMacOS = new themeOSSelectorItem28("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default29.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0239
var osLabel28 = class extends label55 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/os.js?disableCache=0239
var os28 = class extends panelRow28 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel28("Os");
osSelector = new osSelectorList28();
spinner = new preloaderBox28();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0239
var themeTintSelector28 = class extends themeSelector28 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default29.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0239
var themeTintSelectors28 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector28("Light");
themeDark = new themeTintSelector28("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default29.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0239
var customLabel55 = class extends label55 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/rows/tint.js?disableCache=0239
var tint28 = class extends panelRow28 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel55("Appearance");
themeTintSelectors = new themeTintSelectors28();
spinner = new preloaderBox28();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/appearance/panel.js?disableCache=0239
var appearancePanel28 = class extends panel28 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os28();
tint = new tint28();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/pages/settings.js?disableCache=0239
var settings28 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#282828";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header28("Appearance");
appearancePanel = new appearancePanel28();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0239
var Console29 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default29 = new Console29();
// framework/unify/promiseManager.js?disableCache=0239
var promiseManager29 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0239
var shared29 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object85 = new shared29();
var shared_default29 = object85.get();
// framework/cache/platforms/Macos/Tablet/Dark/elements/fileUpload.js?disableCache=0239
var fileUpload28 = class extends input28 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager29();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0239
var delay83 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton28 = class extends icon28 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay83(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay83(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.icon.js?disableCache=0239
var fileIcon28 = class extends icon28 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton28();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.upload.js?disableCache=0239
var stream28 = class extends fileUpload28 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon28();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.list.js?disableCache=0239
var fileList28 = class extends panelRow28 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon28();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0239
var removeIcons28 = class extends icon28 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/page.js?disableCache=0239
var page28 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#282828";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/image.js?disableCache=0239
var icon_id56 = 0;
var image28 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default55.createElement("img");
useCustomElement = true;
id = icon_id56++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0239
var previewImage28 = class extends image28 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0239
var imagePreviewWindow28 = class extends draggable55 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader28();
previewImage = new previewImage28();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0239
var fileChooserFileIcon28 = class extends icon28 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/checkbox.js?disableCache=0239
var checkbox28 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default55.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0239
var file28 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox28();
icon = new fileChooserFileIcon28();
label = new label55();
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0239
var fileChooserFiles28 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file28();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0239
var fileChooserSelectButton28 = class extends button28 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/fileChooser/fileChooser.js?disableCache=0239
var fileChooser28 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles28();
selectButton = new fileChooserSelectButton28();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/fileManager/fileManager.js?disableCache=0239
var fileManager28 = class extends page28 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header28("Upload");
fileupload = new stream28();
filesHeader = new header28("Files");
removeIcons = new removeIcons28();
fileList = new fileList28();
previewWindow = new imagePreviewWindow28();
fileChooser = new fileChooser28();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.move.js?disableCache=0239
var animationBlock190 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel190 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow28 = class extends panelRow28 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel190("Move");
animationBlock = new animationBlock190();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.rotate.js?disableCache=0239
var animationBlock191 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel191 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row163 = class extends panelRow28 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel191("Rotate");
animationBlock = new animationBlock191();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.color.js?disableCache=0239
var animationBlock192 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel192 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row164 = class extends panelRow28 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel192("Background color");
animationBlock = new animationBlock192();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.skewX.js?disableCache=0239
var animationBlock193 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel193 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row165 = class extends panelRow28 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel193("skewX");
animationBlock = new animationBlock193();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0239
var animationBlock194 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel194 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row166 = class extends panelRow28 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel194("Rotate + Move + Background");
animationBlock = new animationBlock194();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.reverse.js?disableCache=0239
var animationBlock195 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton28 = class extends button28 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton28 = class extends button28 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton28 = class extends button28 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton28 = class extends button28 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton28 = class extends button28 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel195 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons55 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton28();
pauseButton = new pauseButton28();
stopButton = new stopButton28();
forwardButton = new forwardButton28();
backwardButton = new backwardButton28();
flexDirection = "column";
};
var row167 = class extends panelRow28 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel195("Reverse");
buttons = new buttons55();
animationBlock = new animationBlock195();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animation.render.js?disableCache=0239
var animationBlock196 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel196 = class extends label55 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row168 = class extends panelRow28 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel196("RenderLoop");
animationBlock = new animationBlock196();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/animations/animations.js?disableCache=0239
var animations28 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#282828";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow28();
rotateAnimation = new row163();
backgroundColor = new row164();
skewX = new row165();
rotateMoveColor = new row166();
reverse = new row167();
render = new row168();
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/examples/grids.js?disableCache=0239
var label56 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a28 = class extends input28 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b29 = class extends input28 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c28 = class extends input28 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d28 = class extends input28 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA28 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label56("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a28();
b = new b29();
c = new c28();
d = new d28();
};
var gridB28 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label56("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a28();
b = new b29();
c = new c28();
d = new d28();
};
var gridExample28 = class extends page28 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA28();
gridB = new gridB28();
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/header/user.userList.header.username.js?disableCache=0239
var userListHeaderUsername28 = class extends gridViewRowColumn28 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0239
var userListHeaderActions28 = class extends gridViewRowColumn28 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default28.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/header/user.userList.header.js?disableCache=0239
var userListHeader28 = class extends extender55(user29, gridViewTableRow28) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername28();
actions = new userListHeaderActions28();
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/user.userList.table.header.js?disableCache=0239
var userListTableHeader28 = class extends gridViewHeader28 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader28();
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/user.userList.table.body.js?disableCache=0239
var userListTableBody28 = class extends extender55(renderCollection30, gridViewTableHeader28) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE28(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default28.visitor, "READ");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/item/user.userList.item.username.js?disableCache=0239
var userListItemTitle28 = class extends extender55(username29, gridViewBodyColumn28) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0239
var deleteButton84 = class extends button28 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default28.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0239
var userListItemActions28 = class extends extender55(gridViewBodyColumn28, gridViewBodyColumn28) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton84();
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/item/user.userList.item.js?disableCache=0239
var userListItem28 = class extends extender55(user29, gridViewRow28) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle28();
actions = new userListItemActions28();
cursor = "pointer";
background;
fontSize = 14;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default28.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/user.userList.table.js?disableCache=0239
var userListTable28 = class extends gridView28 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader28();
body = new userListTableBody28(userListItem28, new collection32(user29));
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/search.js?disableCache=0239
var searchBar84 = class extends input28 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/userList/user.userList.page.js?disableCache=0239
var editPage28 = class extends page28 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header28("Users");
search = new searchBar84();
userTable = new userListTable28();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.username.js?disableCache=0239
var editUsername28 = class extends extender55(username29, input28) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.username.row.js?disableCache=0239
var usernameRow28 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label55("Username");
username = new editUsername28();
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/empty.js?disableCache=0239
var empty28 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/user.edit.button.js?disableCache=0239
var userEditButton28 = class extends button28 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/user.edit.button.row.js?disableCache=0239
var saveButtonRow28 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty28();
userEditButton = new userEditButton28();
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0239
var checkRenderCollection28 = class extends renderCollection30 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default28.admin, "WRITE");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
this.allow(user_group_permission_default28.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.checkbox.js?disableCache=0239
var customCheckbox55 = class extends checkbox28 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0239
var customCheckbox56 = class extends user29 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label55();
checkbox = new customCheckbox55();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0239
var checkboxRow28 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label55("Select users");
renderCollection = new checkRenderCollection28(customCheckbox56, new collection32(user29));
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.select.option.js?disableCache=0239
var customOption28 = class extends extender55(option28, user29) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0239
var customSelect56 = class extends renderCollection30 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default55.createElement("select");
useCustomElement = true;
debug = true;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
permission() {
this.allow(user_group_permission_default28.admin, "WRITE");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
this.allow(user_group_permission_default28.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.select.row.js?disableCache=0239
var optionRow28 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label55("Select user");
renderCollection = new customSelect56(customOption28, new collection32(user29));
};
// framework/cache/platforms/Macos/Tablet/Dark/user/edit/edit.user.js?disableCache=0239
var editUser28 = class extends extender55(user29, page28) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header28("Edit user");
usernameRow = new usernameRow28();
selectRow = new optionRow28();
checkboxRow = new checkboxRow28();
showSelectedUser = new customSelect56(customOption28, this.selectedUsers);
saveButtonRow = new saveButtonRow28();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default28.admin, "WRITE");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
this.allow(user_group_permission_default28.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signup/signup.username.js?disableCache=0239
var signUpUsername28 = class extends extender55(username29, input28) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/inputPassword.js?disableCache=0239
var inputPassword28 = class extends input28 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signup/signup.password.js?disableCache=0239
var signupPassword28 = class extends inputPassword28 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signup/signup.passwordCheck.js?disableCache=0239
var signupPasswordCheck28 = class extends inputPassword28 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0239
var cookieManager29 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default29 = new cookieManager29();
// framework/cache/platforms/Macos/Tablet/Dark/user/signup/signup.button.js?disableCache=0239
var signupButton28 = class extends button28 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signup/signup.customLabel.js?disableCache=0239
var customLabel56 = class extends label55 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signup/user.signup.js?disableCache=0239
var signup28 = class extends extender55(user29, page28) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default55.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header28("Signup");
// Children
userLabel = new customLabel56("Username");
username = new signUpUsername28();
passwordLabel = new customLabel56("Password");
password = new signupPassword28();
passwordAgainLabel = new customLabel56("Password again");
passwordAgain = new signupPasswordCheck28();
signUpButton = new signupButton28();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default28.visitor, "PROCESS");
this.allow(user_group_permission_default28.member, "PROCESS");
this.allow(user_group_permission_default28.admin, "PROCESS");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signin/signin.username.js?disableCache=0239
var signinUsername28 = class extends extender55(username29, input28) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/user.password.js?disableCache=0239
var password28 = class extends inputPassword28 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signin/signin.password.js?disableCache=0239
var signinPassword28 = class extends password28 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signin/signin.button.js?disableCache=0239
var signinFormButton28 = class extends button28 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0239
var unify29 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default29 = new unify29();
// framework/cache/platforms/Macos/Tablet/Dark/user/signin/signin.cancel.button.js?disableCache=0239
var cancelButton56 = class extends button28 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Macos/Tablet/Dark/user/signin/user.signin.js?disableCache=0239
var tussenObject28 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword28();
width = "100%";
};
var buttons56 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton56();
signinButton = new signinFormButton28();
};
var hint28 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin28 = class extends extender55(user29, page28) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint28();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default55.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header28("Signin");
//userLabel = new label("Username");
username = new signinUsername28();
//passwordLabel = new label("Password");
tussenObject = new tussenObject28();
buttons = new buttons56();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user29();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default29.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user29();
client2.user = visitor62;
client2.user.error = false;
unify_default29.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default29.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default28.visitor, "PROCESS");
this.allow(user_group_permission_default28.member, "PROCESS");
this.allow(user_group_permission_default28.admin, "PROCESS");
this.allow(user_group_permission_default28.member, "READ");
this.allow(user_group_permission_default28.admin, "READ");
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/rightSide/rightSide.js?disableCache=0013
var rightSide28 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages28();
signup = new signup28();
signin = new signin28();
settings = new settings28();
fileManager = new fileManager28();
animations = new animations28();
gridExample = new gridExample28();
userListPage = new editPage28();
editUser = new editUser28();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
boxShadow = "-1px 0px 1px 0px #00000008";
background = "#2a2525e6";
background = "#282828";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0013
var documentTool56 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object86 = new documentTool56();
var document_default56 = object86.getDocument();
// framework/unify/math/vector2.js?disableCache=0013
var vector283 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/flexbox.js?disableCache=0013
var flexbox56 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/window/frostedGlass.js?disableCache=0013
var frostedGlass56 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.jpg')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Macos/Tablet/Dark/elements/window/draggable.js?disableCache=0013
var vector284 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay84(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay84, "delay");
var draggable56 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector284(0, 0);
grabPosition = new vector284(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector284(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay84(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector284(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Tablet/Dark/demo/application.js
var application29 = class extends extender54(frostedGlass56, flexbox56, draggable56) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton28();
leftSide = new leftSide28();
rightSide = new rightSide28();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "Inter";
//boxBackgroundImage = "url('/assets/images/wallpapers/ventura/dark/dark.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/ventura/dark/darkBlur.jpg')";
border = "1px solid #8f8f8f59";
outline = "1px solid black";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default56.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector283(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0273
function extender56(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender56, "extender");
// framework/unify/extender.js?disableCache=0723
function extender57(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender57, "extender");
// framework/cache/platforms/Macos/Pc/Light/elements/button.js?disableCache=0723
var button29 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 2;
margin = "4px 2px";
padding = "4px 20px";
color = "black";
background = "white";
border = "1px solid #e3e1e1";
fontSize = 14;
opaqueBackgroundColor = "white";
hoverBackgroundColor = "rgb(230 231 230 / 65%)";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/icon.js?disableCache=0723
var icon_id57 = 0;
var icon29 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id57++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Macos/Pc/Light/demo/minimizeButton.js?disableCache=0273
var minimizeButton29 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.js?disableCache=0723
var menuButton29 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
borderRadius = 8;
padding = 10;
paddingLeft = 20;
fontSize = 16;
fontWeight = "600";
hightlightBackgroundColor = "rgb(189 193 221 / 22%)";
color = "#343434";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.news.js?disableCache=0723
var newsButton29 = class extends menuButton29 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
borderTopLeftRadius = 8;
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.settings.js?disableCache=0723
var settingsButton85 = class extends menuButton29 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0723
var collection33 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0723
var datatype_default30 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0723
var documentTool57 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object87 = new documentTool57();
var document_default57 = object87.getDocument();
// framework/cache/platforms/Macos/Pc/Light/elements/option.js?disableCache=0723
var option29 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default57.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Macos/Pc/Light/user/group/user.group.js?disableCache=0723
var visitor58 = class extends option29 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member29 = class extends option29 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin57 = class extends option29 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups29 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member29();
admin = new admin57();
visitor = new visitor58();
};
// framework/cache/platforms/Macos/Pc/Light/user/group/user.group.permission.js?disableCache=0723
var user_group_permission_default29 = new groups29();
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.signin.js?disableCache=0723
var signinPageButton29 = class extends menuButton29 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.signup.js?disableCache=0723
var signinButton29 = class extends menuButton29 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0723
var visitor59 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager30 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor59();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default30 = new userManager30();
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.signout.js?disableCache=0723
var signoutButton29 = class extends menuButton29 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default30.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default29.member, "PROCESS");
this.allow(user_group_permission_default29.admin, "PROCESS");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.fileManager.js?disableCache=0723
var fileMangerButton29 = class extends menuButton29 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.animations.js?disableCache=0723
var settingsButton86 = class extends menuButton29 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.users.js?disableCache=0723
var usersPageButton29 = class extends menuButton29 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default29.member, "PROCESS");
this.allow(user_group_permission_default29.admin, "PROCESS");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.button.grid.js?disableCache=0723
var settingsButton87 = class extends menuButton29 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/header.js?disableCache=0723
var header29 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
margin = 6;
fontWeight = "bold";
fontSize = 16;
marginLeft = 4;
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.header.js?disableCache=0723
var menuHeader29 = class extends header29 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Light/demo/leftSide/leftSide.js?disableCache=0273
var leftSide29 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader29();
paddingTop = 40;
paddingLeft = 20;
background = "rgb(255 255 255 / 75%)";
color = "black";
fontWeight = "200";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton29();
settingsButton = new settingsButton85();
usersButton = new usersPageButton29();
signinButton = new signinPageButton29();
signoutButton = new signoutButton29();
signupButton = new signinButton29();
animationsButton = new settingsButton86();
gridButton = new settingsButton87();
fileManagerButton = new fileMangerButton29();
};
// framework/unify/table.js?disableCache=0723
var table31 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0723
var column29 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/news.title.js?disableCache=0723
var title85 = class extends column29 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/demo/news.body.js?disableCache=0723
var body57 = class extends column29 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/demo/news.price.js?disableCache=0723
var price29 = class extends column29 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default30.REAL;
};
// framework/cache/platforms/Macos/Pc/Light/user/user.username.js?disableCache=0723
var username30 = class extends column29 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0723
var tools31 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll30(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default30 = new tools31();
// framework/cache/platforms/Macos/Pc/Light/elements/input.js?disableCache=0723
var input29 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default57.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default57.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default57.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Macos/Pc/Light/user/user.salt.js?disableCache=0723
var salt30 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default30.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Light/user/user.hash.js?disableCache=0723
var hash30 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default30.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Light/user/user.js?disableCache=0723
var user30 = class _user extends table31 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username30();
salt = new salt30();
hash = new hash30();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups29();
selectedUsers = new collection33(_user);
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/comment.body.js?disableCache=0723
var body58 = class extends column29 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/comment.title.js?disableCache=0723
var title86 = class extends column29 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/comment.js?disableCache=0723
var comment30 = class extends table31 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user30();
title = new title86();
body = new body58();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Pc/Light/demo/news.js?disableCache=0723
var news29 = class extends table31 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title85();
body = new body57();
price = new price29();
comments = new collection33(comment30);
};
// framework/cache/platforms/Macos/Pc/Light/elements/tableCell.js?disableCache=0723
var tableCell29 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0723
var sortBy29 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.header.row.column.js?disableCache=0723
var gridViewRowColumn29 = class extends tableCell29 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
sortBy = new sortBy29();
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/header/news.list.header.body.js?disableCache=0723
var newsListHeaderBody29 = class extends gridViewRowColumn29 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/header/news.list.header.title.js?disableCache=0723
var newsListHeaderTitle29 = class extends gridViewRowColumn29 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/header/news.list.header.price.js?disableCache=0723
var newsListHeaderPrice29 = class extends gridViewRowColumn29 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/header/news.list.header.actions.js?disableCache=0723
var newsListHeaderActions29 = class extends gridViewRowColumn29 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default29.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.header.row.js?disableCache=0723
var gridViewTableRow29 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/header/news.list.header.js?disableCache=0723
var newsListHeader29 = class extends extender57(news29, gridViewTableRow29) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody29();
title = new newsListHeaderTitle29();
price = new newsListHeaderPrice29();
actions = new newsListHeaderActions29();
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.header.js?disableCache=0723
var gridViewHeader29 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "rgb(0 0 0 / 3%)";
borderBottom = "1px solid rgb(0 0 0 / 5%)";
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/news.list.table.header.js?disableCache=0723
var newsListTableHeader29 = class extends gridViewHeader29 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader29();
};
// framework/unify/renderCollection.js?disableCache=0723
var renderCollection31 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.body.js?disableCache=0723
var gridViewTableHeader29 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "rgb(0 0 0 / 1%)";
};
// framework/unify/sql/OR.js?disableCache=0723
function OR29(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR29, "OR");
// framework/unify/sql/LIKE.js?disableCache=0723
function LIKE29(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE29, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0723
function GREATER_OR_EQUAL29(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL29, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0723
function SMALLER_OR_EQUAL29(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL29, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Macos/Pc/Light/demo/list/news.list.table.body.js?disableCache=0723
var newsListTableBody29 = class extends extender57(renderCollection31, gridViewTableHeader29) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR29(OR29(LIKE29(filter.title, searchTerm), LIKE29(filter.comments.body, searchTerm)), LIKE29(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL29(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL29(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default29.visitor, "READ");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.body.row.column.js?disableCache=0723
var gridViewBodyColumn29 = class extends tableCell29 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 12;
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/item/news.list.item.body.js?disableCache=0723
var newsListItemBody29 = class extends extender57(body57, gridViewBodyColumn29) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/item/news.list.item.title.js?disableCache=0723
var newsListItemTitle29 = class extends extender57(title85, gridViewBodyColumn29) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/item/news.list.item.price.js?disableCache=0723
var newsListItemPrice29 = class extends extender57(price29, gridViewBodyColumn29) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0723
var deleteButton85 = class extends button29 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default29.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/item/news.list.item.actions.js?disableCache=0723
var newsListItemActions29 = class extends extender57(gridViewBodyColumn29, gridViewBodyColumn29) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton85();
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.body.row.js?disableCache=0723
var gridViewRow29 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/item/news.list.item.js?disableCache=0723
var newsListItem29 = class extends extender57(news29, gridViewRow29) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody29();
title = new newsListItemTitle29();
price = new newsListItemPrice29();
actions = new newsListItemActions29();
cursor = "pointer";
background;
fontSize = 14;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default29.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/gridView/gridView.js?disableCache=0723
var gridView29 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 2;
borderRadius = 4;
border = "1px solid rgb(0 0 0 / 5%)";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Light/demo/list/news.list.table.js?disableCache=0723
var newsListTable29 = class extends gridView29 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader29();
body = new newsListTableBody29(newsListItem29, new collection33(news29));
marginLeft = 6;
width = "auto";
margin = "6px -2px 10px 6px";
};
// framework/cache/platforms/Macos/Pc/Light/demo/edit/news.edit.title.js?disableCache=0723
var newsEditTitle29 = class extends extender57(input29, title85) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Macos/Pc/Light/elements/textarea.js?disableCache=0723
var textarea29 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
width = "70%";
background = "rgb(0 0 0 / 3%)";
background = "rgb(0 0 0 / 3%)";
color = "black";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default57.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/edit/news.edit.body.js?disableCache=0723
var newsPageBody57 = class extends extender57(body57, textarea29) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/edit/news.edit.button.js?disableCache=0723
var editButton57 = class extends button29 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/edit/news.edit.price.js?disableCache=0723
var newsPagePrice29 = class extends extender57(price29, input29) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/label.js?disableCache=0723
var label57 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
padding = 10;
paddingLeft = 0;
boxWidth = "100%";
};
// framework/cache/platforms/Macos/Pc/Light/elements/label/left.js?disableCache=0723
var leftLabel29 = class extends label57 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Macos/Pc/Light/elements/panel.js?disableCache=0723
var panel29 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
border = "1px solid rgb(241 241 241)";
background = "#fbfbfb";
borderRadius = 6;
marginRight = 20;
};
// framework/cache/platforms/Macos/Pc/Light/elements/window/draggable.js?disableCache=0723
var vector285 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay85(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay85, "delay");
var draggable57 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector285(0, 0);
grabPosition = new vector285(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector285(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay85(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector285(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/panel/row.js?disableCache=0723
var panelRow29 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
var children = this.parent.getChildren();
var count = children.length - 1;
var lastChild = children[count];
lastChild.borderBottom = "none";
}
margin = "0 6px";
borderBottom = "1px solid rgb(241 241 241)";
};
// framework/cache/platforms/Macos/Pc/Light/elements/window/header.js?disableCache=0723
var maximizeButton29 = class extends icon29 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton29 = class extends icon29 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(0)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl29 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton29();
maximizeButton = new maximizeButton29();
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title87 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl29 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader29 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl29();
title = new title87();
rightControl = new rightControl29();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
borderTopLeftRadius = "4px";
borderTopRightRadius = "4px";
//padding = 10;
//paddingLeft = 0;
boxWidth = "100%";
borderBottom = "1px solid #f1f1f1";
background = "white";
};
// framework/cache/platforms/Macos/Pc/Light/demo/edit/news.edit.js?disableCache=0723
var newsBodyRow29 = class extends panelRow29 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel29("Message");
body = new newsPageBody57();
};
var newsTitleRow29 = class extends panelRow29 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel29("Title");
title = new newsEditTitle29();
};
var newsPriceRow29 = class extends panelRow29 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel29("Price");
price = new newsPagePrice29();
};
var cancelButton57 = class extends button29 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow29 = class extends panelRow29 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton57();
newsEditbutton = new editButton57();
};
var newsEdit29 = class extends extender57(news29, panel29, draggable57) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader29("News");
layers = 2;
zIndex = 1e3;
fontFamily = "sf-ui";
width = 600;
//background = "white";
background = "#fdfdfdbf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow29();
newsPriceRow = new newsPriceRow29();
newsBodyRow = new newsBodyRow29();
newsButtonRow = new newsButtonRow29();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
this.allow(user_group_permission_default29.visitor, "READ");
this.allow(user_group_permission_default29.member, "WRITE");
this.allow(user_group_permission_default29.admin, "WRITE");
this.allow(user_group_permission_default29.visitor, "WRITE");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsDialogButton.js?disableCache=0723
var newsDialogButton29 = class extends button29 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/search.input.js?disableCache=0723
var searchBar85 = class extends input29 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/select.js?disableCache=0723
var select29 = class extends renderCollection31 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default57.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default29.admin, "READ");
this.allow(user_group_permission_default29.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default57.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/search.select.js?disableCache=0723
var customSelect57 = class extends select29 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/search.widget.js?disableCache=0723
var searchWidget29 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar85();
select = new customSelect57();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsItemPage.pagination.item.js?disableCache=0723
var paginationItem29 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsItemPage.pagination.js?disableCache=0723
var pagination29 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem29();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem29();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem29();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsItemPage.limit.js?disableCache=0723
var limit29 = class extends select29 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsItemPage.tableControl.js?disableCache=0723
var tableControl29 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label57("Select page:");
pagination = new pagination29();
limitLabel = new label57("Select items per page:");
limit = new limit29();
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsItemPage.js?disableCache=0723
var testbutton29 = class extends button29 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage29 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#ffffff";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header29("News Items");
searchWidget = new searchWidget29();
newsListTable = new newsListTable29();
tableControl = new tableControl29();
createNews = new newsEdit29();
testbutton = new testbutton29();
newsDialogButton = new newsDialogButton29();
};
// framework/cache/platforms/Macos/Pc/Light/elements/flexbox.js?disableCache=0723
var flexbox57 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Macos/Pc/Light/demo/page/news.page.title.js?disableCache=0723
var newsPageTitle29 = class extends extender57(title85, flexbox57) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
background = "#ffffff";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Macos/Pc/Light/demo/page/news.page.body.js?disableCache=0723
var newsPageBody58 = class extends extender57(flexbox57, body57) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
background = "#ffffff";
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/comments.messages.js?disableCache=0723
var commentsMessages29 = class extends renderCollection31 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR29(LIKE29(filter.body, this.value), LIKE29(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default29.visitor, "READ");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.saveButton.js?disableCache=0723
var saveEditButton29 = class extends button29 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.edit.title.js?disableCache=0723
var commentEditTitle57 = class extends title86 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.edit.body.js?disableCache=0723
var commentEditBody57 = class extends extender57(body58, flexbox57) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default57.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "white";
color = "black";
borderRadius = 12;
margin = 6;
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.userLabel.js?disableCache=0723
var userLabel57 = class extends label57 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.deleteButton.js?disableCache=0723
var deleteButton86 = class extends button29 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.editButton.js?disableCache=0723
var editButton58 = class extends button29 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.information.js?disableCache=0723
var information29 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton86();
_editButton = new editButton58();
_userLabel = new userLabel57();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/edit/comment.edit.js?disableCache=0723
var editComment29 = class extends comment30 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information29();
body = new commentEditBody57();
title = new commentEditTitle57();
saveButton = new saveEditButton29();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/create/comment.saveButton.js?disableCache=0723
var saveCommentButton29 = class extends button29 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/create/comment.create.body.js?disableCache=0723
var commentEditBody58 = class extends extender57(body58, textarea29) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Macos/Pc/Light/demo/comment/create/comment.create.js?disableCache=0723
var createComment29 = class extends comment30 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody58();
saveButton = new saveCommentButton29();
title = false;
author = this.user;
// bug destroys the permission system
background = "#ffffffd1";
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default29.member, "WRITE");
this.allow(user_group_permission_default29.admin, "WRITE");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/page/news.page.backButton.js?disableCache=0723
var backButton57 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
boxBackground = "#ffffff";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/page/news.page.edit.button.js?disableCache=0723
var backButton58 = class extends button29 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/filler.js?disableCache=0723
var filler29 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
background = "#ffffff";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Macos/Pc/Light/demo/page/search.comments.js?disableCache=0723
var searchBar86 = class extends input29 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/page/news.page.js?disableCache=0723
var testDiv29 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle29();
};
var newsPage29 = class extends news29 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "white";
flexDirection = "column";
_backButton = new backButton57();
_testDiv = new testDiv29();
body = new newsPageBody58();
editButton = new backButton58();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar86();
commentsMessages = new commentsMessages29(editComment29, this.comments);
createComment = new createComment29(this.comments);
filler = new filler29();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default29.member, "WRITE");
this.allow(user_group_permission_default29.admin, "WRITE");
this.allow(user_group_permission_default29.visitor, "WRITE");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
this.allow(user_group_permission_default29.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/newsPages.js?disableCache=0723
var newsPages29 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage29();
newsPage = new newsPage29();
newsEdit = new newsEdit29();
width = 1800;
};
// framework/cache/platforms/Macos/Pc/Light/elements/preloaders/simpleSpinner.js?disableCache=0723
var line29 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask29 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line29();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox29 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask29();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/themeSelector.image.js?disableCache=0723
var themaSelectorImage29 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/themeSelector.label.js?disableCache=0723
var selectLabel29 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "black";
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/themeSelector.js?disableCache=0723
var themeSelector29 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage29();
selectLabel = new selectLabel29();
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/os.selector.js?disableCache=0723
var themeOSSelectorItem29 = class extends themeSelector29 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default30.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/os.selector.list.js?disableCache=0723
var osSelectorList29 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem29("Windows");
themeMacOS = new themeOSSelectorItem29("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default30.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/os.label.js?disableCache=0723
var osLabel29 = class extends label57 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/os.js?disableCache=0723
var os29 = class extends panelRow29 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel29("Os");
osSelector = new osSelectorList29();
spinner = new preloaderBox29();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/tint.selector.js?disableCache=0723
var themeTintSelector29 = class extends themeSelector29 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default30.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0723
var themeTintSelectors29 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector29("Light");
themeDark = new themeTintSelector29("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default30.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/tint.label.js?disableCache=0723
var customLabel57 = class extends label57 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/rows/tint.js?disableCache=0723
var tint29 = class extends panelRow29 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel57("Appearance");
themeTintSelectors = new themeTintSelectors29();
spinner = new preloaderBox29();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/appearance/panel.js?disableCache=0723
var appearancePanel29 = class extends panel29 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os29();
tint = new tint29();
};
// framework/cache/platforms/Macos/Pc/Light/demo/pages/settings.js?disableCache=0723
var settings29 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#fdfdfd";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header29("Appearance");
appearancePanel = new appearancePanel29();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0723
var Console30 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default30 = new Console30();
// framework/unify/promiseManager.js?disableCache=0723
var promiseManager30 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0723
var shared30 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object88 = new shared30();
var shared_default30 = object88.get();
// framework/cache/platforms/Macos/Pc/Light/elements/fileUpload.js?disableCache=0723
var fileUpload29 = class extends input29 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager30();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0723
var delay86 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton29 = class extends icon29 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay86(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay86(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.icon.js?disableCache=0723
var fileIcon29 = class extends icon29 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton29();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.upload.js?disableCache=0723
var stream29 = class extends fileUpload29 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon29();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.list.js?disableCache=0723
var fileList29 = class extends panelRow29 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon29();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.removeIcons.js?disableCache=0723
var removeIcons29 = class extends icon29 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/page.js?disableCache=0723
var page29 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#fdfdfd";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Macos/Pc/Light/elements/image.js?disableCache=0723
var icon_id58 = 0;
var image29 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default57.createElement("img");
useCustomElement = true;
id = icon_id58++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/preview/previewWindow.image.js?disableCache=0723
var previewImage29 = class extends image29 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0723
var imagePreviewWindow29 = class extends draggable57 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader29();
previewImage = new previewImage29();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/fileChooser/fileChooser.file.icon.js?disableCache=0723
var fileChooserFileIcon29 = class extends icon29 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/checkbox.js?disableCache=0723
var checkbox29 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default57.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/fileChooser/fileChooser.file.js?disableCache=0723
var file29 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox29();
icon = new fileChooserFileIcon29();
label = new label57();
};
// framework/cache/platforms/Macos/Pc/Light/elements/fileChooser/fileChooser.files.js?disableCache=0723
var fileChooserFiles29 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file29();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/fileChooser/fileChooser.select.button.js?disableCache=0723
var fileChooserSelectButton29 = class extends button29 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/fileChooser/fileChooser.js?disableCache=0723
var fileChooser29 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
background = "white";
files = new fileChooserFiles29();
selectButton = new fileChooserSelectButton29();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/fileManager/fileManager.js?disableCache=0723
var fileManager29 = class extends page29 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header29("Upload");
fileupload = new stream29();
filesHeader = new header29("Files");
removeIcons = new removeIcons29();
fileList = new fileList29();
previewWindow = new imagePreviewWindow29();
fileChooser = new fileChooser29();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.move.js?disableCache=0723
var animationBlock197 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel197 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow29 = class extends panelRow29 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel197("Move");
animationBlock = new animationBlock197();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.rotate.js?disableCache=0723
var animationBlock198 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel198 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row169 = class extends panelRow29 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel198("Rotate");
animationBlock = new animationBlock198();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.color.js?disableCache=0723
var animationBlock199 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel199 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row170 = class extends panelRow29 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel199("Background color");
animationBlock = new animationBlock199();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.skewX.js?disableCache=0723
var animationBlock200 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel200 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row171 = class extends panelRow29 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel200("skewX");
animationBlock = new animationBlock200();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.rotateMoveColor.js?disableCache=0723
var animationBlock201 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel201 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row172 = class extends panelRow29 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel201("Rotate + Move + Background");
animationBlock = new animationBlock201();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.reverse.js?disableCache=0723
var animationBlock202 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton29 = class extends button29 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton29 = class extends button29 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton29 = class extends button29 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton29 = class extends button29 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton29 = class extends button29 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel202 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons57 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton29();
pauseButton = new pauseButton29();
stopButton = new stopButton29();
forwardButton = new forwardButton29();
backwardButton = new backwardButton29();
flexDirection = "column";
};
var row173 = class extends panelRow29 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel202("Reverse");
buttons = new buttons57();
animationBlock = new animationBlock202();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animation.render.js?disableCache=0723
var animationBlock203 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel203 = class extends label57 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row174 = class extends panelRow29 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel203("RenderLoop");
animationBlock = new animationBlock203();
};
// framework/cache/platforms/Macos/Pc/Light/demo/animations/animations.js?disableCache=0723
var animations29 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#fdfdfd";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow29();
rotateAnimation = new row169();
backgroundColor = new row170();
skewX = new row171();
rotateMoveColor = new row172();
reverse = new row173();
render = new row174();
};
// framework/cache/platforms/Macos/Pc/Light/demo/examples/grids.js?disableCache=0723
var label58 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a29 = class extends input29 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b30 = class extends input29 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c29 = class extends input29 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d29 = class extends input29 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA29 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label58("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a29();
b = new b30();
c = new c29();
d = new d29();
};
var gridB29 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label58("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a29();
b = new b30();
c = new c29();
d = new d29();
};
var gridExample29 = class extends page29 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA29();
gridB = new gridB29();
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/header/user.userList.header.username.js?disableCache=0723
var userListHeaderUsername29 = class extends gridViewRowColumn29 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/header/user.userList.header.actions.js?disableCache=0723
var userListHeaderActions29 = class extends gridViewRowColumn29 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default29.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/header/user.userList.header.js?disableCache=0723
var userListHeader29 = class extends extender57(user30, gridViewTableRow29) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername29();
actions = new userListHeaderActions29();
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/user.userList.table.header.js?disableCache=0723
var userListTableHeader29 = class extends gridViewHeader29 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader29();
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/user.userList.table.body.js?disableCache=0723
var userListTableBody29 = class extends extender57(renderCollection31, gridViewTableHeader29) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE29(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default29.visitor, "READ");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/item/user.userList.item.username.js?disableCache=0723
var userListItemTitle29 = class extends extender57(username30, gridViewBodyColumn29) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0723
var deleteButton87 = class extends button29 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default29.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/item/user.userList.item.actions.js?disableCache=0723
var userListItemActions29 = class extends extender57(gridViewBodyColumn29, gridViewBodyColumn29) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton87();
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/item/user.userList.item.js?disableCache=0723
var userListItem29 = class extends extender57(user30, gridViewRow29) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle29();
actions = new userListItemActions29();
cursor = "pointer";
background;
fontSize = 14;
mouseHoverColor = "rgb(255 255 255 / 95%)";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default29.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/user.userList.table.js?disableCache=0723
var userListTable29 = class extends gridView29 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader29();
body = new userListTableBody29(userListItem29, new collection33(user30));
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/search.js?disableCache=0723
var searchBar87 = class extends input29 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Pc/Light/user/userList/user.userList.page.js?disableCache=0723
var editPage29 = class extends page29 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header29("Users");
search = new searchBar87();
userTable = new userListTable29();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.username.js?disableCache=0723
var editUsername29 = class extends extender57(username30, input29) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.username.row.js?disableCache=0723
var usernameRow29 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label57("Username");
username = new editUsername29();
};
// framework/cache/platforms/Macos/Pc/Light/elements/empty.js?disableCache=0723
var empty29 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/user.edit.button.js?disableCache=0723
var userEditButton29 = class extends button29 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/user.edit.button.row.js?disableCache=0723
var saveButtonRow29 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty29();
userEditButton = new userEditButton29();
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0723
var checkRenderCollection29 = class extends renderCollection31 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default29.admin, "WRITE");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
this.allow(user_group_permission_default29.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.checkbox.js?disableCache=0723
var customCheckbox57 = class extends checkbox29 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.checkbox.tableRow.js?disableCache=0723
var customCheckbox58 = class extends user30 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label57();
checkbox = new customCheckbox57();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.checkbox.row.js?disableCache=0723
var checkboxRow29 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label57("Select users");
renderCollection = new checkRenderCollection29(customCheckbox58, new collection33(user30));
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.select.option.js?disableCache=0723
var customOption29 = class extends extender57(option29, user30) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.select.renderCollection.js?disableCache=0723
var customSelect58 = class extends renderCollection31 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default57.createElement("select");
useCustomElement = true;
debug = true;
width = "70%";
borderBottom = "1px solid #dedede";
background = "#f7f7f7";
color = "black";
opaqueBackgroundColor = "#f7f7f7";
focusBackgroundColor = "#f7f7f7";
focusBorderBottom = "1px solid #dedede";
blurBackgroundColor = "#F7FAFC";
blurBorderBottom = "1px solid #E5E5E5";
color = "#b1b1b1";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
permission() {
this.allow(user_group_permission_default29.admin, "WRITE");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
this.allow(user_group_permission_default29.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.select.row.js?disableCache=0723
var optionRow29 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label57("Select user");
renderCollection = new customSelect58(customOption29, new collection33(user30));
};
// framework/cache/platforms/Macos/Pc/Light/user/edit/edit.user.js?disableCache=0723
var editUser29 = class extends extender57(user30, page29) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header29("Edit user");
usernameRow = new usernameRow29();
selectRow = new optionRow29();
checkboxRow = new checkboxRow29();
showSelectedUser = new customSelect58(customOption29, this.selectedUsers);
saveButtonRow = new saveButtonRow29();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default29.admin, "WRITE");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
this.allow(user_group_permission_default29.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/signup/signup.username.js?disableCache=0723
var signUpUsername29 = class extends extender57(username30, input29) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Light/elements/inputPassword.js?disableCache=0723
var inputPassword29 = class extends input29 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Pc/Light/user/signup/signup.password.js?disableCache=0723
var signupPassword29 = class extends inputPassword29 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Macos/Pc/Light/user/signup/signup.passwordCheck.js?disableCache=0723
var signupPasswordCheck29 = class extends inputPassword29 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0723
var cookieManager30 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default30 = new cookieManager30();
// framework/cache/platforms/Macos/Pc/Light/user/signup/signup.button.js?disableCache=0723
var signupButton29 = class extends button29 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Macos/Pc/Light/user/signup/signup.customLabel.js?disableCache=0723
var customLabel58 = class extends label57 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Macos/Pc/Light/user/signup/user.signup.js?disableCache=0723
var signup29 = class extends extender57(user30, page29) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default57.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header29("Signup");
// Children
userLabel = new customLabel58("Username");
username = new signUpUsername29();
passwordLabel = new customLabel58("Password");
password = new signupPassword29();
passwordAgainLabel = new customLabel58("Password again");
passwordAgain = new signupPasswordCheck29();
signUpButton = new signupButton29();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default29.visitor, "PROCESS");
this.allow(user_group_permission_default29.member, "PROCESS");
this.allow(user_group_permission_default29.admin, "PROCESS");
}
};
// framework/cache/platforms/Macos/Pc/Light/user/signin/signin.username.js?disableCache=0723
var signinUsername29 = class extends extender57(username30, input29) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Macos/Pc/Light/user/user.password.js?disableCache=0723
var password29 = class extends inputPassword29 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Macos/Pc/Light/user/signin/signin.password.js?disableCache=0723
var signinPassword29 = class extends password29 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Macos/Pc/Light/user/signin/signin.button.js?disableCache=0723
var signinFormButton29 = class extends button29 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0723
var unify30 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default30 = new unify30();
// framework/cache/platforms/Macos/Pc/Light/user/signin/signin.cancel.button.js?disableCache=0723
var cancelButton58 = class extends button29 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Light/user/signin/user.signin.js?disableCache=0723
var tussenObject29 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword29();
width = "100%";
};
var buttons58 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton58();
signinButton = new signinFormButton29();
};
var hint29 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin29 = class extends extender57(user30, page29) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint29();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default57.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header29("Signin");
//userLabel = new label("Username");
username = new signinUsername29();
//passwordLabel = new label("Password");
tussenObject = new tussenObject29();
buttons = new buttons58();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user30();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default30.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user30();
client2.user = visitor62;
client2.user.error = false;
unify_default30.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default30.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default29.visitor, "PROCESS");
this.allow(user_group_permission_default29.member, "PROCESS");
this.allow(user_group_permission_default29.admin, "PROCESS");
this.allow(user_group_permission_default29.member, "READ");
this.allow(user_group_permission_default29.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/rightSide/rightSide.js?disableCache=0273
var rightSide29 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages29();
signup = new signup29();
signin = new signin29();
settings = new settings29();
fileManager = new fileManager29();
animations = new animations29();
gridExample = new gridExample29();
userListPage = new editPage29();
editUser = new editUser29();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
boxShadow = "-1px 0px 1px 0px #00000008";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0273
var documentTool58 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object89 = new documentTool58();
var document_default58 = object89.getDocument();
// framework/unify/math/vector2.js?disableCache=0273
var vector286 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Macos/Pc/Light/elements/flexbox.js?disableCache=0273
var flexbox58 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "black";
};
// framework/cache/platforms/Macos/Pc/Light/elements/window/frostedGlass.js?disableCache=0273
var frostedGlass58 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Macos/Pc/Light/elements/window/draggable.js?disableCache=0273
var vector287 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay87(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay87, "delay");
var draggable58 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector287(0, 0);
grabPosition = new vector287(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector287(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay87(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector287(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Pc/Light/demo/application.js
var application30 = class extends extender56(frostedGlass58, flexbox58, draggable58) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton29();
leftSide = new leftSide29();
rightSide = new rightSide29();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "Inter";
//boxBackgroundImage = "url('/assets/images/wallpapers/ventura/light/light.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default58.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector286(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/unify/extender.js?disableCache=0705
function extender58(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender58, "extender");
// framework/unify/extender.js?disableCache=0798
function extender59(...extenderArguments) {
class dummyExtend {
static {
__name(this, "dummyExtend");
}
callInstance(extenderArgument, argumentsOfSuper) {
var className2 = extenderArgument.name;
switch (className2) {
case "renderCollection":
this.collection = "test";
return new extenderArgument(argumentsOfSuper[0], argumentsOfSuper[1]);
break;
default:
return new extenderArgument();
}
}
getExtendMap() {
if (typeof document != "undefined") {
return document.extendMap;
} else {
return global.extendMap;
}
}
removeDuplicates(extendMap, parentClassName2) {
extendMap[parentClassName2] = extendMap[parentClassName2].filter((obj, index, arr) => {
return arr.map((mapObj) => mapObj.__className).indexOf(obj.__className) === index;
});
}
saveInstanceInExtendMap(instance2) {
var parentClassName2 = this.constructor.name;
var extendMap = this.getExtendMap();
if (!extendMap[parentClassName2]) {
extendMap[parentClassName2] = new Array();
}
extendMap[parentClassName2].push(instance2);
this.removeDuplicates(extendMap, parentClassName2);
}
inheritPropertiesA(arg2) {
var properties = Object.getOwnPropertyNames(arg2.prototype);
var propertiesFiltered = properties.filter((prop) => prop !== "constructor");
for (const prop of propertiesFiltered) {
if (!this[prop]) {
this[prop] = arg2.prototype[prop];
}
}
}
inheritPropertiesFromExtends(arg2, root2, level) {
if (level > 0) {
var extendedInstance = new arg2.constructor();
var prototype = Object.getPrototypeOf(extendedInstance);
var propertyNames = Object.getOwnPropertyNames(prototype);
propertyNames.forEach((methodName) => {
if (!extender_rejectMethods_default.includes(methodName)) {
if (!root2[methodName]) {
root2[methodName] = extendedInstance[methodName];
}
}
});
}
var extendedClass = tools_default.getExtendedClass(arg2);
if (extendedClass) {
this.inheritPropertiesFromExtends(extendedClass, root2, level + 1);
}
}
constructor(...argumentsOfSuper) {
for (const extenderArgument of extenderArguments) {
var instance2 = this.callInstance(extenderArgument, argumentsOfSuper);
Object.assign(this, instance2);
this.saveInstanceInExtendMap(instance2);
this.inheritPropertiesA(extenderArgument);
this.inheritPropertiesFromExtends(extenderArgument, this, 0);
}
}
}
class table33 {
static {
__name(this, "table");
}
createInstance() {
var instance2 = new arg();
Object.assign(this, instance2);
return instance2;
}
assureExtendMap() {
if (typeof document == "undefined") {
var extendMap = global.extendMap;
} else {
var extendMap = document.extendMap;
}
if (!extendMap[parentClassName]) {
extendMap[parentClassName] = new Array();
}
}
addInstanceToExtendMap(extendMap, instance2) {
var parentClassName2 = this.constructor.name;
extendMap[parentClassName2].push(instance2);
}
updateExtendMap(instance2) {
this.assureExtendMap();
this.addInstanceToExtendMap(instance2);
}
getProperties(arg2) {
return Object.getOwnPropertyNames(arg2.prototype).filter((prop) => prop !== "constructor");
}
updateProperties(arg2) {
var properties = this.getProperties(arg2);
for (const property2 of properties) {
this[property2] = arg2.prototype[property2];
}
}
/**
* Creates an instance of Class.
*
* @memberOf Class
*/
constructor(...opts) {
for (const arg2 of extenderArguments) {
var instance2 = this.createInstance();
this.updateExtendMap(instance2);
this.updateProperties(arg2);
}
}
}
var isTable = false;
for (const arg2 of extenderArguments) {
var instance = new arg2();
if (instance.constructor.name == "table") {
isTable = true;
}
}
if (isTable) {
return table33;
} else {
return dummyExtend;
}
}
__name(extender59, "extender");
// framework/cache/platforms/Macos/Pc/Dark/elements/button.js?disableCache=0798
var button30 = class {
static {
__name(this, "button");
}
__className = "button";
__sourcePath = "elements/button.js";
__nodeMethods = "";
__stateMethods = "";
height = "fit-content";
layers = 1;
fontWeight = "normal";
borderRadius = "4px";
fontSize = "12px";
cursor = "pointer";
color = "white";
width = "fit-content";
border = "1px solid #7f7b7b";
margin = 2;
margin = "4px 2px";
padding = "4px 20px";
color = "white";
background = "#282828";
hoverBackgroundColor = "#3e3e3e";
opaqueBackgroundColor = "#282828";
display = "block";
async mousedown() {
}
mouseover() {
this.background = this.hoverBackgroundColor;
}
mouseleave() {
this.background = this.opaqueBackgroundColor;
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/icon.js?disableCache=0798
var icon_id59 = 0;
var icon30 = class {
static {
__name(this, "icon");
}
__className = "icon";
__sourcePath = "elements/icon.js";
__nodeMethods = "";
__stateMethods = "";
id = icon_id59++;
constructor(name, invert) {
if (name) {
this.background = "url( assets/images/icons/" + name + " )";
}
if (invert) {
this.invert = 1;
this.filter = "invert(" + this.invert + ") ";
} else {
this.invert = 0;
this.filter = "invert(" + this.invert + ") ";
}
}
setImage(path2) {
this.background = "url( " + path2 + " )";
}
filter = "invert(1)";
editable = false;
backgroundSize = "contain";
width = 20;
height = 20;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/minimizeButton.js?disableCache=0705
var minimizeButton30 = class {
static {
__name(this, "minimizeButton");
}
__className = "minimizeButton";
__sourcePath = "demo/minimizeButton.js";
__nodeMethods = "";
__stateMethods = "";
//showFps = true;
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
zIndex = 5e3;
transition = "1s easeInOutQuart";
margin = 10;
position = "absolute";
bottom = "4px";
left = "0";
zIndex = "100000";
transform = "rotate(0)";
open() {
var menu = this.parent.leftSide;
this.transform = "scale(1, 1)";
menu.boxWidth = 220;
menu.state = "visible";
this.parent.rightSide.borderRadius = "";
}
close() {
var menu = this.parent.leftSide;
this.transform = "scale(-1, 1)";
menu.boxWidth = "0";
menu.state = "hidden";
var that2 = this;
setTimeout(function() {
console.log("asd");
that2.parent.rightSide.borderRadius = 12;
}, 1e3);
}
click() {
var menu = this.parent.leftSide;
var state2 = menu.state;
if (state2 == "visible") {
this.close();
} else {
this.open();
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.js?disableCache=0798
var menuButton30 = class {
static {
__name(this, "menuButton");
}
__className = "menuButton";
__sourcePath = "demo/leftSide/leftSide.button.js";
__nodeMethods = "";
__stateMethods = "activateButton,deactivateButton";
width = 110;
color;
background;
fontWeight;
activated = false;
propegateEvent = false;
cursor = "pointer";
borderRadius = 8;
padding = 10;
paddingLeft = 20;
fontSize = 16;
fontWeight = "600";
hightlightBackgroundColor = "rgb(189 193 221 / 22%)";
activated = false;
activateButton() {
this.activated = true;
this.highlightButton();
}
deactivateButton() {
this.activated = false;
this.lowlightButton();
}
highlightButton() {
this.background = this.hightlightBackgroundColor;
if (!this.activated) {
}
}
lowlightButton() {
if (!this.activated) {
this.background = "";
}
}
mouseover() {
this.highlightButton();
}
mouseleave() {
if (!this.activated) {
this.lowLightButtons();
}
}
deactivateButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deactivateButton) {
child.deactivateButton();
}
}
}
lowLightButtons() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.lowlightButton) {
child.lowlightButton();
}
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.news.js?disableCache=0798
var newsButton30 = class extends menuButton30 {
static {
__name(this, "newsButton");
}
__className = "newsButton";
__sourcePath = "demo/leftSide/leftSide.button.news.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Home";
borderTopLeftRadius = 8;
create() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
if (!pathParts[1]) {
this.stateMachine.composeState();
}
this.openPage();
}
async click() {
this.stateMachine.composeState("Home");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
console.log("rightSide", rightSide31);
rightSide31.newsPages.newsItemPage.transform = "translateX(0)";
rightSide31.newsPages.newsPage.transform = "translateX(0)";
rightSide31.hideChildren();
rightSide31.newsPages.show();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.settings.js?disableCache=0798
var settingsButton88 = class extends menuButton30 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.settings.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Appearance";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.settings.show();
}
};
// framework/unify/collection.js?disableCache=0798
var collection34 = class extends collection2 {
static {
__name(this, "collection");
}
__className = "collection";
type = "collection";
rows = new Array();
filterObject = false;
object;
tableName;
parentName;
constructor(object93) {
super();
if (object93) {
this.object = object93;
}
}
createInstance() {
return new this.object();
}
getFilter() {
if (!this.filterObject) {
this.filterObject = new this.object();
}
this.filterObject.__className = "placeholder";
return this.filterObject;
}
getParentName() {
var parentTable = this.parent;
if (!tools_default.objectIsTable(this.parent)) {
parentTable = tools_default.getTableFromObject(this.parent);
}
var parentClassName2 = tools_default.getClassName(parentTable);
if (!parentClassName2) {
parentClassName2 = this.tableName;
}
return parentClassName2;
}
getTableName() {
var tableInstance = new this.object();
return tools_default.getClassName(tableInstance);
}
getRight(update = true) {
if (update) {
this.update();
}
var tableName = this.tableName;
if (tableName == this.parentName) {
tableName += 0;
}
return tableName;
}
getLeft(update = true) {
if (update) {
this.update();
}
if (this.parentName) {
var parentName = this.parentName;
} else {
var parentName = this.getParentName();
}
if (this.tableName == parentName) {
parentName += 1;
}
return parentName;
}
update() {
if (!this.enabled) {
this.tableName = this.getTableName();
if (this.parent) {
this.parentName = this.getParentName();
}
}
}
getColumnName() {
var parentClassName2 = this.getParentName();
return parentClassName2 + "_" + this.propertyName + "_id";
}
set(objects) {
this.rows = objects;
}
addObject(object93) {
this.rows.push(object93);
}
filter(by, term) {
switch (by.toLowerCase()) {
case "custom":
this.filterCustom(term);
break;
case "class":
this.filterByClassName(term);
break;
case "name":
this.filterByName(term);
break;
case "id":
this.filterByID(term);
break;
case "parent":
this.filterByParent(term);
break;
case "parentName":
this.filterByParentName(term);
break;
case "type":
this.filterByType(term);
break;
}
}
filterCustom(func) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (func(object93)) {
this.rows.push(object93);
}
}
}
filterByType(type) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.type == type) {
this.rows.push(object93);
}
}
}
filterByCollection(collection_a) {
this.rows = new Array();
var objects = this.rows;
for (var c31 = 0; c31 < objects.length; c31++) {
var renderCollection33 = objects[c31];
var collection_b = renderCollection33.getCollection();
if (collection_b.propertyName == collection_a.propertyName) {
this.rows.push(object);
}
}
}
filterByClassName(className2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93) == className2) {
this.rows.push(object93);
}
}
}
filterByName(name) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.propertyName == name) {
this.rows.push(object93);
}
}
}
filterByID(id2) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (object93.id == id2) {
this.rows.push(object93);
}
}
}
filterByParent(parent) {
this.filterByParentName(tools_default.getClassName(parent));
}
filterByParentName(parentName) {
var objects = this.rows;
this.rows = new Array();
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
if (tools_default.getClassName(object93.parent) == parentName) {
this.rows.push(object93);
}
}
}
getFirstRow() {
return this.rows[0];
}
};
// framework/unify/datatype.js?disableCache=0798
var datatype_default31 = {
"BOOLEAN": "BOOLEAN",
"INTEGER": "INTEGER",
"REAL": "REAL",
"VARCHAR": "TEXT",
"TEXT": "TEXT",
"BLOB": "BLOB"
};
// framework/unify/document.js?disableCache=0798
var documentTool59 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object90 = new documentTool59();
var document_default59 = object90.getDocument();
// framework/cache/platforms/Macos/Pc/Dark/elements/option.js?disableCache=0798
var option30 = class {
static {
__name(this, "option");
}
__className = "option";
__sourcePath = "elements/option.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default59.createElement("option");
layers = 1;
parseChildren = false;
useCustomElement = true;
editable = true;
preventUpdating = true;
padding = 4;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
constructor(value2, label61) {
if (value2) {
this.value = value2;
}
if (label61) {
this.label = label61;
}
}
setup() {
if (this.label) {
this.customElement.innerHTML = this.label;
this.customElement.value = this.value;
}
if (this.selected) {
this.customElement.setAttribute("selected", "true");
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/group/user.group.js?disableCache=0798
var visitor60 = class extends option30 {
static {
__name(this, "visitor");
}
__className = "visitor";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 2;
label = "Visitor";
type = "userGroup";
constructor() {
super();
}
};
var member30 = class extends option30 {
static {
__name(this, "member");
}
__className = "member";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 0;
ander = 0;
label = "Member";
type = "userGroup";
constructor() {
super();
}
};
var admin59 = class extends option30 {
static {
__name(this, "admin");
}
__className = "admin";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
value = 1;
label = "Admin";
type = "userGroup";
constructor() {
super();
}
};
var groups30 = class {
static {
__name(this, "groups");
}
__className = "groups";
__sourcePath = "user/group/user.group.js";
__nodeMethods = "";
__stateMethods = "";
datatype = "TEXT";
value = 2;
enabled = false;
type = "column";
change() {
var children = this.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.customElement.selected) {
this.value = child.customElement.value;
}
}
}
create() {
this.customElement.value = parseFloat(this.value);
}
member = new member30();
admin = new admin59();
visitor = new visitor60();
};
// framework/cache/platforms/Macos/Pc/Dark/user/group/user.group.permission.js?disableCache=0798
var user_group_permission_default30 = new groups30();
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.signin.js?disableCache=0798
var signinPageButton30 = class extends menuButton30 {
static {
__name(this, "signinPageButton");
}
__className = "signinPageButton";
__sourcePath = "demo/leftSide/leftSide.button.signin.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signin";
click() {
this.stateMachine.composeState("Signin");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.signin.show();
}
enableREAD() {
this.hide();
}
disableREAD() {
this.show();
}
permission() {
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.signup.js?disableCache=0798
var signinButton30 = class extends menuButton30 {
static {
__name(this, "signinButton");
}
__className = "signinButton";
__sourcePath = "demo/leftSide/leftSide.button.signup.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signup";
click() {
this.stateMachine.composeState("Signup");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.hideChildren();
rightSide31.signup.show();
}
};
// framework/server/userManager.js?disableCache=0798
var visitor61 = class {
static {
__name(this, "visitor");
}
value = 2;
label = "Member";
color = "black";
type = "userGroup";
};
var userManager31 = class {
static {
__name(this, "userManager");
}
computePermissions(object93, user32) {
var permissions = new Object();
if (object93.isAllowed(user32, "WRITE")) {
permissions.WRITE = true;
} else {
permissions.WRITE = false;
}
if (object93.isAllowed(user32, "DELETE")) {
permissions.DELETE = true;
} else {
permissions.DELETE = false;
}
if (object93.isAllowed(user32, "READ")) {
permissions.READ = true;
} else {
permissions.READ = false;
}
return permissions;
}
getPermissions(user32, client2) {
var root2 = client2.application;
client2.permissionObjects = [];
this.getPermissionsChildren(user32, client2, root2);
return client2.permissionObjects;
}
createToken() {
var token = "";
for (var i = 0; i < 40; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
getPermissionsRenderCollection(object93, client2, user32) {
var rows = object93.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var rowObject = rows[b32];
var permission2 = this.getPermissionFromObject(rowObject, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
}
}
getPermissionsChildrenObjects(objects, client2, user32) {
for (var c31 = 0; c31 < objects.length; c31++) {
var object93 = objects[c31];
var permission2 = this.getPermissionFromObject(object93, user32);
if (permission2) {
client2.permissionObjects.push(permission2);
}
if (object93.type == "renderCollection") {
this.getPermissionsRenderCollection(object93, client2, user32);
}
this.getPermissionsChildren(user32, client2, object93);
}
}
getPermissionsChildren(user32, client2, object93) {
unify_default.extend(object93);
if (object93.getChildren) {
var objects = object93.getChildren();
var permissionObjects = new Array();
this.getPermissionsChildrenObjects(objects, client2, user32);
}
}
getPermissionFromObject(object93, user32) {
var permissionManager2 = object93.permissionManager;
if (permissionManager2 && permissionManager2.permissions.length > 0 && object93.parent) {
var objectPermission = {};
objectPermission.path = object93.getApplicationPathString();
objectPermission.permission = this.computePermissions(object93, user32);
return objectPermission;
}
return false;
}
createVisitor(client2) {
var table33 = new global.user();
table33.username.value = "Visitor";
table33.id = 0;
table33.groups = new visitor61();
table33.permissionObjects = this.getPermissions(table33, client2);
return table33;
}
signOut(cookieUser, client2, eventName) {
if (client2.user) {
client2.user.get();
client2.user.sessionKey.value = "";
client2.user.save();
}
var table33 = this.createVisitor(client2);
client2.user = table33;
global.core.setUserObjects(false, client2);
return table33;
}
signin(object93, client2, force = false) {
console.log("try to sign in");
var visitor62 = this.createVisitor(client2);
if (object93.table) {
table33 = object93;
} else {
var table33 = new global.user();
}
client2.user = visitor62;
client2.user.error = false;
unify_default.extend(table33);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
console.log("try to sign in hash", hash32);
var password31 = object93.password.value;
if (object93.sessionKey.value != "") {
var sign = object93.sessionKey.value == fetchedUser.sessionKey;
}
if (!sign) {
var sign = global.bcrypt.compareSync(password31, hash32);
}
console.log("sign in with password", sign);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
if (sign || force) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
if (fetchedUser.activation == "true") {
table33.get();
} else {
console.log("not activated");
table33.activation.value = false;
}
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = this.getPermissions(table33, client2);
table33.username.value = username32;
if (fetchedUser.activation == "true") {
if (table33.sessionKey.value == "") {
table33.sessionKey.value = this.createToken();
if (fetchedUser.activation == "true") {
table33.save();
}
}
}
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
if (client2.user.status == "success") {
} else {
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
if (client2.user.error) {
client2.user.error = "Wrong Password or Username";
}
return client2.user;
}
};
var userManager_default31 = new userManager31();
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.signout.js?disableCache=0798
var signoutButton30 = class extends menuButton30 {
static {
__name(this, "signoutButton");
}
__className = "signoutButton";
__sourcePath = "demo/leftSide/leftSide.button.signout.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Signout";
create() {
this.hide();
}
async click() {
this.stateMachine.composeState("Signout");
await this.openPage();
}
async openPage() {
this.deactivateButtons();
this.activateButton();
console.log("before process", this);
var visitorUser = await this.process();
console.log("?? ?", visitorUser);
console.log(visitorUser.permissionObjects);
this.getCore().updatePermissions(visitorUser.permissionObjects);
}
createVisitor(client2) {
var table33 = new user();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default31.getPermissions(table33, client2);
return table33;
}
process(object93, client2) {
var newUser = this.createVisitor(client2);
client2.user = newUser;
global.core.setUserObjects(false, client2);
return newUser;
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default30.member, "PROCESS");
this.allow(user_group_permission_default30.admin, "PROCESS");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.fileManager.js?disableCache=0798
var fileMangerButton30 = class extends menuButton30 {
static {
__name(this, "fileMangerButton");
}
__className = "fileMangerButton";
__sourcePath = "demo/leftSide/leftSide.button.fileManager.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "File Manager";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("File Manager");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.fileManager.show();
rightSide31.fileManager.fileList.create();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.animations.js?disableCache=0798
var settingsButton89 = class extends menuButton30 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.animations.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Animations";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Animations");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.animations.show();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.users.js?disableCache=0798
var usersPageButton30 = class extends menuButton30 {
static {
__name(this, "usersPageButton");
}
__className = "usersPageButton";
__sourcePath = "demo/leftSide/leftSide.button.users.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Users";
click() {
this.stateMachine.composeState("Users");
this.openPage();
}
openPage() {
this.deactivateButtons();
this.activateButton();
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
rightSide31.width = "";
rightSide31.hideChildren();
rightSide31.userListPage.show();
rightSide31.userListPage.userTable.body.create();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default30.member, "PROCESS");
this.allow(user_group_permission_default30.admin, "PROCESS");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.button.grid.js?disableCache=0798
var settingsButton90 = class extends menuButton30 {
static {
__name(this, "settingsButton");
}
__className = "settingsButton";
__sourcePath = "demo/leftSide/leftSide.button.grid.js";
__nodeMethods = "";
__stateMethods = "openPage";
text = "Grids";
create() {
}
touchstart() {
this.click();
}
async click() {
this.stateMachine.composeState("Appearance");
this.openPage();
}
openPage() {
var application32 = this.parent.parent;
var rightSide31 = application32.rightSide;
var menu = application32.leftSide;
this.deactivateButtons();
this.activateButton();
rightSide31.hideChildren();
rightSide31.gridExample.show();
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/header.js?disableCache=0798
var header30 = class {
static {
__name(this, "header");
}
__className = "header";
__sourcePath = "elements/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
gridArea = "passwordLabel";
text = "password";
color = "#665f5f";
padding = 10;
margin = 6;
fontWeight = "bold";
fontSize = 16;
marginLeft = 4;
color = "white";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.header.js?disableCache=0798
var menuHeader30 = class extends header30 {
static {
__name(this, "menuHeader");
}
__className = "menuHeader";
__sourcePath = "demo/leftSide/leftSide.header.js";
__nodeMethods = "";
__stateMethods = "";
text = "Menu";
flexDirection = "column";
fontSize = 36;
paddingTop = 100;
fontWeight = "300";
paddingBottom = 100;
textAlign = "center";
width = "100vw";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/leftSide/leftSide.js?disableCache=0705
var leftSide30 = class {
static {
__name(this, "leftSide");
}
__className = "leftSide";
__sourcePath = "demo/leftSide/leftSide.js";
__nodeMethods = "";
__stateMethods = "";
state = "visible";
boxOverflow = "hidden";
boxTransition = "0.3S";
boxHeight = "";
boxWidth = 220;
width = 220;
flexDirection = "column";
//borderRight = "1px solid #3D3D3D"
paddingTop = 30;
//minHeight = "40vh"
header = new menuHeader30();
paddingTop = 40;
paddingLeft = 20;
background = "rgb(40 22 22 / 75%)";
color = "white";
borderRight = "1px solid black";
fontWeight = "bold";
render() {
}
//opacity = "90%";
//backdropFilter = "blur(20px)";
borderTopLeftRadius = 8;
borderBottomLeftRadius = 8;
borderTopLeftRadius = "12px";
borderBottomLeftRadius = "12px";
newsButton = new newsButton30();
settingsButton = new settingsButton88();
usersButton = new usersPageButton30();
signinButton = new signinPageButton30();
signoutButton = new signoutButton30();
signupButton = new signinButton30();
animationsButton = new settingsButton89();
gridButton = new settingsButton90();
fileManagerButton = new fileMangerButton30();
};
// framework/unify/table.js?disableCache=0798
var table32 = class extends table2 {
static {
__name(this, "table");
}
__className = "table";
signed = new signed();
user = "userplaceholder";
permissions = new Array();
secure = false;
constructor(argument, parent) {
super();
unify_default.extend(this);
if (argument) {
this.handleArgument(argument);
}
if (parent) {
this.parent = parent;
}
}
handleArgument(argument) {
if (typeof argument == "number") {
this.id = argument;
}
if (tools_default.getClassName(argument) == "collection") {
this.setCollection(argument);
}
}
getCollection() {
if (this.collections.length > 0) {
return this.collections[0];
} else {
return false;
}
}
};
// framework/unify/column.js?disableCache=0798
var column30 = class {
static {
__name(this, "column");
}
datatype = datatype_default.VARCHAR;
value = "";
type = "column";
defineSetter() {
var that2 = this;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
}
defineGetter() {
var that2 = this;
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
}
setup() {
this._useCustomElement = this.useCustomElement;
this.defineSetter();
this.defineGetter();
this.setupElement();
}
setAttributes() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
}
serializeSizing() {
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
}
replaceCustomElement(parentNode) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
replaceDefaultElement(parentNode) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
handleDOMReplacement() {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
this.replaceCustomElement(parentNode);
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
this.replaceDefaultElement(parentNode);
}
}
}
setupElement() {
if (this.customElement) {
this.setAttributes();
this.serializeSizing();
}
if (this.element) {
this.handleDOMReplacement();
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/news.title.js?disableCache=0798
var title88 = class extends column30 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/news.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/news.body.js?disableCache=0798
var body59 = class extends column30 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/news.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/news.price.js?disableCache=0798
var price30 = class extends column30 {
static {
__name(this, "price");
}
__className = "price";
__sourcePath = "demo/news.price.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default31.REAL;
};
// framework/cache/platforms/Macos/Pc/Dark/user/user.username.js?disableCache=0798
var username31 = class extends column30 {
static {
__name(this, "username");
}
__className = "username";
__sourcePath = "user/user.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/unify/tools.js?disableCache=0798
var tools32 = class {
static {
__name(this, "tools");
}
css = new css();
isUnifyObject(propertyName2, propertyValue) {
const rejectClassNames = new Array("core", "cssRules", "stateMachine", "socketManager", "animationManager", "permissionManager", "permissionObject", "fileLoader", "WriteStream", "client");
const rejectPropertyNames = new Array("objectToManipulate", "parent", "client", "queryRoot", "queryChildren", "queryCount");
if (propertyValue && typeof propertyValue.parseUnify == "boolean" && propertyValue.parseUnify == false) {
return false;
}
if (propertyValue == null) {
return false;
}
if (!propertyValue) {
return false;
}
var className2 = this.getClassName(propertyValue);
if (rejectPropertyNames.includes(propertyName2)) {
return false;
}
if (rejectClassNames.includes(className2)) {
return false;
}
if (Array.isArray(propertyValue)) {
return false;
}
if (this.getEnvironment() == "Browser") {
if (propertyValue instanceof HTMLElement) {
return false;
}
}
if (typeof propertyValue == "object") {
return true;
} else {
return false;
}
}
reverseString(string) {
var splitString = string.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;
}
slash(path2) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path2);
if (isExtendedLengthPath) {
return path2;
}
return path2.replace(/\\/g, "/");
}
serializeString(json) {
if (Buffer.isBuffer(json)) {
return json.toString();
} else {
return json;
}
}
isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
serializeJSON(json) {
if (this.isJsonString(json)) {
return JSON.parse(json);
}
}
createOrderedArray(array) {
var keys2 = Object.keys(array);
var output = new Array();
for (var i = 0; i < keys2.length; i++) {
var key = keys2[i];
output[i] = array[key];
}
return output;
}
getEnvironment() {
if (typeof document != "undefined") {
return "Browser";
}
if (global) {
return "Node";
}
}
// Security
getObjectByPath(application32, applicationPath) {
var objectName = applicationPath.pop();
if (!application32[objectName] || typeof application32[objectName] != "string") {
}
var currentApplication = application32[objectName];
if (!currentApplication) {
}
if (applicationPath.length > 0) {
return this.getObjectByPath(currentApplication, applicationPath);
} else {
return currentApplication;
}
}
isNumber(value2) {
return typeof value2 === "number" && isFinite(value2);
}
isNumberObject(n) {
return Object.prototype.toString.apply(n) === "[object Number]";
}
isCustomNumber(n) {
return this.isNumber(n) || this.isNumberObject(n);
}
structuredClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var create2 = Object.create(prototype);
return Object.assign(create2, object93);
}
extendedClassIsColumn() {
}
isUnifyColumn(object93) {
var extendedClasses = this.getExtendedClassesMulti(object93);
var isColumn = false;
for (var j = 0; j < extendedClasses.length; j++) {
var extendedClass = extendedClasses[j];
var className2 = this.getClassName(extendedClass);
if (className2 == "column") {
isColumn = object93;
}
}
return isColumn;
}
filterPrims(item, prims, type) {
if (prims[type].hasOwnProperty(item)) {
return false;
} else {
prims[type][item] = true;
return true;
}
}
filterObjects(item) {
var filterObjects = this.filterObjects;
if (filterObjects.indexOf(item) >= 0) {
return false;
} else {
filterObjects.push(item);
return filterObjects;
}
}
uniqueFilter(item) {
var type = typeof item;
var prims = this.prims;
if (type in prims) {
return this.filterPrims(item, prims, type);
} else {
return this.filterObjects(item);
}
}
uniqueArrayRows(a32) {
this.prims = new Object();
this.prims.boolean = new Object();
this.prims.number = new Object();
this.prims.string = new Object();
this.filterObjects = new Array();
return a32.filter(this.uniqueFilter.bind(this));
}
simpleClone(object93) {
var prototype = Object.getPrototypeOf(object93);
var created = Object.create(prototype);
let clone2 = Object.assign(created, object93);
return clone2;
}
getPrototypeRecursive(object93, properties = new Array()) {
properties.push(...Object.getOwnPropertyNames(object93));
var prototype = Object.getPrototypeOf(object93);
if (prototype) {
return this.getPrototypeRecursive(prototype, properties);
} else {
return properties;
}
}
filterFunctions(element2, index, arr) {
var nextElement = arr[index + 1];
var elementType = typeof this[element2];
if (element2 != nextElement && elementType == "function") {
return true;
}
}
getAllFuncs(object93) {
var properties = this.getPrototypeRecursive(object93);
var sorted = properties.sort();
var filterd = sorted.filter(this.filterFunctions.bind(object93));
return filterd;
}
createRandomKey(numCharacters) {
var token = "";
for (var i = 0; i < numCharacters; i++) {
token += Math.floor(Math.random() * 10);
}
return token;
}
isCSSProperty(propertyName2) {
var object93 = definitions_default.css;
if (typeof object93[propertyName2] !== "undefined") {
return true;
} else {
return false;
}
}
hasUserPrototype(obj) {
return obj.constructor !== Object;
}
addTabToArrayLines(lines, numSpaces) {
var tabbedRows = new Array();
for (var i = 0; i < lines.length; i++) {
var row181 = lines[i];
tabbedRows[i] = "".padEnd(numSpaces) + row181;
}
return tabbedRows;
}
addTabToBeginOfString(string, numSpaces) {
var lines = string.split("\n");
var tabbedRows = this.addTabToArrayLines(lines, numSpaces);
return tabbedRows.join("\n");
}
addTabToBegin(string, numSpaces) {
if (typeof string == "string") {
return this.addTabToBeginOfString(string, numSpaces);
} else {
return string;
}
}
getChildFromEntry(parent, entry, children) {
const invalid = new Array("parent", "table", "user");
var name = this.getClassNameByEntry(entry);
var child = this.getObjectByEntry(entry);
if (!this.isUnifyObject(name, child)) {
return false;
}
if (invalid.includes(name)) {
return false;
}
child.propertyName = name;
child.parent = parent;
children.push(child);
}
getChildren(object93, bindParent = true) {
var children = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.getChildFromEntry(object93, entry, children);
}
return children;
}
addPropertyToArray(property2, properties) {
const invalid = new Array("user");
if (this.isUnifyObject(property2.name, property2.value)) {
return false;
}
if (invalid.includes(property2.name)) {
return false;
}
properties.push(property2);
}
createPropertyFromEntry(entry) {
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
var property2 = new Object();
property2.name = name;
property2.value = object93;
return property2;
}
getProperties(object93) {
var properties = new Array();
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
var property2 = this.createPropertyFromEntry(entry);
this.addPropertyToArray(property2, properties);
}
return properties;
}
replaceChildWithFragment(source, newType) {
const frag = document.createDocumentFragment();
while (source.firstChild) {
frag.appendChild(source.firstChild);
}
const newElem = document.createElement(newType);
newElem.appendChild(frag);
source.parentNode.replaceChild(newElem, source);
}
replaceElement(source, newType, parentElement) {
if (parentElement) {
source.parentNode = parentElement;
}
if (source.tagName != newType.toUpperCase()) {
this.replaceChildWithFragment(source, newType);
}
}
parseObject(object93) {
var entries = Object.entries(object93);
return entries[0];
}
getFirstEntry(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return entries[0];
} else {
return false;
}
}
getExtendedClass(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
return object93.prototype.__proto__;
}
removeDuplicates(arr) {
return arr.filter((item, index) => arr.indexOf(item) === index);
}
removeEmptyRows(arr) {
return arr.filter((n) => n);
}
isVisible(element2) {
if (!element2) {
return false;
}
if (!element2.offsetWidth) {
return false;
}
return element2.offsetWidth > 0 || element2.offsetHeight > 0;
}
getExtendedObjects(object93) {
if (!object93.getClassName) {
return false;
}
if (typeof document == "undefined") {
var extendedObjects = global.extendMap[object93.getClassName()];
} else {
var extendedObjects = document.extendMap[object93.getClassName()];
}
return extendedObjects;
}
getSingleExtendedClassInArray(object93) {
if (!object93.prototype) {
object93 = object93.constructor;
}
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
} else {
return new Array(new extendedClass.constructor());
}
}
getExtendedClassesMulti(object93) {
var extendedObjects = this.getExtendedObjects(object93);
if (extendedObjects) {
return extendedObjects;
} else {
return this.getSingleExtendedClassInArray(object93);
}
}
getExtendedClassName(object93) {
return this.getClassName(this.getExtendedClass(object93));
}
logError(message) {
console.log(this.consoleColors().red(message));
}
debugVar(object93, variable) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.toString() + ")");
var variableColor = colors.magenta(variable);
console.log(variableColor + pathColor);
}
logParameter2(parameter2) {
if (typeof parameter2 == "string") {
console.log(parameter2);
} else {
this.logObject(parameter2);
}
}
log(parameter1, parameter2, parameter3) {
var colors = this.consoleColors();
if (typeof parameter1 == "string") {
console.log(colors.yellow("\n\n" + parameter1));
} else {
this.logObject(parameter1);
}
if (parameter2) {
this.logParameter2(parameter2);
}
}
logObject(object93) {
var colors = this.consoleColors();
var path2 = this.getApplicationPath(object93);
var pathColor = colors.red("(" + path2.reverse().toString() + ")");
console.log(pathColor + " " + this.getClassName(object93));
console.log(this.serialize(object93));
}
saveImportDefault(importObject) {
if (importObject.default) {
return importObject.default;
} else {
console.log("error2 ", url, " does not exist");
}
}
async saveImport(url2) {
var importObject = await import(url2);
if (importObject) {
return this.saveImportDefault(importObject);
} else {
console.log("error1 ", url2, " does not exist");
}
}
getApplicationDepth(object93) {
return this.getApplicationPath(object93).length;
}
getParentApplicationPath(object93, array) {
array.push(object93.propertyName);
return this.getApplicationPath(object93.parent, array);
}
getApplicationPath(object93, array = new Array()) {
if (object93.parent) {
return this.getParentApplicationPath(object93, array);
} else {
return array;
}
}
getClassName(object93) {
if (object93.__className) {
return object93.__className;
}
if (!object93) {
return false;
}
return object93.constructor.name;
}
getID(object93) {
if (object93.id) {
return object93.id;
} else {
return "";
}
}
getClassNameByObject(object93) {
if (typeof object93 == "string") {
return object93;
}
var entry = this.parseObject(object93);
var className2 = this.getClassNameByEntry(entry);
return className2;
}
getClassNameByEntry(entry) {
return entry[0];
}
getObjectByEntry(entry) {
if (entry[1]) {
return entry[1];
} else {
return false;
}
}
logObject(object93, message) {
if (object93.debug) {
console.log(message, object93.getClassName(), "\n");
}
}
getFirstEntryName(object93) {
var entries = Object.entries(object93);
return entries[0][0];
}
getPropertyNameWithID(object93) {
if (object93.id) {
return this.CamelCase(object93.propertyName) + "_" + object93.id;
} else {
return this.CamelCase(object93.propertyName);
}
if (!propertyName) {
return "";
}
}
createCSSClassName(object93) {
var propertyName2 = this.getPropertyNameWithID(object93);
if (object93.parent) {
object93 = object93.parent;
}
return this.getClassName(object93) + propertyName2;
}
CamelCase(string) {
if (!string) {
return false;
}
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.length).toLowerCase();
return string;
}
firstLowerCase(string) {
if (string) {
return string[0].toLowerCase() + string.slice(1, string.length);
} else {
return false;
}
}
cleanRollup(term) {
return term;
}
cleanEntry(entry) {
const invalid = new Array("parent", "table", "user", "objectToManipulate");
var name = this.getClassNameByEntry(entry);
var object93 = this.getObjectByEntry(entry);
if (invalid.includes(name)) {
delete object93[name];
}
}
cleanObject(object93) {
var entries = Object.entries(this);
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
this.cleanEntry(entry);
}
}
objectExtendsTablePrimitive(object93) {
var extendedClass = this.getExtendedClass(object93);
if (!extendedClass) {
return false;
}
var className2 = this.getClassName(extendedClass);
if (className2 == "table") {
return true;
} else {
return false;
}
}
objectIsTable(object93) {
if (!object93) {
return false;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.objectExtendsTablePrimitive(object93);
}
extendIsRenderCollection(object93) {
var extendedClass = this.getExtendedClass(object93);
var className2 = this.getClassName(extendedClass);
if (className2 == "renderCollection") {
return true;
} else {
return false;
}
}
objectIsRenderCollection(object93) {
var className2 = this.getClassName(object93);
if (className2 == "renderCollection") {
return true;
}
if (!object93.prototype) {
object93 = object93.constructor;
}
return this.extendIsRenderCollection(object93);
}
getTableName(object93) {
if (!this.objectIsTable(object93)) {
object93 = this.getTableFromObject(object93);
}
var className2 = this.getClassName(object93);
return className2;
}
isTableInHierarchy(object93) {
}
getParentWithTable(object93, tableName) {
if (this.getClassName(this.getTableFromObject(object93)) == tableName) {
return object93;
} else {
return this.getParentWithTable(object93.parent, tableName);
}
}
classNameIsTable(className2) {
if (className2 == "table") {
return true;
} else {
return false;
}
}
evaluateExtendedClass(object93, extendedClass) {
var className2 = this.getClassName(extendedClass);
if (this.classNameIsTable(className2)) {
return object93;
}
var table33 = this.getTableFromObject(extendedClass);
if (table33) {
return table33;
} else {
return false;
}
}
getTableFromExtendedClasses(object93, extendedClasses) {
for (var i = 0; i < extendedClasses.length; i++) {
var extendedClass = extendedClasses[i];
var table33 = this.evaluateExtendedClass(object93, extendedClass);
if (table33) {
return table33;
}
}
}
getTableFromObject(object93) {
var className2 = this.getClassName(object93);
if (className2) {
var extendedClasses = this.getExtendedClassesMulti(object93);
return this.getTableFromExtendedClasses(object93, extendedClasses);
} else {
console.log("classname not found", object93);
}
}
isServerValue(name, value2) {
const invalid = new Array("style", "type", "label", "flexDirection", "boxPadding", "width", "DOM_ELEMENT");
const valid = new Array("rows");
if (valid.includes(name)) {
return true;
}
if (invalid.includes(name)) {
return false;
}
if (this.css.propertyIsStyle(name)) {
return false;
}
if (typeof value2 == "number") {
return true;
}
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
deleteNormalBrowserEvent(object93, browserEvent) {
if (object93[browserEvent]) {
delete object93[browserEvent];
}
}
deleteServerBrowserEvent(object93, browserEvent) {
if (object93["server" + this.CamelCase(browserEvent)]) {
delete object93["server" + this.CamelCase(browserEvent)];
}
}
groomBrowserEvents(object93) {
var browserEvents = definitions_default.browserEvents;
for (var i = 0; i < browserEvents.length; i++) {
var browserEvent = browserEvents[i];
this.deleteNormalBrowserEvent(object93, browserEvent);
this.deleteServerBrowserEvent(object93, browserEvent);
}
}
getCircularReplacer(key, value2) {
if (typeof value2 === "object" && value2 !== null) {
if (this.seen.has(value2)) {
return;
}
this.seen.add(value2);
}
return value2;
}
sizeOf(object93) {
this.seen = /* @__PURE__ */ new WeakSet();
var stringObject = JSON.stringify(object93, this.getCircularReplacer.bind(this));
var finalObject = JSON.parse(stringObject);
return global.objectSizeof(finalObject);
}
groomCssProperties(object93, propertyName2) {
var propertyNameWithoutBox = propertyName2.replace("box", "");
if (this.css.propertyHasStyle(propertyNameWithoutBox)) {
delete object93[propertyName2];
}
}
groomRemainingProperties(object93, propertyName2, propertyValue) {
}
groomPermissionMethods(object93) {
if (object93.enableWRITE) {
delete object93.enableWRITE;
}
if (object93.disableWRITE) {
delete object93.disableWRITE;
}
if (object93.enableREAD) {
delete object93.enableREAD;
}
if (object93.disableREAD) {
delete object93.disableREAD;
}
if (object93.enableDELETE) {
delete object93.enableDELETE;
}
if (object93.disableDELETE) {
delete object93.disableDELETE;
}
}
groomBrowserMethods(object93) {
if (object93.create) {
delete object93.create;
}
if (object93.update) {
delete object93.update;
}
if (object93.afterLoad) {
delete object93.afterLoad;
}
}
groomEntry(entry, object93) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.groomPermissionMethods(object93);
this.groomBrowserMethods(object93);
this.groomBrowserEvents(object93);
this.groomCssProperties(object93, propertyName2);
this.groomRemainingProperties(object93, propertyName2, propertyValue);
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.groomApplicationObject(propertyValue);
}
return object93;
}
groomApplicationObject(object93) {
var entries = Object.entries(object93);
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.groomEntry(entry, object93);
}
return object93;
}
serializeEntry(entry, serializedObject2) {
var propertyName2 = this.getClassNameByEntry(entry);
var propertyValue = this.getObjectByEntry(entry);
this.serializeProperty(propertyName2, propertyValue, serializedObject2);
}
serializeEntries(entries) {
var serializedObject2 = new Object();
for (var c31 = 0; c31 < entries.length; c31++) {
var entry = entries[c31];
this.serializeEntry(entry, serializedObject2);
}
return serializedObject2;
}
serialize(object93, is_root = true, cut) {
var entries = Object.entries(object93);
this.serializeEntries(entries);
return this.createOuterObject(object93, serializedObject, is_root);
}
serializeServerProperty(object93, propertyName2, propertyValue) {
object93[propertyName2] = propertyValue;
}
serializedUnifyObject(object93, propertyName2, propertyValue) {
object93[propertyName2] = this.serialize(propertyValue, false);
}
serializeProperty(propertyName2, propertyValue, object93) {
if (this.isServerValue(propertyName2, propertyValue)) {
this.serializeServerProperty(object93, propertyName2, propertyValue);
}
if (this.isUnifyObject(propertyName2, propertyValue)) {
this.serializedUnifyObject(object93, propertyName2, propertyValue);
}
return object93;
}
isArray(array) {
if (!array) {
return false;
}
return Array.isArray(array);
}
validateNumber(value2) {
if (typeof value2 == "number") {
return value2;
} else {
return false;
}
}
validateString(value2) {
if (typeof value2 == "string") {
return value2;
} else {
return false;
}
}
validateValue(value2) {
if (typeof value2 == "string" || typeof value2 == "number" || typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateBoolean(value2) {
if (typeof value2 == "boolean") {
return value2;
} else {
return false;
}
}
validateArray(values) {
if (!this.isArray(values)) {
return false;
}
for (var c31 = 0; c31 < values.length; c31++) {
values[c31] = this.validateString(values[c31]);
}
return values;
}
is_allowed_value(value2) {
if (this.is_int(value2)) {
return true;
}
if (this.is_text(value2)) {
return true;
}
if (this.is_boolean(value2)) {
return true;
}
if (this.is_object(value2)) {
return true;
}
return false;
}
is_float(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_number(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
is_object(value2) {
if (typeof value2 == "object") {
return true;
} else {
return false;
}
}
is_text(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_string(value2) {
if (typeof value2 == "string") {
return true;
} else {
return false;
}
}
is_boolean() {
if (typeof value == "boolean") {
return true;
} else {
return false;
}
}
is_int(value2) {
if (typeof value2 == "number") {
return true;
} else {
return false;
}
}
createOuterObjectWithRoot() {
var objectName = this.getClassName(object);
var output = new Object();
output[objectName] = serializedObject;
return output;
}
createOuterObject(object93, serializedObject2, is_root) {
if (is_root) {
return this.createOuterObjectWithRoot(object93, serializedObject2);
} else {
return serializedObject2;
}
}
consoleColors() {
return consoleColors_default;
}
getFirstObjectFromEntries(entries) {
var firstChild = entries[0][1];
if (firstChild) {
return firstChild;
} else {
return object;
}
}
getFirstChild(object93) {
var entries = Object.entries(object93);
if (entries[0]) {
return this.getFirstObjectFromEntries(entries);
}
}
};
String.prototype.replaceAll = /* @__PURE__ */ __name(function replaceAll31(search, replace) {
return this.split(search).join(replace);
}, "replaceAll");
var tools_default31 = new tools32();
// framework/cache/platforms/Macos/Pc/Dark/elements/input.js?disableCache=0798
var input30 = class {
static {
__name(this, "input");
}
__className = "input";
__sourcePath = "elements/input.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
value = "";
disabled = false;
customElement = document_default59.createElement("input");
inputType = "text";
layers = 2;
useCustomElement = true;
autocomplete = "on";
placeholder = "";
outline = "none";
validateType = "default";
fontSize = 15;
border = "1px solid #ececec";
layers = 1;
propegateEvent = false;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
focus() {
this.borderBottom = this.focusBorderBottom;
this.background = this.focusBackgroundColor;
}
blur() {
this.background = this.blurBackgroundColor;
this.borderBottom = this.blurBorderBottom;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement();
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement();
}
// For AutoComplete -> but makes that you cannot overide or it happens again
change() {
this.value = this.customElement.value;
}
setupElement() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("autocomplete", this.autocomplete);
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.step) {
this.customElement.setAttribute("step", this.step);
}
if (this.placeholder && this.customElement) {
this.customElement.setAttribute("placeholder", this.placeholder);
}
if (this.width) {
if (typeof this.width == "number") {
this.customElement.style.width = this.width + "px";
} else {
this.customElement.style.width = this.width;
}
}
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
isValid() {
if (!this.value) {
return false;
}
return this.validateString(this.value);
}
validateEmail(email) {
const res = /^(([^<>()[]\.,;: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,}))$/;
return res.test(String(email).toLowerCase());
}
validateString(value2) {
var isValid = true;
if (!this.value) {
return false;
}
switch (this.validateType) {
case "default":
if (this.minLength) {
if (value2.length < this.minLength) {
return false;
}
}
break;
case "email":
return this.validateEmail(this.value);
break;
}
return true;
}
validateInput() {
if (this.validateString(this.value)) {
this.removeErrorMessages();
this.validated = true;
console.log("remove errorBlock");
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.validated = false;
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
/*
focus() {
this.validateInput();
this.customElement.focus();
}
*/
removeErrorMessages() {
var errorBlocks = document_default59.querySelectorAll(".errorBlock");
for (var i = 0; i < errorBlocks.length; i++) {
errorBlocks[i].remove();
}
}
showError(text2) {
this.removeErrorMessages();
var errorBlock = document_default59.createElement("div");
errorBlock.innerText = text2;
errorBlock.className = "errorBlock";
this.boxElement.appendChild(errorBlock);
}
afterLoad() {
if (this.validate) {
}
}
async keyup(event2) {
this.value = event2.target.value;
if (this.validate) {
this.validateInput();
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/user.salt.js?disableCache=0798
var salt31 = class {
static {
__name(this, "salt");
}
__className = "salt";
__sourcePath = "user/user.salt.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default31.VARCHAR;
scope = "private";
value = "";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Dark/user/user.hash.js?disableCache=0798
var hash31 = class {
static {
__name(this, "hash");
}
__className = "hash";
__sourcePath = "user/user.hash.js";
__nodeMethods = "";
__stateMethods = "";
datatype = datatype_default31.VARCHAR;
scope = "private";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Dark/user/user.js?disableCache=0798
var user31 = class _user extends table32 {
static {
__name(this, "user");
}
__className = "user";
__sourcePath = "user/user.js";
__nodeMethods = "";
__stateMethods = "";
username = new username31();
salt = new salt31();
hash = new hash31();
// Every user needs to have an groups field, This is for the permissions.
groups = new groups30();
selectedUsers = new collection34(_user);
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/comment.body.js?disableCache=0798
var body60 = class extends column30 {
static {
__name(this, "body");
}
__className = "body";
__sourcePath = "demo/comment/comment.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/comment.title.js?disableCache=0798
var title89 = class extends column30 {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "demo/comment/comment.title.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
color = "black";
label = "title";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
this.animate(150, 400, function(value2) {
this.height = value2;
});
var result = await this.socketManager.get("column", "update", this, "keyup");
}
serverKeyup(object93) {
this.value = object93.value;
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/comment.js?disableCache=0798
var comment31 = class extends table32 {
static {
__name(this, "comment");
}
__className = "comment";
__sourcePath = "demo/comment/comment.js";
__nodeMethods = "";
__stateMethods = "";
author = new user31();
title = new title89();
body = new body60();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/news.js?disableCache=0798
var news30 = class extends table32 {
static {
__name(this, "news");
}
__className = "news";
__sourcePath = "demo/news.js";
__nodeMethods = "";
__stateMethods = "";
title = new title88();
body = new body59();
price = new price30();
comments = new collection34(comment31);
};
// framework/cache/platforms/Macos/Pc/Dark/elements/tableCell.js?disableCache=0798
var tableCell30 = class {
static {
__name(this, "tableCell");
}
__className = "tableCell";
__sourcePath = "elements/tableCell.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
renderToDOM = true;
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.header.row.column.sortBy.js?disableCache=0798
var sortBy30 = class {
static {
__name(this, "sortBy");
}
__className = "sortBy";
__sourcePath = "elements/gridView/gridView.header.row.column.sortBy.js";
__nodeMethods = "";
__stateMethods = "";
text = "";
transition = "none";
layers = 1;
float = "right";
transform;
type = "desc";
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.header.row.column.js?disableCache=0798
var gridViewRowColumn30 = class extends tableCell30 {
static {
__name(this, "gridViewRowColumn");
}
__className = "gridViewRowColumn";
__sourcePath = "elements/gridView/gridView.header.row.column.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-cell";
layers = 1;
propegateEvent = false;
useCustomElement = false;
cursor = "pointer";
hoverBackgroundColor = "#363333";
async click() {
var renderCollection33 = this.parent.parent.parent.body;
renderCollection33.sort = this.propertyName;
this.unselectOtherColumns();
var direction = this.selectThisColumn();
renderCollection33.direction = direction;
renderCollection33.update();
}
unselectOtherColumns() {
var columns = this.parent.getChildren();
for (var i = 0; i < columns.length; i++) {
var column31 = columns[i];
if (column31.sortBy) {
column31.sortBy.text = "";
}
}
}
selectThisColumn() {
if (this.sortBy.type == "asc") {
this.sortBy.transform = "rotate(90deg)";
this.sortBy.type = "desc";
} else {
this.sortBy.transform = "rotate(-90deg)";
this.sortBy.type = "asc";
}
this.sortBy.text = "<";
return this.sortBy.type;
}
padding = 10;
sortBy = new sortBy30();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/header/news.list.header.body.js?disableCache=0798
var newsListHeaderBody30 = class extends gridViewRowColumn30 {
static {
__name(this, "newsListHeaderBody");
}
__className = "newsListHeaderBody";
__sourcePath = "demo/list/header/news.list.header.body.js";
__nodeMethods = "";
__stateMethods = "";
text = "Message";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/header/news.list.header.title.js?disableCache=0798
var newsListHeaderTitle30 = class extends gridViewRowColumn30 {
static {
__name(this, "newsListHeaderTitle");
}
__className = "newsListHeaderTitle";
__sourcePath = "demo/list/header/news.list.header.title.js";
__nodeMethods = "";
__stateMethods = "";
text = "Title";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/header/news.list.header.price.js?disableCache=0798
var newsListHeaderPrice30 = class extends gridViewRowColumn30 {
static {
__name(this, "newsListHeaderPrice");
}
__className = "newsListHeaderPrice";
__sourcePath = "demo/list/header/news.list.header.price.js";
__nodeMethods = "";
__stateMethods = "";
text = "Price";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/header/news.list.header.actions.js?disableCache=0798
var newsListHeaderActions30 = class extends gridViewRowColumn30 {
static {
__name(this, "newsListHeaderActions");
}
__className = "newsListHeaderActions";
__sourcePath = "demo/list/header/news.list.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default30.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.header.row.js?disableCache=0798
var gridViewTableRow30 = class {
static {
__name(this, "gridViewTableRow");
}
__className = "gridViewTableRow";
__sourcePath = "elements/gridView/gridView.header.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
propegateEvent = false;
layers = 1;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/header/news.list.header.js?disableCache=0798
var newsListHeader30 = class extends extender59(news30, gridViewTableRow30) {
static {
__name(this, "newsListHeader");
}
__className = "newsListHeader";
__sourcePath = "demo/list/header/news.list.header.js";
__nodeMethods = "";
__stateMethods = "";
body = new newsListHeaderBody30();
title = new newsListHeaderTitle30();
price = new newsListHeaderPrice30();
actions = new newsListHeaderActions30();
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.header.js?disableCache=0798
var gridViewHeader30 = class {
static {
__name(this, "gridViewHeader");
}
__className = "gridViewHeader";
__sourcePath = "elements/gridView/gridView.header.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-header-group";
layers = 1;
flexFlow = "column";
fontSize = 12;
background = "#393939";
borderBottom = "2px solid #3f3f3f";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/news.list.table.header.js?disableCache=0798
var newsListTableHeader30 = class extends gridViewHeader30 {
static {
__name(this, "newsListTableHeader");
}
__className = "newsListTableHeader";
__sourcePath = "demo/list/news.list.table.header.js";
__nodeMethods = "";
__stateMethods = "";
newsListHeaderRow = new newsListHeader30();
};
// framework/unify/renderCollection.js?disableCache=0798
var renderCollection32 = class extends renderCollection2 {
static {
__name(this, "renderCollection");
}
object;
collections = new Array();
collection = false;
// Future
storageCollection = false;
type = "renderCollection";
rows = new Array();
filterObject = false;
processAsync = false;
handleRenderCollection(renderCollection33) {
var currentCollection = renderCollection33.getCollection();
if (!renderCollection33.storageCollection) {
renderCollection33.storageCollection = new collection3(currentCollection.object);
renderCollection33.storageCollection.enabled = false;
}
collection1 = renderCollection33.storageCollection;
}
handleCollection(argument) {
this.storageCollection = new collection3(argument.object);
this.storageCollection.name = "storageCollection";
var defaultObjectInstance = new defaultObject_default();
defaultObjectInstance.exposeMethodsToObject(this.storageCollection);
this.setCollection(argument);
}
handleSecondArgument(argument) {
switch (argument.type) {
case "renderCollection":
this.handleRenderCollection(argument);
break;
case "collection":
this.handleCollection(argument);
break;
}
}
constructor(object93, secondArgument) {
super();
if (secondArgument) {
this.handleSecondArgument(secondArgument);
} else {
if (object93) {
this.logMissingArgument();
}
}
this.object = object93;
}
logMissingArgument() {
console.log("\n_______________________________________________\n\n\n\n");
console.error("\x1B[31m%s\x1B[0m", "Collection of renderCollection Not set:\n ");
console.log("This renderCollection will not load anything, There is probably an typo in the second argument or no collection present as second argument. \n");
console.log(this);
console.log("\n_______________________________________________\n\n\n\n");
}
createInstance() {
var object93 = new this.object();
unify_default.extend(object93);
return object93;
}
setupObject(sourceObject, client2, rowID) {
var object93 = this.createInstance();
object93.id = sourceObject.id;
object93.parent = this;
object93.dynamic = true;
object93.propertyName = object93.getClassName() + object93.id;
object93.load = false;
object93.rowID = rowID;
object93.serialize(sourceObject, client2);
return object93;
}
callMethods(object93, client2) {
if (client2) {
if (object93.process) {
object93.process(object93);
}
}
}
bindAsChild(object93) {
this[object93.propertyName] = object93;
}
updatePermissionsClientAndServer(object93, client2) {
if (client2) {
this.getPermissionForHierarchy(object93, client2.user);
} else {
object93.updatePermissions(object93.permissions);
}
return object93;
}
addToCollection(object93) {
var collection35 = this.getCollection();
collection35.rows.push(object93);
}
addRow(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
this.getCore().parse(object93, client2);
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
getPermissionForHierarchy(object93, user32) {
object93.permissions = userManager_default2.computePermissions(object93, user32);
var children = object93.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.isAllowed) {
this.getPermissionForHierarchy(child, user32);
}
}
}
async addRowSync(sourceObject, client2, rowID) {
var object93 = this.setupObject(sourceObject, client2, rowID);
this.callMethods(object93, client2);
this.bindAsChild(object93);
if (client2) {
await this.getCore().parse(object93, client2);
} else {
await this.getCore().parse(object93, true);
}
this.updatePermissionsClientAndServer(object93, client2);
this.addToCollection(object93);
return object93;
}
setCollection(collection35) {
if (!collection35) {
this.collections = new Array();
} else {
this.collections = [collection35];
}
}
setCollectionObject(collectionObject) {
var newCollection = new collection3(collectionObject);
this.setCollection(newCollection);
this.object = collectionObject;
}
getCollection() {
return this.collections[0];
}
createFilterObject() {
if (!this.filterObject) {
this.filterObject = new placeholder();
}
this.filterObject.__className = "placeholder";
unify_default.extend(this.filterObject);
}
getCollectionObject() {
var collection35 = this.getCollection();
var realObject = new collection35.object();
unify_default.extend(realObject);
return realObject;
}
createCollectionSearchable(collection35, child) {
var search = new searchable("./" + collection35.propertyName + "/" + child.propertyName);
this.filterObject[collection35.propertyName][child.propertyName] = search;
}
handleFilterCollectionChildren(collectionObject, collection35) {
var collectionChildren = collectionObject.getChildren();
for (var b32 = 0; b32 < collectionChildren.length; b32++) {
var child = collectionChildren[b32];
this.createCollectionSearchable(collection35, child);
}
}
handleCollectionSearchables(child) {
if (child.type == "collection") {
var collectionObject = child.createInstance();
unify_default.extend(collectionObject);
this.filterObject[child.propertyName].type = "collection";
this.handleFilterCollectionChildren(collectionObject, child);
}
}
createSearchable(child) {
var search = new searchable("./" + child.propertyName);
this.filterObject[child.propertyName] = search;
}
createSearchables(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
this.createSearchable(child);
this.handleCollectionSearchables(child);
}
}
createSearchableID() {
var search = new searchable("./id");
this.filterObject["id"] = search;
}
getFilter() {
this.createFilterObject();
this.createSearchableID();
var object93 = this.getCollectionObject();
this.createSearchables(object93);
return this.filterObject;
}
createInstance() {
return new this.object();
}
getChildrenRenderCollections2(object93) {
var children = object93.getChildren();
for (var c31 = 0; c31 < children.length; c31++) {
var child = children[c31];
if (child.type == "renderCollection") {
child.id = object93.id;
child = this.get(child, client);
}
}
}
getChildrenRenderCollections() {
var rows = this.rows;
for (var b32 = 0; b32 < rows.length; b32++) {
var row181 = rows[b32];
this.getChildrenRenderCollections2(row181);
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.body.js?disableCache=0798
var gridViewTableHeader30 = class {
static {
__name(this, "gridViewTableHeader");
}
__className = "gridViewTableHeader";
__sourcePath = "elements/gridView/gridView.body.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
display = "table-row-group";
layers = 1;
fontSize = 12;
background = "#2c2c2c";
fontWeight = "bold";
};
// framework/unify/sql/OR.js?disableCache=0798
function OR30(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "OR";
return searchableObject;
}
__name(OR30, "OR");
// framework/unify/sql/LIKE.js?disableCache=0798
function LIKE30(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = "LIKE";
return searchableObject;
}
__name(LIKE30, "LIKE");
// framework/unify/sql/GREATER_OR_EQUAL.js?disableCache=0798
function GREATER_OR_EQUAL30(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " >= ";
return searchableObject;
}
__name(GREATER_OR_EQUAL30, "GREATER_OR_EQUAL");
// framework/unify/sql/SMALLER_OR_EQUAL.js?disableCache=0798
function SMALLER_OR_EQUAL30(a32, b32) {
var searchableObject = new searchable();
searchableObject.a = a32;
searchableObject.b = b32;
searchableObject.operator = " <= ";
return searchableObject;
}
__name(SMALLER_OR_EQUAL30, "SMALLER_OR_EQUAL");
// framework/cache/platforms/Macos/Pc/Dark/demo/list/news.list.table.body.js?disableCache=0798
var newsListTableBody30 = class extends extender59(renderCollection32, gridViewTableHeader30) {
static {
__name(this, "newsListTableBody");
}
__className = "newsListTableBody";
__sourcePath = "demo/list/news.list.table.body.js";
__nodeMethods = "filterSearch";
__stateMethods = "";
debug = true;
sort = "title";
page = 0;
limit = 2;
async create() {
}
async update(updatePagination = true) {
if (updatePagination) {
this.page = 0;
}
this.numberOfPages = await this.filterSearch(this.searchType, this.searchTerm, this.sort, this.direction, this.limit, this.page);
await this.sync();
if (updatePagination) {
this.parents("newsItemPage").tableControl.pagination.create();
}
}
async filterSearch(searchType, searchTerm, order, direction, limit31, page31) {
console.log("searchType", searchType);
console.log("search input", searchTerm);
console.log("search order", order);
console.log("direction", direction);
console.log("limit", limit31);
console.log("from", page31 * limit31);
var filter = this.getFilter();
switch (searchType) {
case 0:
filter.search = OR30(OR30(LIKE30(filter.title, searchTerm), LIKE30(filter.comments.body, searchTerm)), LIKE30(filter.body, searchTerm));
break;
case 1:
filter.search = GREATER_OR_EQUAL30(filter.price, searchTerm);
break;
case 2:
filter.search = SMALLER_OR_EQUAL30(filter.price, searchTerm);
break;
}
if (!searchTerm) {
filter.search = false;
}
switch (order) {
case "title":
filter.order = filter.title;
break;
case "body":
filter.order = filter.body;
break;
case "price":
filter.order = filter.price;
break;
}
if (direction == "desc") {
filter.direction = "desc";
} else {
filter.direction = "asc";
}
filter.limit = 1e3;
filter.from = 0;
this.get();
filter.limit = parseInt(limit31);
filter.from = parseInt(page31 * limit31);
var numberOfPages = Math.ceil(this.rows.length / limit31);
console.log("numberOfPages", numberOfPages);
console.log("this.rows.length", this.rows.length);
console.log("limit", limit31);
return numberOfPages;
}
permission() {
this.allow(user_group_permission_default30.visitor, "READ");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.body.row.column.js?disableCache=0798
var gridViewBodyColumn30 = class extends tableCell30 {
static {
__name(this, "gridViewBodyColumn");
}
__className = "gridViewBodyColumn";
__sourcePath = "elements/gridView/gridView.body.row.column.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
layers = 1;
padding = 12;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/item/news.list.item.body.js?disableCache=0798
var newsListItemBody30 = class extends extender59(body59, gridViewBodyColumn30) {
static {
__name(this, "newsListItemBody");
}
__className = "newsListItemBody";
__sourcePath = "demo/list/item/news.list.item.body.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/item/news.list.item.title.js?disableCache=0798
var newsListItemTitle30 = class extends extender59(title88, gridViewBodyColumn30) {
static {
__name(this, "newsListItemTitle");
}
__className = "newsListItemTitle";
__sourcePath = "demo/list/item/news.list.item.title.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/item/news.list.item.price.js?disableCache=0798
var newsListItemPrice30 = class extends extender59(price30, gridViewBodyColumn30) {
static {
__name(this, "newsListItemPrice");
}
__className = "newsListItemPrice";
__sourcePath = "demo/list/item/news.list.item.price.js";
__nodeMethods = "";
__stateMethods = "";
create() {
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR"
});
this.text = formatter.format(this.value);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/item/news.list.item.actions.deleteButton.js?disableCache=0798
var deleteButton88 = class extends button30 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/list/item/news.list.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default30.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/item/news.list.item.actions.js?disableCache=0798
var newsListItemActions30 = class extends extender59(gridViewBodyColumn30, gridViewBodyColumn30) {
static {
__name(this, "newsListItemActions");
}
__className = "newsListItemActions";
__sourcePath = "demo/list/item/news.list.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton88();
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.body.row.js?disableCache=0798
var gridViewRow30 = class {
static {
__name(this, "gridViewRow");
}
__className = "gridViewRow";
__sourcePath = "elements/gridView/gridView.body.row.js";
__nodeMethods = "";
__stateMethods = "";
display = "table-row";
layers = 1;
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/item/news.list.item.js?disableCache=0798
var newsListItem30 = class extends extender59(news30, gridViewRow30) {
static {
__name(this, "newsListItem");
}
__className = "newsListItem";
__sourcePath = "demo/list/item/news.list.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
body = new newsListItemBody30();
title = new newsListItemTitle30();
price = new newsListItemPrice30();
actions = new newsListItemActions30();
cursor = "pointer";
background;
fontSize = 14;
hoverBackgroundColor = "#363333";
//mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState(this.id, this.value);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
var newsPage31 = rightSide31.newsPage;
newsPage31.id = this.id;
await newsPage31.sync();
newsPage31.createComment.create();
}
mouseover() {
}
mouseleave() {
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default30.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/gridView/gridView.js?disableCache=0798
var gridView30 = class {
static {
__name(this, "gridView");
}
__className = "gridView";
__sourcePath = "elements/gridView/gridView.js";
__nodeMethods = "";
__stateMethods = "";
display = "table";
layers = 1;
fontSize = 12;
borderCollapse = "separate";
borderSpacing = "0";
borderRadius = 12;
overflow = "hidden";
margin = 2;
borderRadius = 4;
color = "white";
border = "1px solid #4f4f4f";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/list/news.list.table.js?disableCache=0798
var newsListTable30 = class extends gridView30 {
static {
__name(this, "newsListTable");
}
__className = "newsListTable";
__sourcePath = "demo/list/news.list.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new newsListTableHeader30();
body = new newsListTableBody30(newsListItem30, new collection34(news30));
marginLeft = 6;
width = "auto";
margin = "6px -2px 10px 6px";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/edit/news.edit.title.js?disableCache=0798
var newsEditTitle30 = class extends extender59(input30, title88) {
static {
__name(this, "newsEditTitle");
}
__className = "newsEditTitle";
__sourcePath = "demo/edit/news.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Title";
};
// framework/cache/platforms/Macos/Pc/Dark/elements/textarea.js?disableCache=0798
var textarea30 = class {
static {
__name(this, "textarea");
}
__className = "textarea";
__sourcePath = "elements/textarea.js";
__nodeMethods = "";
__stateMethods = "";
outline = "none";
margin = 12;
renderToDOM = true;
width = "70%";
background = "rgb(255 255 255 / 3%)";
background = "#3e3c3c!important";
color = "white";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
focus() {
}
blur() {
}
value = "";
layers = 1;
customElement = document_default59.createElement("textarea");
useCustomElement = true;
//border = "1px solid #d8d8d9";
scrollbarColor = "#98adc8 #eaeaea";
constructor() {
var that2 = this;
if (this.customElement.addEventListener) {
this.customElement.addEventListener("keydown", function(e) {
if (e.keyCode === 9) {
var start = this.selectionStart;
var end2 = this.selectionEnd;
var target = e.target;
var value2 = target.value;
target.value = value2.substring(0, start) + " " + value2.substring(end2);
this.selectionStart = this.selectionEnd = start + 1;
e.preventDefault();
}
}, false);
}
}
async keyup(event2) {
this.value = event2.target.value;
}
setup() {
var that2 = this;
that2._useCustomElement = this.useCustomElement;
this.__defineSetter__("useCustomElement", function(value2) {
that2._useCustomElement = value2;
that2.setupElement(value2);
});
this.__defineGetter__("useCustomElement", function(value2) {
if (typeof that2._useCustomElement == "undefined") {
that2._useCustomElement = false;
return false;
} else {
return that2._useCustomElement;
}
});
this.setupElement(this.useCustomElement);
}
setupElement(value2) {
this.customElement.setAttribute("placeholder", this.placeholder);
if (this.element) {
var parentNode = this.element.parentNode;
if (this.useCustomElement) {
if (this.element.tagName != this.customElement.tagName) {
parentNode.replaceChild(this.customElement, this.element);
this.element = this.customElement;
}
} else {
if (this.element.tagName != this.defaultElement.tagName) {
parentNode.replaceChild(this.defaultElement, this.element);
this.element = this.defaultElement;
}
}
this.updateElementContent();
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/edit/news.edit.body.js?disableCache=0798
var newsPageBody59 = class extends extender59(body59, textarea30) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/edit/news.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Message";
height = 120;
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/edit/news.edit.button.js?disableCache=0798
var editButton59 = class extends button30 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/edit/news.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
var result = await this.parent.parent.save();
var editNewsDialog = this.parent.parent;
editNewsDialog.id = false;
editNewsDialog.newsTitleRow.title.value = "";
editNewsDialog.newsBodyRow.body.value = "";
editNewsDialog.hide();
if (this.parents("newsItemPage").newsListTable) {
this.parents("newsItemPage").newsListTable.body.update();
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/edit/news.edit.price.js?disableCache=0798
var newsPagePrice30 = class extends extender59(price30, input30) {
static {
__name(this, "newsPagePrice");
}
__className = "newsPagePrice";
__sourcePath = "demo/edit/news.edit.price.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Price";
async keyup(event2) {
this.value = event2.target.value;
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/label.js?disableCache=0798
var label59 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "elements/label.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.text = text2;
this.gridArea = gridName;
}
layers = 1;
gridArea = "passwordLabel";
text = "password";
color = "black";
padding = 20;
fontSize = 12;
padding = 10;
paddingLeft = 0;
boxWidth = "100%";
color = "white";
};
// framework/cache/platforms/Macos/Pc/Dark/elements/label/left.js?disableCache=0798
var leftLabel30 = class extends label59 {
static {
__name(this, "leftLabel");
}
__className = "leftLabel";
__sourcePath = "elements/label/left.js";
__nodeMethods = "";
__stateMethods = "";
width = "30%";
justifyContent = "flex-end";
};
// framework/cache/platforms/Macos/Pc/Dark/elements/panel.js?disableCache=0798
var panel30 = class {
static {
__name(this, "panel");
}
__className = "panel";
__sourcePath = "elements/panel.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "100%";
border = "1px solid #ffffff26";
background = "rgb(255 255 255 / 4%)";
width = "100%";
borderRadius = 6;
marginRight = 20;
};
// framework/cache/platforms/Macos/Pc/Dark/elements/window/draggable.js?disableCache=0798
var vector288 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay88(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay88, "delay");
var draggable59 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector288(0, 0);
grabPosition = new vector288(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector288(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay88(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector288(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/panel/row.js?disableCache=0798
var panelRow30 = class {
static {
__name(this, "panelRow");
}
__className = "panelRow";
__sourcePath = "elements/panel/row.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
//layers = 1;
sizing = "border-box";
afterLoad() {
var children = this.parent.getChildren();
var count = children.length - 1;
var lastChild = children[count];
lastChild.borderBottom = "none";
}
margin = "0 6px";
borderBottom = "1px solid #ffffff26";
width = "96%";
};
// framework/cache/platforms/Macos/Pc/Dark/elements/window/header.js?disableCache=0798
var maximizeButton30 = class extends icon30 {
static {
__name(this, "maximizeButton");
}
__className = "maximizeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
var window2 = this.parent.parent.parent;
if (window2.state == "maximized") {
window2.restore();
window2.state = "normal";
this.setImage("assets/images/icons/maximize.svg");
} else {
window2.maximize();
window2.state = "maximized";
this.setImage("assets/images/icons/restore.svg");
}
}
constructor() {
super("maximize.svg");
}
transition = "1s";
};
var closeButton30 = class extends icon30 {
static {
__name(this, "closeButton");
}
__className = "closeButton";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
margin = 20;
cursor = "pointer";
width = 16;
height = 16;
backgroundSize = "contain!important";
filter = "invert(1)";
click() {
this.parent.parent.parent.hide();
}
constructor() {
super("close.svg");
}
};
var leftControl30 = class {
static {
__name(this, "leftControl");
}
__className = "leftControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
closeButton = new closeButton30();
maximizeButton = new maximizeButton30();
color = "#363636";
height = "40px";
display = "flex";
layers = 1;
flex = "1";
flexDirection = "row";
};
var title90 = class {
static {
__name(this, "title");
}
__className = "title";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
setTitle(title91) {
this.element.innerText = title91;
}
padding = 20;
height = "40px";
display = "block";
layers = 1;
};
var rightControl30 = class {
static {
__name(this, "rightControl");
}
__className = "rightControl";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
height = "40px";
display = "block";
flex = "1";
layers = 1;
};
var windowHeader30 = class {
static {
__name(this, "windowHeader");
}
__className = "windowHeader";
__sourcePath = "elements/window/header.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2, gridName) {
this.title.text = text2;
this.gridArea = gridName;
}
setTitle(title91) {
this.title.setTitle(title91);
}
boxShadow = "0px 1px 1px 0px #00000008";
marginBottom = 10;
leftControl = new leftControl30();
title = new title90();
rightControl = new rightControl30();
width = "100%";
layers = 1;
gridArea = "passwordLabel";
color = "black";
//padding = 20;
fontWeight = "bold";
fontSize = 12;
borderTopLeftRadius = "4px";
borderTopRightRadius = "4px";
//padding = 10;
//paddingLeft = 0;
boxWidth = "100%";
color = "white";
borderBottom = "1px solid black";
background = "#1c1c1c";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/edit/news.edit.js?disableCache=0798
var newsBodyRow30 = class extends panelRow30 {
static {
__name(this, "newsBodyRow");
}
__className = "newsBodyRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel30("Message");
body = new newsPageBody59();
};
var newsTitleRow30 = class extends panelRow30 {
static {
__name(this, "newsTitleRow");
}
__className = "newsTitleRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel30("Title");
title = new newsEditTitle30();
};
var newsPriceRow30 = class extends panelRow30 {
static {
__name(this, "newsPriceRow");
}
__className = "newsPriceRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
label = new leftLabel30("Price");
price = new newsPagePrice30();
};
var cancelButton59 = class extends button30 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
boxWidth = "100%";
click() {
this.parent.parent.hide();
}
};
var newsButtonRow30 = class extends panelRow30 {
static {
__name(this, "newsButtonRow");
}
__className = "newsButtonRow";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
border = "none";
cancelButton = new cancelButton59();
newsEditbutton = new editButton59();
};
var newsEdit30 = class extends extender59(news30, panel30, draggable59) {
static {
__name(this, "newsEdit");
}
__className = "newsEdit";
__sourcePath = "demo/edit/news.edit.js";
__nodeMethods = "";
__stateMethods = "";
header = new windowHeader30("News");
layers = 2;
zIndex = 1e3;
fontFamily = "sf-ui";
width = 600;
background = "#161110bf";
backdropFilter = "blur(22px)";
selector = "#application";
display = "none";
flexDirection = "column";
debug = true;
position = "absolute";
boxBackgroundImage;
newsTitleRow = new newsTitleRow30();
newsPriceRow = new newsPriceRow30();
newsBodyRow = new newsBodyRow30();
newsButtonRow = new newsButtonRow30();
debug = true;
height = "fit-content";
async create() {
}
afterLoad() {
this.center();
}
permission() {
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
this.allow(user_group_permission_default30.visitor, "READ");
this.allow(user_group_permission_default30.member, "WRITE");
this.allow(user_group_permission_default30.admin, "WRITE");
this.allow(user_group_permission_default30.visitor, "WRITE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsDialogButton.js?disableCache=0798
var newsDialogButton30 = class extends button30 {
static {
__name(this, "newsDialogButton");
}
__className = "newsDialogButton";
__sourcePath = "demo/pages/newsDialogButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Create News";
marginTop = 10;
marginLeft = 2;
async click() {
this.parent.createNews.show();
this.parent.createNews.center();
}
enableREAD() {
this.show();
}
disableREAD() {
this.hide();
}
permission() {
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/search.input.js?disableCache=0798
var searchBar88 = class extends input30 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/pages/search.input.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.search();
}
async search() {
var searchType = this.parent.select.customElement.selectedIndex;
var searchTerm = this.customElement.value;
console.log("searchType", searchType);
console.log("search input", searchTerm);
var newsItems = this.parent.parent.newsListTable.body;
newsItems.searchType = searchType;
newsItems.searchTerm = searchTerm;
newsItems.update();
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/select.js?disableCache=0798
var select30 = class extends renderCollection32 {
static {
__name(this, "select");
}
__className = "select";
__sourcePath = "elements/select.js";
__nodeMethods = "";
__stateMethods = "";
values = new Array();
width = 200;
layers = 1;
customElement = document_default59.createElement("select");
useCustomElement = true;
editable = true;
typedSelect = false;
debug = true;
constructor(object93, collection35) {
super(object93, collection35);
if (collection35 && collection35.type == "collection") {
for (var i = 0; i < collection35.rows.length; i++) {
var row181 = collection35.rows[i];
this["option" + i] = row181;
}
}
}
change() {
if (this.element.selectedOptions) {
var selectedElement = this.element.selectedOptions[0];
var selectedID = parseFloat(selectedElement.value);
this.value = selectedID;
this.parent.value = selectedID;
console.log("selected option", this.parent);
}
if (this.element.tagName == "SELECT") {
var selectedElement = this.element.selectedOptions[0];
var element2 = this.element;
var index = element2.selectedIndex;
var options = element2.options;
var selectedOption = options[index];
var selectedOptionValue = selectedOption.value;
this.value = selectedOptionValue;
this.parent.value = selectedOptionValue;
console.log("value is now:", this.value);
}
if (this.update) {
this.update();
}
}
addValue(value2) {
if (!this.values.includes(value2)) {
this.values.push(value2);
}
this.value = this.values.join(",");
}
removeValue(value2) {
for (var c31 = 0; c31 < this.values.length; c31++) {
if (this.values[c31] == value2) {
delete this.values[c31];
}
}
this.value = this.values.join(",");
}
valueExists(value2) {
return this.values.includes(value2);
}
serverSign(object93) {
this.create();
}
permission() {
this.allow(user_group_permission_default30.admin, "READ");
this.allow(user_group_permission_default30.admin, "WRITE");
}
addOption(value2, label61, selected) {
var optionElement = document_default59.createElement("option");
optionElement.text = label61;
optionElement.id = value2;
optionElement.value = value2;
if (label61 == "Select Country") {
optionElement.setAttribute("disabled", "");
optionElement.setAttribute("selected", "");
}
if (selected) {
optionElement.setAttribute("selected", "");
}
this.customElement.appendChild(optionElement);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/search.select.js?disableCache=0798
var customSelect59 = class extends select30 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "demo/pages/search.select.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
change() {
this.parent.search.search();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/search.widget.js?disableCache=0798
var searchWidget30 = class {
static {
__name(this, "searchWidget");
}
__className = "searchWidget";
__sourcePath = "demo/pages/search.widget.js";
__nodeMethods = "";
__stateMethods = "";
search = new searchBar88();
select = new customSelect59();
create() {
this.select.addOption(1, "Name");
this.select.addOption(2, "Price >");
this.select.addOption(3, "Price <");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsItemPage.pagination.item.js?disableCache=0798
var paginationItem30 = class {
static {
__name(this, "paginationItem");
}
__className = "paginationItem";
__sourcePath = "demo/pages/newsItemPage.pagination.item.js";
__nodeMethods = "";
__stateMethods = "";
padding = 10;
layers = 1;
background = "#2d2d2d";
cursor = "pointer";
border = "1px solid rgb(46, 46, 46)";
borderRadius = "none";
disabled = false;
select() {
this.background = "#434743";
this.selected = true;
}
deselect() {
this.background = "#2d2d2d";
this.selected = false;
}
getSelected() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.selected) {
return child;
}
}
}
deselectItems() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.deselect) {
child.deselect();
}
}
}
click() {
if (this.disabled) {
return true;
}
var children = this.parent.getChildren();
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
console.log("this.value", this.value);
console.log("numberOfPages", numberOfPages);
switch (this.value) {
case "<":
var selectedChildItem = this.getSelected();
var previousSibling = selectedChildItem.getPreviousSibling();
previousSibling.click();
break;
case ">":
var selectedChildItem = this.getSelected();
var nextSibling = selectedChildItem.getNextSibling();
nextSibling.click();
break;
default:
if (this.value >= numberOfPages - 1) {
children.pop().disable();
} else {
children.pop().enable();
}
if (this.value == 0) {
children[0].disable();
} else {
children[0].enable();
}
renderCollection33.page = this.value;
renderCollection33.update(false);
this.deselectItems();
this.select();
}
}
disable() {
this.opacity = "30%";
this.cursor = "default";
this.disabled = true;
}
enable() {
this.opacity = "100%";
this.cursor = "pointer";
this.disabled = false;
}
opacity;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsItemPage.pagination.js?disableCache=0798
var pagination30 = class {
static {
__name(this, "pagination");
}
__className = "pagination";
__sourcePath = "demo/pages/newsItemPage.pagination.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
create() {
this.clearChildren();
this.update();
}
update() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var numberOfPages = renderCollection33.numberOfPages;
var newItem = new paginationItem30();
newItem.text = "<";
newItem.value = "<";
newItem.borderRadius = "4px 0 0 4px";
this.add(newItem);
for (var i = 0; i < numberOfPages; i++) {
var newItem = new paginationItem30();
newItem.value = i;
newItem.text = (i + 1).toString();
this.add(newItem);
if (i == 0) {
newItem.click();
}
}
var newItem = new paginationItem30();
newItem.text = ">";
newItem.value = ">";
newItem.borderRadius = "0 4px 4px 0";
this.add(newItem);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsItemPage.limit.js?disableCache=0798
var limit30 = class extends select30 {
static {
__name(this, "limit");
}
__className = "limit";
__sourcePath = "demo/pages/newsItemPage.limit.js";
__nodeMethods = "";
__stateMethods = "";
height = 40;
marginTop = -1;
width = 60;
change() {
var index = this.element.selectedIndex;
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
renderCollection33.limit = index;
renderCollection33.update(true);
console.log("index", index);
}
create() {
var renderCollection33 = this.parents("newsItemPage").newsListTable.body;
var limit31 = renderCollection33.limit;
for (var i = 0; i < 10; i++) {
if (limit31 == i) {
this.addOption(i, i, true);
} else {
this.addOption(i, i);
}
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsItemPage.tableControl.js?disableCache=0798
var tableControl30 = class {
static {
__name(this, "tableControl");
}
__className = "tableControl";
__sourcePath = "demo/pages/newsItemPage.tableControl.js";
__nodeMethods = "";
__stateMethods = "";
pageLabel = new label59("Select page:");
pagination = new pagination30();
limitLabel = new label59("Select items per page:");
limit = new limit30();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsItemPage.js?disableCache=0798
var testbutton30 = class extends button30 {
static {
__name(this, "testbutton");
}
__className = "testbutton";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
text = "test";
async click() {
var a32 = new Array();
var b32 = new Object();
b32.a = "dit is een test";
b32.b = "dit werkt goed";
a32.push(b32);
a32.push(b32);
a32.push(b32);
await this.test(a32);
}
async test(a32) {
console.log(a32);
}
};
var newsItemPage30 = class {
static {
__name(this, "newsItemPage");
}
__className = "newsItemPage";
__sourcePath = "demo/pages/newsItemPage.js";
__nodeMethods = "test";
__stateMethods = "";
layers = 1;
overflowY = "auto";
width = "-webkit-fill-available";
flexDirection = "column";
transition = "1s";
willChange = "transform";
overflowX = "none";
transform;
background = "#282828";
marginLeft = "0";
sizing = "border-box";
width = 600;
padding = 20;
newsListHeader = new header30("News Items");
searchWidget = new searchWidget30();
newsListTable = new newsListTable30();
tableControl = new tableControl30();
createNews = new newsEdit30();
testbutton = new testbutton30();
newsDialogButton = new newsDialogButton30();
};
// framework/cache/platforms/Macos/Pc/Dark/elements/flexbox.js?disableCache=0798
var flexbox59 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/page/news.page.title.js?disableCache=0798
var newsPageTitle30 = class extends extender59(title88, flexbox59) {
static {
__name(this, "newsPageTitle");
}
__className = "newsPageTitle";
__sourcePath = "demo/page/news.page.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
fontWeight = "bold";
//padding = 20;
//width = "600px"
//boxSizing = "border-box";
background = "#282828";
fontSize = 30;
padding = 20;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/page/news.page.body.js?disableCache=0798
var newsPageBody60 = class extends extender59(flexbox59, body59) {
static {
__name(this, "newsPageBody");
}
__className = "newsPageBody";
__sourcePath = "demo/page/news.page.body.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
width = "-webkit-fill-available";
background = "#282828";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/comments.messages.js?disableCache=0798
var commentsMessages30 = class extends renderCollection32 {
static {
__name(this, "commentsMessages");
}
__className = "commentsMessages";
__sourcePath = "demo/comment/comments.messages.js";
__nodeMethods = "";
__stateMethods = "";
flexFlow = "column";
direction = "desc";
width = "-webkit-fill-available";
marginTop = 20;
debug = true;
preprocess(object93) {
var filter = object93.getFilter();
filter.search = OR30(LIKE30(filter.body, this.value), LIKE30(filter.title, this.value));
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default30.visitor, "READ");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.saveButton.js?disableCache=0798
var saveEditButton30 = class extends button30 {
static {
__name(this, "saveEditButton");
}
__className = "saveEditButton";
__sourcePath = "demo/comment/edit/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Save Message";
display = "none";
userContract;
async click(event2) {
var result = await this.socketManager.get("table", "save", this, "sign");
this.parent.id = false;
this.hide();
this.parent._information._editButton.show();
this.parent.body.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.edit.title.js?disableCache=0798
var commentEditTitle59 = class extends title89 {
static {
__name(this, "commentEditTitle");
}
__className = "commentEditTitle";
__sourcePath = "demo/comment/edit/comment.edit.title.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
borderLeft = "solid 1px #faebd7";
borderRight = "solid 1px #faebd7";
enableInput() {
this.background = "#373b44";
this.useCustomElement = true;
}
disableInput() {
this.background = "white";
this.useCustomElement = false;
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.edit.body.js?disableCache=0798
var commentEditBody59 = class extends extender59(body60, flexbox59) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/edit/comment.edit.body.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default59.createElement("textarea");
useCustomElement = true;
width = "-webkit-fill-available";
padding = 20;
background = "#282828!important";
//color = "white";
async keyup(event2) {
this.value = event2.target.value;
var result = await this.socketManager.get("column", "update", this, "keyup");
}
create() {
this.deactivateTextarea();
}
activateTextarea() {
this.useCustomElement = true;
}
deactivateTextarea() {
this.useCustomElement = false;
}
useCustomElement = false;
fontSize = 14;
//color = "red";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.userLabel.js?disableCache=0798
var userLabel59 = class extends label59 {
static {
__name(this, "userLabel");
}
__className = "userLabel";
__sourcePath = "demo/comment/edit/comment.userLabel.js";
__nodeMethods = "";
__stateMethods = "";
float = "left";
fontWeight = "bold";
padding = "12px";
paddingLeft = 26;
setAuthor(author) {
if (author.username) {
this.text = author.username.value;
}
}
create() {
var author = this.parent.parent.author;
this.setAuthor(author);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.deleteButton.js?disableCache=0798
var deleteButton89 = class extends button30 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "demo/comment/edit/comment.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Delete";
async click() {
var sure = confirm("Are you sure you want to delete this Post");
if (sure) {
this.parent.parent.delete();
this.parent.parent.remove();
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.editButton.js?disableCache=0798
var editButton60 = class extends button30 {
static {
__name(this, "editButton");
}
__className = "editButton";
__sourcePath = "demo/comment/edit/comment.editButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Edit";
async click() {
this.parent.parent.body.activateTextarea();
this.parent.parent.saveButton.show();
this.hide();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.information.js?disableCache=0798
var information30 = class {
static {
__name(this, "information");
}
__className = "information";
__sourcePath = "demo/comment/edit/comment.information.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
display = "grid";
display = "flex";
flexFlow = "row";
layers = 2;
borderBottom = "#2b2c2d57";
borderTop = "#2b2c2d57";
gridTemplate = " '_deleteButton _editButton' 'userLabel userLabel' ";
gridTemplateColumns = "40px 100px";
gridTemplateRows = "40px 60px";
_deleteButton = new deleteButton89();
_editButton = new editButton60();
_userLabel = new userLabel59();
//_icon = new chatIcon("ios-chatbubbles-outline.svg", true);
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/edit/comment.edit.js?disableCache=0798
var editComment30 = class extends comment31 {
static {
__name(this, "editComment");
}
__className = "editComment";
__sourcePath = "demo/comment/edit/comment.edit.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "flex";
debug = true;
flexFlow = "column";
gridTemplate = " '_information ' 'body ' 'body ' 'saveButton ' ";
_information = new information30();
body = new commentEditBody59();
title = new commentEditTitle59();
saveButton = new saveEditButton30();
width = "-webkit-fill-available";
create() {
this.title.hide();
this.author.disable = true;
if (!this.id) {
this.body.useCustomElement = true;
}
}
enableWRITE() {
this._information._editButton.show();
}
disableWRITE() {
this._information._editButton.hide();
this.body.useCustomElement = false;
this.saveButton.hide();
}
enableDELETE() {
this._information._deleteButton.show();
}
disableDELETE() {
this._information._deleteButton.hide();
}
permission() {
this.allow(this.author, "WRITE");
this.allow(this.author, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/create/comment.saveButton.js?disableCache=0798
var saveCommentButton30 = class extends button30 {
static {
__name(this, "saveCommentButton");
}
__className = "saveCommentButton";
__sourcePath = "demo/comment/create/comment.saveButton.js";
__nodeMethods = "";
__stateMethods = "";
label = "Create comment";
async click(event2) {
var result = await this.socketManager.get("table", "save", this.parent);
this.parent.create();
await this.parent.parent.commentsMessages.sync();
this.parent.parent.customElement.scrollTo(0, this.parent.parent.customElement.scrollHeight);
console.log("laatste", this.parent.parent.customElement.scrollHeight);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/create/comment.create.body.js?disableCache=0798
var commentEditBody60 = class extends extender59(body60, textarea30) {
static {
__name(this, "commentEditBody");
}
__className = "commentEditBody";
__sourcePath = "demo/comment/create/comment.create.body.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
height = "97px";
placeholder = "Message";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/comment/create/comment.create.js?disableCache=0798
var createComment30 = class extends comment31 {
static {
__name(this, "createComment");
}
__className = "createComment";
__sourcePath = "demo/comment/create/comment.create.js";
__nodeMethods = "";
__stateMethods = "";
display = "flex";
body = new commentEditBody60();
saveButton = new saveCommentButton30();
title = false;
author = this.user;
// bug destroys the permission system
background = "#00000042";
width = "50vw";
debug = true;
width = "100%";
marginTop = 40;
async create() {
this.body.value = "";
this.setID(false);
}
disableWRITE() {
this.hide();
}
enableWRITE() {
this.show();
}
permission() {
this.allow(user_group_permission_default30.member, "WRITE");
this.allow(user_group_permission_default30.admin, "WRITE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/page/news.page.backButton.js?disableCache=0798
var backButton59 = class {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.backButton.js";
__nodeMethods = "";
__stateMethods = "openNewsItems";
text = "<";
color = "white";
fontWeight = "bold";
cursor = "pointer";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
boxBackground = "#282828";
click() {
this.stateMachine.composeState("Home");
this.openNewsItems();
}
openNewsItems() {
var rightSide31 = this.parents("newsPages");
rightSide31.newsItemPage.transform = "translateX(0)";
rightSide31.newsPage.transform = "translateX(0)";
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/page/news.page.edit.button.js?disableCache=0798
var backButton60 = class extends button30 {
static {
__name(this, "backButton");
}
__className = "backButton";
__sourcePath = "demo/page/news.page.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Edit News";
color = "white";
fontWeight = "bold";
cursor = "pointer";
float = "right";
propegateEvent = false;
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset";
click() {
this.stateMachine.composeState("Edit");
var rightSide31 = this.parents("newsPages");
var newsEdit31 = rightSide31.newsEdit;
newsEdit31.id = this.parent.id;
newsEdit31.sync();
newsEdit31.show();
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/filler.js?disableCache=0798
var filler30 = class {
static {
__name(this, "filler");
}
__className = "filler";
__sourcePath = "elements/filler.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
height = "-webkit-fill-available";
background = "#282828";
width = "-webkit-fill-available";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/page/search.comments.js?disableCache=0798
var searchBar89 = class extends input30 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "demo/page/search.comments.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.commentsMessages;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/page/news.page.js?disableCache=0798
var testDiv30 = class {
static {
__name(this, "testDiv");
}
__className = "testDiv";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
pageTitle = new newsPageTitle30();
};
var newsPage30 = class extends news30 {
static {
__name(this, "newsPage");
}
__className = "newsPage";
__sourcePath = "demo/page/news.page.js";
__nodeMethods = "";
__stateMethods = "loadPage";
willChange = "transform";
transform;
minHeight = "100%";
transition = "1s";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#282828";
flexDirection = "column";
_backButton = new backButton59();
_testDiv = new testDiv30();
body = new newsPageBody60();
editButton = new backButton60();
//testSuffixes = new testSuffixes();
debug = true;
width = 600;
sizing = "border-box";
layers = 1;
height = "70vh";
overflowY = "auto";
searchComments = new searchBar89();
commentsMessages = new commentsMessages30(editComment30, this.comments);
createComment = new createComment30(this.comments);
filler = new filler30();
async afterLoad() {
var pathName = window.location.pathname;
var pathParts = pathName.split("/");
var id2 = parseFloat(pathParts[1]);
if (id2) {
this.stateMachine.composeState();
this.showParents();
this.show();
await this.loadPage(id2);
}
}
async loadPage(id2) {
var rightSide31 = this.parents("newsPages");
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
rightSide31.newsItemPage.transform = "translateX(-600px)";
rightSide31.newsPage.transform = "translateX(-600px)";
this.id = id2;
await this.sync();
this.createComment.create();
}
async create() {
await this.commentsMessages.sync();
}
permission() {
this.allow(user_group_permission_default30.member, "WRITE");
this.allow(user_group_permission_default30.admin, "WRITE");
this.allow(user_group_permission_default30.visitor, "WRITE");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
this.allow(user_group_permission_default30.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/newsPages.js?disableCache=0798
var newsPages30 = class {
static {
__name(this, "newsPages");
}
__className = "newsPages";
__sourcePath = "demo/pages/newsPages.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
newsItemPage = new newsItemPage30();
newsPage = new newsPage30();
newsEdit = new newsEdit30();
width = 1800;
};
// framework/cache/platforms/Macos/Pc/Dark/elements/preloaders/simpleSpinner.js?disableCache=0798
var line30 = class {
static {
__name(this, "line");
}
__className = "line";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
create() {
this.element.classList.add("loader-line-dark");
}
};
var lineMask30 = class {
static {
__name(this, "lineMask");
}
__className = "lineMask";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
display = "block";
line = new line30();
create() {
this.element.classList.add("loader-line-mask");
}
};
var preloaderBox30 = class {
static {
__name(this, "preloaderBox");
}
__className = "preloaderBox";
__sourcePath = "elements/preloaders/simpleSpinner.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
margin = 40;
left = "0";
top = "0";
//marginTop = "0px!important"
//marginLeft = "0px!important";
position = "relative!important";
lineMask = new lineMask30();
create() {
this.element.classList.add("loader-circle");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/themeSelector.image.js?disableCache=0798
var themaSelectorImage30 = class {
static {
__name(this, "themaSelectorImage");
}
__className = "themaSelectorImage";
__sourcePath = "demo/pages/appearance/themeSelector.image.js";
__nodeMethods = "";
__stateMethods = "";
cursor = "pointer";
backgroundSize = "cover";
borderRadius = 12;
layers = 1;
width = 80;
height = 80;
margin = 20;
marginBottom = 4;
transition = "1s";
border;
backgroundImage;
lowLight() {
this.border = "none";
}
highlight() {
this.border = "2px solid blue";
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/themeSelector.label.js?disableCache=0798
var selectLabel30 = class {
static {
__name(this, "selectLabel");
}
__className = "selectLabel";
__sourcePath = "demo/pages/appearance/themeSelector.label.js";
__nodeMethods = "";
__stateMethods = "";
fontSize = 12;
fontWeight = "bold";
margin = "0 auto";
color = "white";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/themeSelector.js?disableCache=0798
var themeSelector30 = class {
static {
__name(this, "themeSelector");
}
__className = "themeSelector";
__sourcePath = "demo/pages/appearance/themeSelector.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
marginBottom = 20;
constructor(name) {
this.selectLabel.text = name;
}
highlight() {
var children = this.parent.getChildren();
for (var i = 0; i < children.length; i++) {
children[i].selectImage.lowLight();
}
this.selectImage.highlight();
}
setImage(image31) {
this.selectImage.backgroundImage = "url(" + image31 + ")";
}
selectImage = new themaSelectorImage30();
selectLabel = new selectLabel30();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/os.selector.js?disableCache=0798
var themeOSSelectorItem30 = class extends themeSelector30 {
static {
__name(this, "themeOSSelectorItem");
}
__className = "themeOSSelectorItem";
__sourcePath = "demo/pages/appearance/rows/os.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var osName = tools_default31.CamelCase(this.selectLabel.text);
this.getRoot().os = osName;
this.parent.updateImages(this.getRoot().tint);
this.parents("appearancePanel").tint.themeTintSelectors.updateImages(osName);
this.highlight();
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/os.selector.list.js?disableCache=0798
var osSelectorList30 = class {
static {
__name(this, "osSelectorList");
}
__className = "osSelectorList";
__sourcePath = "demo/pages/appearance/rows/os.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeWindows = new themeOSSelectorItem30("Windows");
themeMacOS = new themeOSSelectorItem30("macOS");
//themeAndroid = new themeOSSelector("Android");
updateImages(tint31) {
var camelCaseTint = tools_default31.CamelCase(tint31);
this.themeWindows.setImage("/assets/images/themeSelectors/windows" + camelCaseTint + ".png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macos" + camelCaseTint + ".png");
}
create() {
this.themeWindows.highlight();
this.themeWindows.setImage("/assets/images/themeSelectors/windowsLight.png");
this.themeMacOS.setImage("/assets/images/themeSelectors/macosLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/os.label.js?disableCache=0798
var osLabel30 = class extends label59 {
static {
__name(this, "osLabel");
}
__className = "osLabel";
__sourcePath = "demo/pages/appearance/rows/os.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/os.js?disableCache=0798
var os30 = class extends panelRow30 {
static {
__name(this, "os");
}
__className = "os";
__sourcePath = "demo/pages/appearance/rows/os.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new osLabel30("Os");
osSelector = new osSelectorList30();
spinner = new preloaderBox30();
create() {
this.osSelector.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.osSelector.show();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/tint.selector.js?disableCache=0798
var themeTintSelector30 = class extends themeSelector30 {
static {
__name(this, "themeTintSelector");
}
__className = "themeTintSelector";
__sourcePath = "demo/pages/appearance/rows/tint.selector.js";
__nodeMethods = "";
__stateMethods = "";
click() {
var tintName = tools_default31.CamelCase(this.selectLabel.text);
this.parents("appearancePanel").os.osSelector.updateImages(tintName);
this.highlight();
this.getRoot().tint = tintName;
}
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/tint.selector.list.js?disableCache=0798
var themeTintSelectors30 = class {
static {
__name(this, "themeTintSelectors");
}
__className = "themeTintSelectors";
__sourcePath = "demo/pages/appearance/rows/tint.selector.list.js";
__nodeMethods = "";
__stateMethods = "";
themeLight = new themeTintSelector30("Light");
themeDark = new themeTintSelector30("Dark");
updateImages(os31) {
os31 = os31.toLowerCase();
var tint31 = tools_default31.CamelCase(this.getRoot().tint);
this.themeDark.setImage("/assets/images/themeSelectors/" + os31 + "Dark.png");
this.themeLight.setImage("/assets/images/themeSelectors/" + os31 + "Light.png");
this["theme" + tint31].highlight();
}
create() {
this.themeDark.highlight();
this.themeDark.setImage("/assets/images/themeSelectors/windowsDark.png");
this.themeLight.setImage("/assets/images/themeSelectors/windowsLight.png");
}
layers = 1;
margin = 4;
marginLeft = "auto";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/tint.label.js?disableCache=0798
var customLabel59 = class extends label59 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "demo/pages/appearance/rows/tint.label.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/rows/tint.js?disableCache=0798
var tint30 = class extends panelRow30 {
static {
__name(this, "tint");
}
__className = "tint";
__sourcePath = "demo/pages/appearance/rows/tint.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "row";
label = new customLabel59("Appearance");
themeTintSelectors = new themeTintSelectors30();
spinner = new preloaderBox30();
create() {
this.themeTintSelectors.hide();
}
afterThemeLoad() {
this.spinner.hide();
this.themeTintSelectors.show();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/appearance/panel.js?disableCache=0798
var appearancePanel30 = class extends panel30 {
static {
__name(this, "appearancePanel");
}
__className = "appearancePanel";
__sourcePath = "demo/pages/appearance/panel.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
os = new os30();
tint = new tint30();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/pages/settings.js?disableCache=0798
var settings30 = class {
static {
__name(this, "settings");
}
__className = "settings";
__sourcePath = "demo/pages/settings.js";
__nodeMethods = "";
__stateMethods = "";
sizing = "border-box";
background = "#282828";
layers = 1;
height = "-webkit-fill-available";
padding = 20;
width = "100%";
flexDirection = "column";
settingsHeader = new header30("Appearance");
appearancePanel = new appearancePanel30();
//spinner = new spinner();
};
// framework/unify/console.js?disableCache=0798
var Console31 = class {
static {
__name(this, "Console");
}
log(...args) {
console.log("Console.js:", args[0], args[1], args[2], args[2], args[3]);
}
};
var console_default31 = new Console31();
// framework/unify/promiseManager.js?disableCache=0798
var promiseManager31 = class {
static {
__name(this, "promiseManager");
}
promises = new Array();
messages = new Array();
socketManager;
addPromise(promiseObject) {
this.promises.push(promiseObject);
}
addMessage(message) {
this.messages.push(message);
}
getPromiseByID(id2) {
var promises = this.promises;
for (var c31 = 0; c31 < promises.length; c31++) {
var currentPromise = promises[c31];
if (currentPromise.id == id2) {
return currentPromise;
}
}
console.error("Promise with id " + id2 + " not found", this);
return false;
}
getMessageByID(id2) {
var messages = this.messages;
for (var c31 = 0; c31 < messages.length; c31++) {
var message = messages[c31];
if (message.id == id2) {
return message;
}
}
}
createPromise(messageID, resolveFunction, object93) {
var promiseObject = new Object();
promiseObject.id = messageID;
promiseObject.resolve = resolveFunction;
if (object93) {
promiseObject.object = object93;
}
}
createPromiseFunction(messageID, object93) {
var promiseManager32 = this;
function promiseFunction(resolveFunction) {
var promiseObject = this.createPromise(messageID, resolveFunction, object93);
promiseManager32.addPromise(promiseObject);
}
__name(promiseFunction, "promiseFunction");
return promiseFunction;
}
};
// framework/unify/shared.js?disableCache=0798
var shared31 = class {
static {
__name(this, "shared");
}
get() {
if (typeof document == "undefined" && typeof global != "undefined") {
return global;
} else if (typeof document != "undefined") {
return document;
} else {
return {};
}
}
};
var object91 = new shared31();
var shared_default31 = object91.get();
// framework/cache/platforms/Macos/Pc/Dark/elements/fileUpload.js?disableCache=0798
var fileUpload30 = class extends input30 {
static {
__name(this, "fileUpload");
}
__className = "fileUpload";
__sourcePath = "elements/fileUpload.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "file";
attribute = "multiple";
promiseManager = new promiseManager31();
uploadID = 0;
fileInformation = new Array();
path = "/assets/uploads/";
customFileName = false;
constructor() {
super();
}
create() {
this.customElement.setAttribute("type", this.inputType);
this.customElement.setAttribute("multiple", "true");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.icon.deleteButton.js?disableCache=0798
var delay89 = /* @__PURE__ */ __name((time) => new Promise((res) => setTimeout(res, time)), "delay");
var deleteFileIconButton30 = class extends icon30 {
static {
__name(this, "deleteFileIconButton");
}
__className = "deleteFileIconButton";
__sourcePath = "demo/fileManager/fileManager.icon.deleteButton.js";
__nodeMethods = "removeFile";
__stateMethods = "";
width = 24;
height = 24;
propegateEvent = false;
boxMarginTop = "-12px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
boxPosition = "absolute";
boxMarginLeft = -8;
boxDisplay = "none";
async click() {
this.parent.opacity = "0%";
await delay89(200);
this.parent.background = "none";
this.parent.width = 0;
this.parent.margin = 0;
this.parent.padding = 0;
this.parent.border = "none";
await delay89(200);
this.parent.hide();
this.parent.remove();
var fileName = this.parent.value;
await this.removeFile(fileName);
}
async removeFile(fileName) {
var absolutePath = path.resolve("./assets/uploads/" + fileName);
console.log("Removing file test", absolutePath);
if (fs.existsSync(absolutePath)) {
fs.unlinkSync(absolutePath);
console.log("File is removed.");
} else {
console.log("File does not exist.");
}
}
constructor() {
super("close.svg");
}
create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.icon.js?disableCache=0798
var fileIcon30 = class extends icon30 {
static {
__name(this, "fileIcon");
}
__className = "fileIcon";
__sourcePath = "demo/fileManager/fileManager.icon.js";
__nodeMethods = "";
__stateMethods = "";
boxSizing = "border-box";
border = "none";
opacity = "100%";
fontSize = "0";
propegateEvent = false;
backgroundSize = "cover!important";
width = 60;
height = 60;
borderRadius = 12;
margin = 6;
display = "block";
float = "left";
layers = 1;
border = "2px solid #F7FAFC";
cursor = "pointer";
deleteButton = new deleteFileIconButton30();
mode = "show";
//transition = "2s"
toggleEditMode() {
if (this.mode == "show") {
this.deleteButton.show();
this.mode = "edit";
this.rotateAnimation.play();
} else {
this.deleteButton.hide();
this.mode = "show";
this.rotateAnimation.stop();
}
}
create() {
this.setImage("'/assets/uploads/" + this.value + "'");
this.createKeyFrame();
this.opacityAnimation.play();
}
createKeyFrame() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var randomTime = "0.2" + Math.floor(Math.random() * 1e3);
this.rotateAnimation.setDuration(randomTime + "s");
this.rotateAnimation.setIterationCount("infinite");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "3deg");
var key = this.rotateAnimation.createKeyFrame(50);
key.setProperty("rotate", "-3deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "3deg");
this.opacityAnimation = this.createAnimation("opacityAnimation");
this.opacityAnimation.setIterationCount("1");
this.opacityAnimation.setDuration("0.9s");
this.opacityAnimation.setFillMode("forwards");
var key = this.opacityAnimation.createKeyFrame(0);
key.setProperty("opacity", "0");
key.setProperty("display", "none");
var key = this.opacityAnimation.createKeyFrame(1);
key.setProperty("opacity", "0");
key.setProperty("display", "block");
var key = this.opacityAnimation.createKeyFrame(100);
key.setProperty("display", "block");
key.setProperty("opacity", "100%");
}
mouseover() {
this.border = "2px solid rgb(125 177 211)";
}
mouseleave() {
this.border = "2px solid #F7FAFC";
}
async click() {
var previewWindow = this.parent.parent.previewWindow;
previewWindow.setTitle(this.value);
previewWindow.show("block");
previewWindow.center();
previewWindow.setImage("/assets/uploads/" + this.value);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.upload.js?disableCache=0798
var stream30 = class extends fileUpload30 {
static {
__name(this, "stream");
}
__className = "stream";
__sourcePath = "demo/fileManager/fileManager.upload.js";
__nodeMethods = "createStream,writeChunk,endstream,android_file_chooser";
__stateMethods = "";
placeholder = "Upload.";
margin = 20;
stream;
type;
/*
inputType = "button";
click( event ) {
//this.android_file_chooser();
//var fileChooser = this.parent.fileChooser;
//fileChooser.show("flex")
//fileChooser.open();
}
*/
async change(event2) {
var input31 = this.customElement;
var files = input31.files;
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var chunksize = 64 * 1024;
var offset = 0;
var filename = file31.name.replaceAll(" ", "_");
await this.createStream(filename);
while (offset < file31.size) {
const chunkfile = await file31.slice(offset, offset + chunksize);
const chunk = await chunkfile.arrayBuffer();
var intChunk = new Int8Array(chunk);
this.writeChunk(intChunk);
offset += chunksize;
}
await this.endstream();
}
}
async createStream(filename) {
var absolutePath = path.resolve("./assets/uploads/" + filename);
this.filename = filename;
console.log("Writing file to path", absolutePath);
this.stream = fs.createWriteStream(absolutePath, { encoding: "binary" });
this.stream.on("finish", function() {
console.log("file has been written");
});
}
async writeChunk(chunk) {
this.stream.write(Buffer.from(Object.values(chunk)));
}
async endstream() {
this.stream.end();
var currentFileIcon = new fileIcon30();
currentFileIcon.value = this.filename;
this.parent.fileList.add(currentFileIcon);
}
async android_file_chooser() {
}
//mouseover() {
// console.log("mouseover??", this.parent.removeIcons)
// if( this.parent.removeIcons.mode == "wiggle" ) {
// this.parent.removeIcons.click();
// }
//}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.list.js?disableCache=0798
var fileList30 = class extends panelRow30 {
static {
__name(this, "fileList");
}
__className = "fileList";
__sourcePath = "demo/fileManager/fileManager.list.js";
__nodeMethods = "readFiles";
__stateMethods = "";
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
async readFiles() {
var absolutePath = path.resolve("./assets/uploads/");
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var file31 = files[i];
var currentFileIcon = new fileIcon30();
currentFileIcon.value = file31;
this.add(currentFileIcon);
}
return files;
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.removeIcons.js?disableCache=0798
var removeIcons30 = class extends icon30 {
static {
__name(this, "removeIcons");
}
__className = "removeIcons";
__sourcePath = "demo/fileManager/fileManager.removeIcons.js";
__nodeMethods = "";
__stateMethods = "";
width = 14;
height = 14;
margin = 4;
propegateEvent = false;
backgroundSize = "contain!important";
cursor = "pointer";
boxMarginTop = "17px";
boxBorderRadius = 14;
boxBackground = "#ffffffbf";
boxWidth = "fit-content";
boxPadding = 2;
//boxPosition = "";
boxMarginLeft = 11;
boxMarginBottom = -37;
constructor() {
super("edit.svg");
}
mode = "normal";
click() {
var icons = this.parent.fileList.getChildren();
for (var i = 0; i < icons.length; i++) {
var icon31 = icons[i];
icon31.toggleEditMode();
}
if (this.mode == "normal") {
this.setImage("/assets/images/icons/stop.png");
this.mode = "wiggle";
} else {
this.mode = "normal";
this.setImage("/assets/images/icons/edit.svg");
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/page.js?disableCache=0798
var page30 = class {
static {
__name(this, "page");
}
__className = "page";
__sourcePath = "elements/page.js";
__nodeMethods = "";
__stateMethods = "";
background = "#282828";
padding = 20;
height = "-webkit-fill-available";
minHeight = 400;
width = "-webkit-fill-available";
paddingRight = 80;
};
// framework/cache/platforms/Macos/Pc/Dark/elements/image.js?disableCache=0798
var icon_id60 = 0;
var image30 = class {
static {
__name(this, "image");
}
__className = "image";
__sourcePath = "elements/image.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default59.createElement("img");
useCustomElement = true;
id = icon_id60++;
setImage(path2) {
this.customElement.setAttribute("src", path2);
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/preview/previewWindow.image.js?disableCache=0798
var previewImage30 = class extends image30 {
static {
__name(this, "previewImage");
}
__className = "previewImage";
__sourcePath = "demo/fileManager/preview/previewWindow.image.js";
__nodeMethods = "";
__stateMethods = "";
layers = 1;
width = "90%";
//height = "100%"
margin = "0 auto";
backgroundSize = "contain!important";
propegateEvent = false;
borderRadius = 12;
transition = "1s";
maxHeight = "87vh";
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.imagePreviewWindow.js?disableCache=0798
var imagePreviewWindow30 = class extends draggable59 {
static {
__name(this, "imagePreviewWindow");
}
__className = "imagePreviewWindow";
__sourcePath = "demo/fileManager/fileManager.imagePreviewWindow.js";
__nodeMethods = "";
__stateMethods = "";
selector = "#application";
backdropFilter = "blur(22px)";
paddingBottom = 30;
display = "none";
create() {
this.center();
this.hide();
}
width = 600;
flexDirection = "column";
borderRadius = 12;
windowHeader = new windowHeader30();
previewImage = new previewImage30();
setTitle(title91) {
this.windowHeader.setTitle(title91);
}
setImage(path2) {
this.previewImage.setImage(path2);
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/fileChooser/fileChooser.file.icon.js?disableCache=0798
var fileChooserFileIcon30 = class extends icon30 {
static {
__name(this, "fileChooserFileIcon");
}
__className = "fileChooserFileIcon";
__sourcePath = "elements/fileChooser/fileChooser.file.icon.js";
__nodeMethods = "";
__stateMethods = "";
width = 50;
height = 50;
layers = 1;
backgroundSize = "contain!important";
create() {
console.log("icon type", this.parent.fileType);
if (this.parent.fileType == "file") {
this.setImage("assets/images/icons/file.png");
}
if (this.parent.fileType == "directory") {
this.setImage("assets/images/icons/folder.png");
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/checkbox.js?disableCache=0798
var checkbox30 = class {
static {
__name(this, "checkbox");
}
__className = "checkbox";
__sourcePath = "elements/checkbox.js";
__nodeMethods = "";
__stateMethods = "";
boxDisplay = "table-cell";
customElement = document_default59.createElement("input");
autoUpdate = true;
inputType = "checkbox";
useCustomElement = true;
editable = true;
layers = 2;
parseChildren = false;
setType(type) {
this.inputType = type;
}
setup() {
this.customElement.setAttribute("value", this.id);
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/fileChooser/fileChooser.file.js?disableCache=0798
var file30 = class {
static {
__name(this, "file");
}
__className = "file";
__sourcePath = "elements/fileChooser/fileChooser.file.js";
__nodeMethods = "";
__stateMethods = "";
margin = 10;
filename;
path;
create() {
var filename = this.filename;
this.label.text = filename;
}
checkbox = new checkbox30();
icon = new fileChooserFileIcon30();
label = new label59();
};
// framework/cache/platforms/Macos/Pc/Dark/elements/fileChooser/fileChooser.files.js?disableCache=0798
var fileChooserFiles30 = class {
static {
__name(this, "fileChooserFiles");
}
__className = "fileChooserFiles";
__sourcePath = "elements/fileChooser/fileChooser.files.js";
__nodeMethods = "getSystemPath,getDirectory";
__stateMethods = "";
async open() {
var relativePath = "./";
var systemPath = await this.getSystemPath(relativePath);
var files = await this.getDirectory(systemPath);
}
async getSystemPath(relativePath) {
var absolutePath = path.resolve(relativePath);
console.log("getSystemPath", absolutePath);
return absolutePath;
}
async getDirectory(absolutePath) {
var files = fs.readdirSync(absolutePath);
for (var i = 0; i < files.length; i++) {
var filename = files[i];
var fileStat = fs.lstatSync(absolutePath + "/" + filename);
var currentFile = new file30();
currentFile.filename = filename;
currentFile.path = absolutePath;
if (fileStat.isDirectory()) {
currentFile.fileType = "directory";
} else {
currentFile.fileType = "file";
}
console.log("add file", currentFile);
this.add(currentFile);
}
console.log("readdirSync", files);
return files;
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/fileChooser/fileChooser.select.button.js?disableCache=0798
var fileChooserSelectButton30 = class extends button30 {
static {
__name(this, "fileChooserSelectButton");
}
__className = "fileChooserSelectButton";
__sourcePath = "elements/fileChooser/fileChooser.select.button.js";
__nodeMethods = "";
__stateMethods = "";
layers = 2;
click() {
alert("asd");
console.log("click", this);
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/fileChooser/fileChooser.js?disableCache=0798
var fileChooser30 = class {
static {
__name(this, "fileChooser");
}
__className = "fileChooser";
__sourcePath = "elements/fileChooser/fileChooser.js";
__nodeMethods = "";
__stateMethods = "";
//selector = "#application";
zIndex = 1e3;
left = 0;
top = 0;
width = "100vw";
height = "100vh";
flexDirection = "column";
display = "none";
files = new fileChooserFiles30();
selectButton = new fileChooserSelectButton30();
open() {
this.files.open();
}
async create() {
this.hide();
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/fileManager/fileManager.js?disableCache=0798
var fileManager30 = class extends page30 {
static {
__name(this, "fileManager");
}
__className = "fileManager";
__sourcePath = "demo/fileManager/fileManager.js";
__nodeMethods = "";
__stateMethods = "";
width = "100%";
minHeight = 350;
flexDirection = "column";
uploadHeader = new header30("Upload");
fileupload = new stream30();
filesHeader = new header30("Files");
removeIcons = new removeIcons30();
fileList = new fileList30();
previewWindow = new imagePreviewWindow30();
fileChooser = new fileChooser30();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.move.js?disableCache=0798
var animationBlock204 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
marginTop = 12;
marginLeft = 12;
create() {
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
}
async click() {
this.moveAnimation.play("2s");
}
};
var rowLabel204 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var moveRow30 = class extends panelRow30 {
static {
__name(this, "moveRow");
}
__className = "moveRow";
__sourcePath = "demo/animations/animation.move.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel204("Move");
animationBlock = new animationBlock204();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.rotate.js?disableCache=0798
var animationBlock205 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel205 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row175 = class extends panelRow30 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotate.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel205("Rotate");
animationBlock = new animationBlock205();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.color.js?disableCache=0798
var animationBlock206 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("backgroundAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.animation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.animation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.animation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel206 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row176 = class extends panelRow30 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.color.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel206("Background color");
animationBlock = new animationBlock206();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.skewX.js?disableCache=0798
var animationBlock207 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("rotateAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("skewX", "0deg");
var key = this.animation.createKeyFrame(20);
key.setProperty("skewX", "14deg");
var key = this.animation.createKeyFrame(60);
key.setProperty("skewX", "52deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("skewX", "0deg");
}
async click() {
this.animation.play("2s");
}
};
var rowLabel207 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row177 = class extends panelRow30 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.skewX.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel207("skewX");
animationBlock = new animationBlock207();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.rotateMoveColor.js?disableCache=0798
var animationBlock208 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
zIndex = 4;
create() {
this.rotateAnimation = this.createAnimation("rotateAnimation");
var key = this.rotateAnimation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.rotateAnimation.createKeyFrame(20);
key.setProperty("rotate", "60deg");
var key = this.rotateAnimation.createKeyFrame(60);
key.setProperty("rotate", "120deg");
var key = this.rotateAnimation.createKeyFrame(100);
key.setProperty("rotate", "0deg");
this.moveAnimation = this.createAnimation("moveAnimation");
var key = this.moveAnimation.createKeyFrame(0);
key.setProperty("margin-right", 12);
var key = this.moveAnimation.createKeyFrame(20);
key.setProperty("margin-right", 40);
var key = this.moveAnimation.createKeyFrame(30);
key.setProperty("margin-right", 120);
var key = this.moveAnimation.createKeyFrame(50);
key.setProperty("margin-top", 200);
var key = this.moveAnimation.createKeyFrame(100);
this.backgroundAnimation = this.createAnimation("backgroundAnimation");
var key = this.backgroundAnimation.createKeyFrame(0);
key.setProperty("background", "#03a9f4");
var key = this.backgroundAnimation.createKeyFrame(40);
key.setProperty("background", "#a6e22e");
var key = this.backgroundAnimation.createKeyFrame(70);
key.setProperty("background", "#f92672");
var key = this.backgroundAnimation.createKeyFrame(100);
key.setProperty("background", "#03a9f4");
}
async click() {
this.text = "Rotating and moving.";
this.rotateAnimation.play("2s");
await this.moveAnimation.play("3s");
this.text = "Changing background color.";
await this.backgroundAnimation.play("2s");
this.text = "Animation is done.";
}
};
var rowLabel208 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row178 = class extends panelRow30 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.rotateMoveColor.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel208("Rotate + Move + Background");
animationBlock = new animationBlock208();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.reverse.js?disableCache=0798
var animationBlock209 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
create() {
this.animation = this.createAnimation("reverseAnimation");
var key = this.animation.createKeyFrame(0);
key.setProperty("rotate", "0deg");
var key = this.animation.createKeyFrame(100);
key.setProperty("rotate", "360deg");
this.animation.duration = "2s";
this.animation.iterationCount = "infinite";
this.animation.fillMode = "forwards";
}
async mouseover() {
}
async mouseleave() {
}
};
var forwardButton30 = class extends button30 {
static {
__name(this, "forwardButton");
}
__className = "forwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Forward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "normal";
}
};
var backwardButton30 = class extends button30 {
static {
__name(this, "backwardButton");
}
__className = "backwardButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Direction Backward";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.direction = "reverse";
}
};
var pauseButton30 = class extends button30 {
static {
__name(this, "pauseButton");
}
__className = "pauseButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Pause";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.pause();
}
};
var playButton30 = class extends button30 {
static {
__name(this, "playButton");
}
__className = "playButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Play";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.play();
}
};
var stopButton30 = class extends button30 {
static {
__name(this, "stopButton");
}
__className = "stopButton";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
text = "Stop";
click() {
var animation2 = this.parent.parent.animationBlock.animation;
animation2.stop();
}
};
var rowLabel209 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var buttons59 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
playButton = new playButton30();
pauseButton = new pauseButton30();
stopButton = new stopButton30();
forwardButton = new forwardButton30();
backwardButton = new backwardButton30();
flexDirection = "column";
};
var row179 = class extends panelRow30 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.reverse.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel209("Reverse");
buttons = new buttons59();
animationBlock = new animationBlock209();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animation.render.js?disableCache=0798
var animationBlock210 = class {
static {
__name(this, "animationBlock");
}
__className = "animationBlock";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render() {
this.time++;
this.width = 100 + Math.cos(this.time / 100) * 100;
this.height = 100 + Math.sin(this.time / 100) * 100;
}
};
var rowLabel210 = class extends label59 {
static {
__name(this, "rowLabel");
}
__className = "rowLabel";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
flex = "1";
};
var row180 = class extends panelRow30 {
static {
__name(this, "row");
}
__className = "row";
__sourcePath = "demo/animations/animation.render.js";
__nodeMethods = "";
__stateMethods = "";
boxWidth = "95%";
rowLabel = new rowLabel210("RenderLoop");
animationBlock = new animationBlock210();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/animations/animations.js?disableCache=0798
var animations30 = class {
static {
__name(this, "animations");
}
__className = "animations";
__sourcePath = "demo/animations/animations.js";
__nodeMethods = "";
__stateMethods = "";
overflowY = "auto";
height = 600;
width = "auto";
flexDirection = "column";
scrollbarWidth = "6px";
scrollbarTrackBackground = "#1c1d1e";
scrollbarThumbBackground = "#404040";
scrollbarThumbBorderRadius = "4px";
scrollbarThumbHoverBackground = "grey";
background = "#282828";
layers = 1;
// height = "-webkit-fill-available";
padding = 20;
// width = "100%"
moveAnimation = new moveRow30();
rotateAnimation = new row175();
backgroundColor = new row176();
skewX = new row177();
rotateMoveColor = new row178();
reverse = new row179();
render = new row180();
};
// framework/cache/platforms/Macos/Pc/Dark/demo/examples/grids.js?disableCache=0798
var label60 = class {
static {
__name(this, "label");
}
__className = "label";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
constructor(text2) {
this.text = text2;
}
background = "#0000002e";
borderRadius = 6;
margin = 10;
padding = 26;
};
var a30 = class extends input30 {
static {
__name(this, "a");
}
__className = "a";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var b31 = class extends input30 {
static {
__name(this, "b");
}
__className = "b";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "blue";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var c30 = class extends input30 {
static {
__name(this, "c");
}
__className = "c";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//background = "yellow";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var d30 = class extends input30 {
static {
__name(this, "d");
}
__className = "d";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
//boxBackground = "grey";
boxAlignItems = "center";
boxJustifyContent = "center";
boxColor = "black";
};
var gridA30 = class {
static {
__name(this, "gridA");
}
__className = "gridA";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"a a"
"b d"
"c d"
`;
height = 400;
width = "100%";
label = new label60("This is the first Grid, Press tab to navigate trough the inputs.");
a = new a30();
b = new b31();
c = new c30();
d = new d30();
};
var gridB30 = class {
static {
__name(this, "gridB");
}
__className = "gridB";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
display = "grid";
gridTemplate = `
"label label"
"d d"
"a empty"
"b b"
`;
height = 400;
width = "100%";
label = new label60("This is the second Grid, Press tab to navigate trough the inputs.");
a = new a30();
b = new b31();
c = new c30();
d = new d30();
};
var gridExample30 = class extends page30 {
static {
__name(this, "gridExample");
}
__className = "gridExample";
__sourcePath = "demo/examples/grids.js";
__nodeMethods = "";
__stateMethods = "";
flexDirection = "column";
gridA = new gridA30();
gridB = new gridB30();
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/header/user.userList.header.username.js?disableCache=0798
var userListHeaderUsername30 = class extends gridViewRowColumn30 {
static {
__name(this, "userListHeaderUsername");
}
__className = "userListHeaderUsername";
__sourcePath = "user/userList/header/user.userList.header.username.js";
__nodeMethods = "";
__stateMethods = "";
text = "Username";
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/header/user.userList.header.actions.js?disableCache=0798
var userListHeaderActions30 = class extends gridViewRowColumn30 {
static {
__name(this, "userListHeaderActions");
}
__className = "userListHeaderActions";
__sourcePath = "user/userList/header/user.userList.header.actions.js";
__nodeMethods = "";
__stateMethods = "";
text = "Actions";
enableDELETE() {
this.show();
}
disableDELETE() {
this.hide();
}
permission() {
this.allow(user_group_permission_default30.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/header/user.userList.header.js?disableCache=0798
var userListHeader30 = class extends extender59(user31, gridViewTableRow30) {
static {
__name(this, "userListHeader");
}
__className = "userListHeader";
__sourcePath = "user/userList/header/user.userList.header.js";
__nodeMethods = "";
__stateMethods = "";
username = new userListHeaderUsername30();
actions = new userListHeaderActions30();
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/user.userList.table.header.js?disableCache=0798
var userListTableHeader30 = class extends gridViewHeader30 {
static {
__name(this, "userListTableHeader");
}
__className = "userListTableHeader";
__sourcePath = "user/userList/user.userList.table.header.js";
__nodeMethods = "";
__stateMethods = "";
userListHeaderRow = new userListHeader30();
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/user.userList.table.body.js?disableCache=0798
var userListTableBody30 = class extends extender59(renderCollection32, gridViewTableHeader30) {
static {
__name(this, "userListTableBody");
}
__className = "userListTableBody";
__sourcePath = "user/userList/user.userList.table.body.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
async create() {
await this.sync();
}
preprocess(object93) {
var filter = object93.getFilter();
filter.search = LIKE30(filter.username, this.value);
filter.direction = "desc";
}
permission() {
this.allow(user_group_permission_default30.visitor, "READ");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/item/user.userList.item.username.js?disableCache=0798
var userListItemTitle30 = class extends extender59(username31, gridViewBodyColumn30) {
static {
__name(this, "userListItemTitle");
}
__className = "userListItemTitle";
__sourcePath = "user/userList/item/user.userList.item.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/item/user.userList.item.actions.deleteButton.js?disableCache=0798
var deleteButton90 = class extends button30 {
static {
__name(this, "deleteButton");
}
__className = "deleteButton";
__sourcePath = "user/userList/item/user.userList.item.actions.deleteButton.js";
__nodeMethods = "";
__stateMethods = "";
text = "Delete";
propegateEvent = false;
async click() {
var sure = confirm("Are you sure you want to delete this item");
if (sure) {
await this.parent.parent.delete();
this.parent.parent.remove();
}
}
permission() {
this.allow(user_group_permission_default30.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/item/user.userList.item.actions.js?disableCache=0798
var userListItemActions30 = class extends extender59(gridViewBodyColumn30, gridViewBodyColumn30) {
static {
__name(this, "userListItemActions");
}
__className = "userListItemActions";
__sourcePath = "user/userList/item/user.userList.item.actions.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = false;
padding = 20;
display = "table-cell";
layers = 1;
paddingLeft = 30;
borderRadius;
deleteButton = new deleteButton90();
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/item/user.userList.item.js?disableCache=0798
var userListItem30 = class extends extender59(user31, gridViewRow30) {
static {
__name(this, "userListItem");
}
__className = "userListItem";
__sourcePath = "user/userList/item/user.userList.item.js";
__nodeMethods = "";
__stateMethods = "loadPage";
username = new userListItemTitle30();
actions = new userListItemActions30();
cursor = "pointer";
background;
fontSize = 14;
mouseHoverColor = "#363333";
async click() {
this.stateMachine.composeState("User", this.id);
await this.loadPage(this.id);
}
async loadPage(id2) {
var rightSide31 = this.parents("rightSide");
rightSide31.hideChildren();
var editUser31 = rightSide31.editUser;
editUser31.id = this.id;
editUser31.show();
await editUser31.sync();
}
mouseover() {
this.background = this.mouseHoverColor;
}
mouseleave() {
this.background = "none";
}
enableDELETE() {
this.actions.show();
}
disableDELETE() {
this.actions.hide();
}
permission() {
this.allow(user_group_permission_default30.admin, "DELETE");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/user.userList.table.js?disableCache=0798
var userListTable30 = class extends gridView30 {
static {
__name(this, "userListTable");
}
__className = "userListTable";
__sourcePath = "user/userList/user.userList.table.js";
__nodeMethods = "";
__stateMethods = "";
header = new userListTableHeader30();
body = new userListTableBody30(userListItem30, new collection34(user31));
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/search.js?disableCache=0798
var searchBar90 = class extends input30 {
static {
__name(this, "searchBar");
}
__className = "searchBar";
__sourcePath = "user/userList/search.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Search.";
placeholderColor = "#8e8e8e";
webkitTextFillColor = "none";
async keyup(event2) {
this.value = this.customElement.value;
var value2 = this.value;
console.log("search input", value2);
var newsItems = this.parent.userTable.body;
newsItems.value = value2;
newsItems.sync();
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/userList/user.userList.page.js?disableCache=0798
var editPage30 = class extends page30 {
static {
__name(this, "editPage");
}
__className = "editPage";
__sourcePath = "user/userList/user.userList.page.js";
__nodeMethods = "";
__stateMethods = "";
header = new header30("Users");
search = new searchBar90();
userTable = new userListTable30();
flexDirection = "column";
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.username.js?disableCache=0798
var editUsername30 = class extends extender59(username31, input30) {
static {
__name(this, "editUsername");
}
__className = "editUsername";
__sourcePath = "user/edit/edit.username.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.username.row.js?disableCache=0798
var usernameRow30 = class {
static {
__name(this, "usernameRow");
}
__className = "usernameRow";
__sourcePath = "user/edit/edit.username.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label59("Username");
username = new editUsername30();
};
// framework/cache/platforms/Macos/Pc/Dark/elements/empty.js?disableCache=0798
var empty30 = class {
static {
__name(this, "empty");
}
__className = "empty";
__sourcePath = "elements/empty.js";
__nodeMethods = "";
__stateMethods = "";
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/user.edit.button.js?disableCache=0798
var userEditButton30 = class extends button30 {
static {
__name(this, "userEditButton");
}
__className = "userEditButton";
__sourcePath = "user/edit/user.edit.button.js";
__nodeMethods = "";
__stateMethods = "";
label = "Save";
async click(event2, object93) {
await this.parent.parent.save();
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/user.edit.button.row.js?disableCache=0798
var saveButtonRow30 = class {
static {
__name(this, "saveButtonRow");
}
__className = "saveButtonRow";
__sourcePath = "user/edit/user.edit.button.row.js";
__nodeMethods = "";
__stateMethods = "";
empty = new empty30();
userEditButton = new userEditButton30();
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.checkbox.renderCollection.js?disableCache=0798
var checkRenderCollection30 = class extends renderCollection32 {
static {
__name(this, "checkRenderCollection");
}
__className = "checkRenderCollection";
__sourcePath = "user/edit/edit.user.checkbox.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
debug = true;
display = "table";
permission() {
this.allow(user_group_permission_default30.admin, "WRITE");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
this.allow(user_group_permission_default30.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.checkbox.js?disableCache=0798
var customCheckbox59 = class extends checkbox30 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.js";
__nodeMethods = "checkSelected,changeCollection";
__stateMethods = "";
async create() {
var selected = await this.checkSelected();
this.customElement.checked = selected;
}
async checkSelected() {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var id2 = this.id;
return collection35.rowExists(id2);
}
async change() {
this.value = this.customElement.checked;
await this.changeCollection(this.value);
var editUser31 = this.parent.parent.parent.parent;
editUser31.showSelectedUser.sync();
}
async changeCollection(checked) {
var editUser31 = this.parents("editUser");
var collection35 = editUser31.selectedUsers;
var userObject = this.parent;
if (checked) {
collection35.add(userObject);
} else {
collection35.remove(userObject);
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.checkbox.tableRow.js?disableCache=0798
var customCheckbox60 = class extends user31 {
static {
__name(this, "customCheckbox");
}
__className = "customCheckbox";
__sourcePath = "user/edit/edit.user.checkbox.tableRow.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
console.log("customCheckbox", this);
this.label.text = this.username.value;
this.checkbox.id = this.id;
}
label = new label59();
checkbox = new customCheckbox59();
value = false;
layers = 1;
parseTable = false;
display = "table-row";
layers = 1;
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.checkbox.row.js?disableCache=0798
var checkboxRow30 = class {
static {
__name(this, "checkboxRow");
}
__className = "checkboxRow";
__sourcePath = "user/edit/edit.user.checkbox.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label59("Select users");
renderCollection = new checkRenderCollection30(customCheckbox60, new collection34(user31));
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.select.option.js?disableCache=0798
var customOption30 = class extends extender59(option30, user31) {
static {
__name(this, "customOption");
}
__className = "customOption";
__sourcePath = "user/edit/edit.user.select.option.js";
__nodeMethods = "";
__stateMethods = "";
setup() {
this.customElement.innerHTML = this.username.value;
this.customElement.value = this.id;
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.select.renderCollection.js?disableCache=0798
var customSelect60 = class extends renderCollection32 {
static {
__name(this, "customSelect");
}
__className = "customSelect";
__sourcePath = "user/edit/edit.user.select.renderCollection.js";
__nodeMethods = "";
__stateMethods = "";
customElement = document_default59.createElement("select");
useCustomElement = true;
debug = true;
width = "70%";
background = "rgb(255 255 255 / 3%)";
color = "white";
opaqueBackgroundColor = "rgb(255 255 255 / 3%)";
focusBackgroundColor = "rgb(255 255 255 / 3%)";
focusBorderBottom = "";
blurBackgroundColor = "#fbfbfb";
blurBorderBottom = "";
padding = 6;
margin = 6;
marginRight = 20;
height = "fit-content";
borderRadius = 0;
fontWeight = "bold";
fontSize = 10;
border = "1px solid rgb(255 255 255 / 18%)";
padding = 12;
fontSize = "";
borderRadius = 6;
borderBottom = "none";
width = "auto";
permission() {
this.allow(user_group_permission_default30.admin, "WRITE");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
this.allow(user_group_permission_default30.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.select.row.js?disableCache=0798
var optionRow30 = class {
static {
__name(this, "optionRow");
}
__className = "optionRow";
__sourcePath = "user/edit/edit.user.select.row.js";
__nodeMethods = "";
__stateMethods = "";
label = new label59("Select user");
renderCollection = new customSelect60(customOption30, new collection34(user31));
};
// framework/cache/platforms/Macos/Pc/Dark/user/edit/edit.user.js?disableCache=0798
var editUser30 = class extends extender59(user31, page30) {
static {
__name(this, "editUser");
}
__className = "editUser";
__sourcePath = "user/edit/edit.user.js";
__nodeMethods = "";
__stateMethods = "";
padding = 20;
debug = true;
flexDirection = "column";
header = new header30("Edit user");
usernameRow = new usernameRow30();
selectRow = new optionRow30();
checkboxRow = new checkboxRow30();
showSelectedUser = new customSelect60(customOption30, this.selectedUsers);
saveButtonRow = new saveButtonRow30();
create() {
this.selectRow.renderCollection.sync();
this.checkboxRow.renderCollection.sync();
this.showSelectedUser.sync();
}
permission() {
this.allow(user_group_permission_default30.admin, "WRITE");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
this.allow(user_group_permission_default30.visitor, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/signup/signup.username.js?disableCache=0798
var signUpUsername30 = class extends extender59(username31, input30) {
static {
__name(this, "signUpUsername");
}
__className = "signUpUsername";
__sourcePath = "user/signup/signup.username.js";
__nodeMethods = "";
__stateMethods = "";
propegateEvent = false;
};
// framework/cache/platforms/Macos/Pc/Dark/elements/inputPassword.js?disableCache=0798
var inputPassword30 = class extends input30 {
static {
__name(this, "inputPassword");
}
__className = "inputPassword";
__sourcePath = "elements/inputPassword.js";
__nodeMethods = "";
__stateMethods = "";
inputType = "password";
outline = "none";
constructor() {
super();
this.type = "password";
}
create() {
this.customElement.setAttribute("type", this.inputType);
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/signup/signup.password.js?disableCache=0798
var signupPassword30 = class extends inputPassword30 {
static {
__name(this, "signupPassword");
}
__className = "signupPassword";
__sourcePath = "user/signup/signup.password.js";
__nodeMethods = "";
__stateMethods = "";
minLength = 7;
useCustomElement = true;
};
// framework/cache/platforms/Macos/Pc/Dark/user/signup/signup.passwordCheck.js?disableCache=0798
var signupPasswordCheck30 = class extends inputPassword30 {
static {
__name(this, "signupPasswordCheck");
}
__className = "signupPasswordCheck";
__sourcePath = "user/signup/signup.passwordCheck.js";
__nodeMethods = "";
__stateMethods = "";
useCustomElement = true;
async keyup(event2) {
this.value = event2.target.value;
if (this.value == this.parent.password.value) {
this.border = "#28a745";
this.color = "#495057";
this.shadow = "0px 0px 4px 2px #28a745";
} else {
this.border = "1px solid #dc3545";
this.color = "black";
this.shadow = "0px 0px 4px 2px #dc3545";
}
}
};
// framework/unify/cookieManager.js?disableCache=0798
var cookieManager31 = class {
static {
__name(this, "cookieManager");
}
createCookieUser(value2) {
var userObject = new Object();
userObject.username = new Object();
userObject.username.value = value2.username.value;
userObject.sessionKey = new Object();
userObject.sessionKey.value = value2.sessionKey.value;
userObject.signedIn = true;
return userObject;
}
createEmptyCookie(name) {
this.setCookie(name, null);
}
set(name, value2) {
if (!value2) {
this.createEmptyCookie(name);
} else {
var userObject = this.createCookieUser(value2);
this.setCookie(name, JSON.stringify(userObject));
}
}
get(name) {
var item = this.getCookie(name);
if (item == "undefined") {
return false;
}
return JSON.parse(item);
}
setCookie(name, value2) {
var expirydate = /* @__PURE__ */ new Date();
expirydate.setTime(expirydate.getTime() + 100 * 60 * 60 * 24 * 100);
document.cookie = name + "=" + value2 + ";expires=" + expirydate.toGMTString();
}
getCookieStartIndex(docCookie2, cookieName) {
return docCookie2.indexOf(cookieName);
}
getCookieEndIndex(docCookie2, cookieName, cookieStart) {
if (cookieStart != -1) {
cookieStart = cookieStart + cookieName.length;
end = docCookie2.indexOf(";", cookieStart);
if (end == -1) {
end = docCookie2.length;
}
}
return end;
}
getCookieString(cookieStartIndex, cookieEndIndex) {
return docCookie.substring(cookieStartIndex, cookieEndIndex);
}
getCookie(name) {
var cookieName = name + "=";
var docCookie2 = document.cookie;
if (docCookie2.length > 0) {
var cookieStartIndex = this.getCookieStartIndex(docCookie2, cookieName);
var cookieEndIndex = this.getCookieEndIndex(docCookie2, cookieName, cookieStartIndex);
var cookieString = this.getCookieString(cookieStartIndex, cookieEndIndex);
return unescape(cookieString);
}
return false;
}
};
var cookieManager_default31 = new cookieManager31();
// framework/cache/platforms/Macos/Pc/Dark/user/signup/signup.button.js?disableCache=0798
var signupButton30 = class extends button30 {
static {
__name(this, "signupButton");
}
__className = "signupButton";
__sourcePath = "user/signup/signup.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signup";
margin = 6;
async click(event2, object93) {
var signin31 = this.parent;
var user32 = await signin31.registerUser();
if (user32) {
switch (user32.status) {
case "created_user":
alert("user created you can now sign in.");
break;
case "user_exists":
alert("user already exists.");
break;
}
}
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/signup/signup.customLabel.js?disableCache=0798
var customLabel60 = class extends label59 {
static {
__name(this, "customLabel");
}
__className = "customLabel";
__sourcePath = "user/signup/signup.customLabel.js";
__nodeMethods = "";
__stateMethods = "";
textAlign = "right";
alignItems = "end";
flexDirection = "column";
};
// framework/cache/platforms/Macos/Pc/Dark/user/signup/user.signup.js?disableCache=0798
var signup30 = class extends extender59(user31, page30) {
static {
__name(this, "signup");
}
__className = "signup";
__sourcePath = "user/signup/user.signup.js";
__nodeMethods = "registerUser";
__stateMethods = "";
layers = 1;
customElement = document_default59.createElement("form");
useCustomElement = true;
debug = true;
gridTemplate = ` "header header " 100px
"userLabel username " 60px
"passwordLabel password " 60px
"passwordAgainLabel passwordAgain " 60px
"empty signUpButton " 60px
`;
paddingRight = 30;
height = "300px";
header = new header30("Signup");
// Children
userLabel = new customLabel60("Username");
username = new signUpUsername30();
passwordLabel = new customLabel60("Password");
password = new signupPassword30();
passwordAgainLabel = new customLabel60("Password again");
passwordAgain = new signupPasswordCheck30();
signUpButton = new signupButton30();
flexDirection = "column";
display = "grid";
pbkdf2Async(password31, salt32, iterations, keylen, digest) {
return new Promise((res, rej) => {
crypto.pbkdf2(password31, salt32, iterations, keylen, digest, (err, key) => {
err ? rej(err) : res(key);
});
});
}
async registerUser() {
var table33 = this.table;
var username32 = this.username.value;
var password31 = this.password.value;
var passwordAgain = this.passwordAgain.value;
var users = this.find("username", username32);
var saltRounds = 10;
var salt32 = crypto.randomBytes(32).toString("base64");
var iterations = 100;
if (!password31) {
return false;
}
var hash32 = await crypto.pbkdf2Sync(password31, salt32, iterations, 64, "SHA256");
console.log("hash", hash32.toString("hex"));
console.log("salt", salt32);
if (users.length > 0) {
table33.status = "user_exists";
return table33;
}
table33.username.value = username32;
table33.hash.value = await hash32.toString("hex");
table33.salt.value = salt32;
table33.signed.value = true;
table33.groups.value = 1;
table33.createInstance();
table33.save();
table33.status = "created_user";
return table33;
}
permission() {
this.allow(user_group_permission_default30.visitor, "PROCESS");
this.allow(user_group_permission_default30.member, "PROCESS");
this.allow(user_group_permission_default30.admin, "PROCESS");
}
};
// framework/cache/platforms/Macos/Pc/Dark/user/signin/signin.username.js?disableCache=0798
var signinUsername30 = class extends extender59(username31, input30) {
static {
__name(this, "signinUsername");
}
__className = "signinUsername";
__sourcePath = "user/signin/signin.username.js";
__nodeMethods = "";
__stateMethods = "";
placeholder = "Username";
marginLeft = 20;
marginTop = 50;
//keyup() {
//this.parent.signinButton.click();
//}
};
// framework/cache/platforms/Macos/Pc/Dark/user/user.password.js?disableCache=0798
var password30 = class extends inputPassword30 {
static {
__name(this, "password");
}
__className = "password";
__sourcePath = "user/user.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "private";
};
// framework/cache/platforms/Macos/Pc/Dark/user/signin/signin.password.js?disableCache=0798
var signinPassword30 = class extends password30 {
static {
__name(this, "signinPassword");
}
__className = "signinPassword";
__sourcePath = "user/signin/signin.password.js";
__nodeMethods = "";
__stateMethods = "";
scope = "public";
placeholder = "Password";
minLength = 2;
marginLeft = 20;
//keyup() {
// this.parents("signin").signinButton.click();
// console.log(this.parents("signin"));
//}
};
// framework/cache/platforms/Macos/Pc/Dark/user/signin/signin.button.js?disableCache=0798
var signinFormButton30 = class extends button30 {
static {
__name(this, "signinFormButton");
}
__className = "signinFormButton";
__sourcePath = "user/signin/signin.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Signin";
float = "right";
marginLeft = 20;
async click() {
console.log(this.parents(".application").minimizeButton);
var user32 = await this.parents("signin").process();
if (user32) {
if (user32.error) {
user32.error = false;
return false;
}
if (user32.status == "success") {
this.parents(".application").minimizeButton.open();
var core3 = this.getCore();
core3.updatePermissions(user32.permissionObjects);
core3.setUser(user32);
setTimeout(function() {
});
}
}
}
};
// framework/unify/unify.js?disableCache=0798
var unify31 = class {
static {
__name(this, "unify");
}
//defaultObjectInstance = new defaultObject();
extend(object93, force = false) {
var defaultObjectInstance = new defaultObject_default();
if (defaultObjectInstance.exposeMethodsToObject(object93, force)) {
return true;
} else {
return false;
}
}
};
var unify_default31 = new unify31();
// framework/cache/platforms/Macos/Pc/Dark/user/signin/signin.cancel.button.js?disableCache=0798
var cancelButton60 = class extends button30 {
static {
__name(this, "cancelButton");
}
__className = "cancelButton";
__sourcePath = "user/signin/signin.cancel.button.js";
__nodeMethods = "";
__stateMethods = "";
text = "Cancel";
float = "left";
display = "none";
};
// framework/cache/platforms/Macos/Pc/Dark/user/signin/user.signin.js?disableCache=0798
var tussenObject30 = class {
static {
__name(this, "tussenObject");
}
__className = "tussenObject";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
password = new signinPassword30();
width = "100%";
};
var buttons60 = class {
static {
__name(this, "buttons");
}
__className = "buttons";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
cancelButton = new cancelButton60();
signinButton = new signinFormButton30();
};
var hint30 = class {
static {
__name(this, "hint");
}
__className = "hint";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
text = "Hint: You can sign in with username: admin, password: admin.";
color = "white";
marginLeft = 22;
fontWeight = "bold";
marginTop = 20;
padding = 20;
background = "#221f1f4f";
borderRadius = 4;
};
var signin30 = class extends extender59(user31, page30) {
static {
__name(this, "signin");
}
__className = "signin";
__sourcePath = "user/signin/user.signin.js";
__nodeMethods = "";
__stateMethods = "";
_hint = new hint30();
padding = 10;
paddingTop = 20;
color = "black";
//paddingTop = "0";
flexDirection = "column";
height = "400px";
layers = 1;
debug = true;
customElement = document_default59.createElement("form");
useCustomElement = true;
display = "flex";
autocomplete = false;
_header = new header30("Signin");
//userLabel = new label("Username");
username = new signinUsername30();
//passwordLabel = new label("Password");
tussenObject = new tussenObject30();
buttons = new buttons60();
boxMargin;
enableREAD() {
this.hide();
}
createVisitor(client2) {
var table33 = new user31();
table33.username.value = "Visitor";
table33.id = 0;
table33.permissionObjects = userManager_default31.getPermissions(table33, client2);
return table33;
}
async signin(object93, client2, force = false) {
var visitor62 = this.createVisitor(client2);
var table33 = new user31();
client2.user = visitor62;
client2.user.error = false;
unify_default31.extend(table33);
console.log("tussenobject", object93.tussenObject.password.value);
if (object93.username && object93.username.value != "Visitor") {
var username32 = object93.username.value;
var users = table33.find("username", username32);
console.log("try to sign in users", users);
if (users.length > 0) {
var fetchedUser = users[0];
var hash32 = fetchedUser.hash;
var password31 = object93.tussenObject.password.value;
console.log("password", password31);
console.log("try to sign in hash", hash32);
if (!password31) {
client2.user.error = "password required";
}
if (!hash32) {
client2.user.error = "user does not have an hash";
}
console.log("password", password31);
console.log("salt", fetchedUser.salt);
var encryptHash = await crypto.pbkdf2Sync(password31, fetchedUser.salt, 100, 64, "SHA256").toString("hex");
console.log("generated hash", encryptHash);
const isValidPassword = encryptHash === hash32;
if (isValidPassword) {
table33.id = fetchedUser.id;
console.log("fetchedUser", fetchedUser);
table33.get();
table33.groups.value = fetchedUser.groups;
table33.permissionObjects = userManager_default31.getPermissions(table33, client2);
table33.username.value = username32;
table33.error = false;
client2.user = table33;
client2.user.status = "success";
} else {
client2.user.status = "failed";
client2.user.error = "password";
}
} else {
client2.user.status = "failed";
client2.user.error = "username";
}
} else {
client2.user.error = "password";
}
global.core.setUserObjects(client2.user, client2);
global.core.parse(client2.user, client2);
return client2.user;
}
process(object93, client2) {
var user32 = this.signin(object93, client2);
return user32;
}
permission() {
this.allow(user_group_permission_default30.visitor, "PROCESS");
this.allow(user_group_permission_default30.member, "PROCESS");
this.allow(user_group_permission_default30.admin, "PROCESS");
this.allow(user_group_permission_default30.member, "READ");
this.allow(user_group_permission_default30.admin, "READ");
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/rightSide/rightSide.js?disableCache=0705
var rightSide30 = class {
static {
__name(this, "rightSide");
}
__className = "rightSide";
__sourcePath = "demo/rightSide/rightSide.js";
__nodeMethods = "";
__stateMethods = "";
newsPages = new newsPages30();
signup = new signup30();
signin = new signin30();
settings = new settings30();
fileManager = new fileManager30();
animations = new animations30();
gridExample = new gridExample30();
userListPage = new editPage30();
editUser = new editUser30();
borderRadius;
flexDirection = "column";
transition = "2s, border-radius none";
borderTopRightRadius = 8;
borderBottomRightRadius = 8;
overflow = "hidden!important";
overflowY = "auto";
borderTopRightRadius = 12;
borderBottomRightRadius = 12;
width = 600;
boxShadow = "-1px 0px 1px 0px #00000008";
background = "#2a2525e6";
background = "#282828";
create() {
this.hideChildren();
this.newsPages.show();
}
};
// framework/unify/document.js?disableCache=0705
var documentTool60 = class {
static {
__name(this, "documentTool");
}
createElementDummy(object93) {
object93.createElement = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createElementNSDummy(object93) {
object93.createElementNS = function(tag) {
var object94 = new Object();
object94.tag = tag;
return false;
};
}
createDummyDomMethods(object93) {
this.createElementDummy(object93);
this.createElementNSDummy(object93);
}
bindCustomStyleTerms(object93) {
object93.customStyleTerms = ["background", "width", "height", "flexDirection", "color", "border", "margin", "padding", "boxBackground"];
}
addBoxProperties(object93) {
for (var c31 = 0; c31 < object93.customStyleTerms.length; c31++) {
object93.customStyleTerms[object93.customStyleTerms[c31]] = "";
object93.customStyleTerms["box" + this.CamelCase(object93.customStyleTerms[c31])] = "";
}
}
createCustomStyleTerms(object93) {
this.bindCustomStyleTerms(object93);
this.addBoxProperties(object93);
}
getDocument() {
if (typeof document == "undefined") {
var object93 = new Object();
this.createDummyDomMethods(object93);
this.createCustomStyleTerms(object93);
this.type = "server";
return object93;
} else {
document.type = "client";
return document;
}
}
CamelCase(string) {
if (string) {
string = string.toUpperCase();
string = string[0].toUpperCase() + string.slice(1, string.lenth).toLowerCase();
return string;
}
}
};
var object92 = new documentTool60();
var document_default60 = object92.getDocument();
// framework/unify/math/vector2.js?disableCache=0705
var vector289 = class {
static {
__name(this, "vector2");
}
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
// framework/cache/platforms/Macos/Pc/Dark/elements/flexbox.js?disableCache=0705
var flexbox60 = class {
static {
__name(this, "flexbox");
}
__className = "flexbox";
__sourcePath = "elements/flexbox.js";
__nodeMethods = "";
__stateMethods = "";
renderToDOM = true;
color = "white";
};
// framework/cache/platforms/Macos/Pc/Dark/elements/window/frostedGlass.js?disableCache=0705
var frostedGlass60 = class {
static {
__name(this, "frostedGlass");
}
__className = "frostedGlass";
__sourcePath = "elements/window/frostedGlass.js";
__nodeMethods = "";
__stateMethods = "";
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0, 0];
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.jpg')";
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px";
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
};
// framework/cache/platforms/Macos/Pc/Dark/elements/window/draggable.js?disableCache=0705
var vector290 = class {
static {
__name(this, "vector2");
}
__className = "vector2";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
constructor(x, y) {
this.x = x;
this.y = y;
}
x = 0;
y = 0;
};
function delay90(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
__name(delay90, "delay");
var draggable60 = class {
static {
__name(this, "draggable");
}
__className = "draggable";
__sourcePath = "elements/window/draggable.js";
__nodeMethods = "";
__stateMethods = "";
backfaceVisibility = false;
position = "absolute";
zIndex;
propegateEvent = false;
transition = "none";
transform;
width;
height;
x;
y;
transition = "width 1s, height 1s";
// Custom Properties
draggable = true;
grab = false;
lastPosition;
currentPosition = new vector290(0, 0);
grabPosition = new vector290(0, 0);
state = "normal";
click() {
this.grab = false;
}
mouseout() {
}
async render(delta) {
if (this.draggable) {
if (!this.lastPosition) {
return false;
}
var x = this.lastPosition.x;
var y = this.lastPosition.y;
if (this.grab) {
var x = this.mouse.x - this.grabPosition.x + this.lastPosition.x;
var y = this.mouse.y - this.grabPosition.y + this.lastPosition.y;
}
this.transform = "translate3d(" + x + "px, " + y + "px, 0)";
this.currentPosition = new vector290(x, y);
if (this.updateBackgroundCoordinates) {
this.updateBackgroundCoordinates();
}
}
}
maximize() {
this.restorePosition = this.transform;
this.width = "100vw";
this.height = "100vh";
this.draggable = false;
this.transition = "transform 0.1s, width 0.1s, height 0.1s";
this.transform = "translate3d(0px, 0px)";
this.state = "maximized";
}
async restore() {
this.width = "";
this.height = "";
this.draggable = true;
await delay90(1e3);
this.transition = "";
}
center() {
this.element.style.zIndex = document.globalZIndex++;
var domWindow = document.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.element.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector290(Math.round(x), Math.round(y));
}
mouseup() {
this.grab = false;
this.border = "none";
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x;
var y = boundBox.y;
this.lastPosition = this.currentPosition;
}
async mousedown(event2) {
if (event2.button != 0) {
return false;
}
if (!this.lastPosition) {
this.lastPosition = this.currentPosition;
}
this.element.style.zIndex = document.globalZIndex++;
this.grab = true;
this.grabPosition = this.mouse;
}
};
// framework/cache/platforms/Macos/Pc/Dark/demo/application.js
var application31 = class extends extender58(frostedGlass60, flexbox60, draggable60) {
static {
__name(this, "application");
}
__className = "application";
__sourcePath = "demo/application.js";
__nodeMethods = "";
__stateMethods = "";
// Children
minimizeButton = new minimizeButton30();
leftSide = new leftSide30();
rightSide = new rightSide30();
// Environment
mode = "production";
os = "Windows";
device = "Pc";
tint = "Dark";
loadThemes = true;
maxClusters = 1;
//serverAddress = "192.168.178.15";
// Styling
position = "absolute";
borderRadius = 12;
boxBackgroundSize = "1000px 1000px";
boxTransition = "background-image 0.1s ease-in-out";
boxHeight = "100vh";
position = "absolute";
flexDirection = "row";
// Pragma's
fontFamily = "Inter";
//boxBackgroundImage = "url('/assets/images/wallpapers/ventura/dark/dark.jpg')";
//backgroundImage = "url('/assets/images/wallpapers/ventura/dark/darkBlur.jpg')";
border = "1px solid #8f8f8f59";
outline = "1px solid black";
// Methods
afterLoad() {
this.centerObject();
}
centerObject() {
var domWindow = document_default60.defaultView;
this.windowHeight = domWindow.innerHeight;
this.windowWidth = domWindow.innerWidth;
var boundBox = this.defaultElement.getBoundingClientRect();
var width = boundBox.width;
var height = boundBox.height;
var x = this.windowWidth / 2 - width / 2;
var y = this.windowHeight / 2 - height / 2;
this.lastPosition = new vector289(Math.round(x), Math.round(y));
}
click() {
this.boxShadow = "1px 1px 3px 0px #00000054";
}
};
// framework/client/imports/themeImports.js
var imports = new Array();
imports["framework/cache/platforms/Windows/Mobile/Light/demo/application.js"] = application2;
imports["framework/cache/platforms/Windows/Mobile/Dark/demo/application.js"] = application3;
imports["framework/cache/platforms/Windows/Tablet/Light/demo/application.js"] = application4;
imports["framework/cache/platforms/Windows/Tablet/Dark/demo/application.js"] = application5;
imports["framework/cache/platforms/Windows/Pc/Light/demo/application.js"] = application6;
imports["framework/cache/platforms/Windows/Pc/Dark/demo/application.js"] = application7;
imports["framework/cache/platforms/Android/Mobile/Light/demo/application.js"] = application8;
imports["framework/cache/platforms/Android/Mobile/Dark/demo/application.js"] = application9;
imports["framework/cache/platforms/Android/Tablet/Light/demo/application.js"] = application10;
imports["framework/cache/platforms/Android/Tablet/Dark/demo/application.js"] = application11;
imports["framework/cache/platforms/Android/Pc/Light/demo/application.js"] = application12;
imports["framework/cache/platforms/Android/Pc/Dark/demo/application.js"] = application13;
imports["framework/cache/platforms/Linux/Mobile/Light/demo/application.js"] = application14;
imports["framework/cache/platforms/Linux/Mobile/Dark/demo/application.js"] = application15;
imports["framework/cache/platforms/Linux/Tablet/Light/demo/application.js"] = application16;
imports["framework/cache/platforms/Linux/Tablet/Dark/demo/application.js"] = application17;
imports["framework/cache/platforms/Linux/Pc/Light/demo/application.js"] = application18;
imports["framework/cache/platforms/Linux/Pc/Dark/demo/application.js"] = application19;
imports["framework/cache/platforms/Ios/Mobile/Light/demo/application.js"] = application20;
imports["framework/cache/platforms/Ios/Mobile/Dark/demo/application.js"] = application21;
imports["framework/cache/platforms/Ios/Tablet/Light/demo/application.js"] = application22;
imports["framework/cache/platforms/Ios/Tablet/Dark/demo/application.js"] = application23;
imports["framework/cache/platforms/Ios/Pc/Light/demo/application.js"] = application24;
imports["framework/cache/platforms/Ios/Pc/Dark/demo/application.js"] = application25;
imports["framework/cache/platforms/Macos/Mobile/Light/demo/application.js"] = application26;
imports["framework/cache/platforms/Macos/Mobile/Dark/demo/application.js"] = application27;
imports["framework/cache/platforms/Macos/Tablet/Light/demo/application.js"] = application28;
imports["framework/cache/platforms/Macos/Tablet/Dark/demo/application.js"] = application29;
imports["framework/cache/platforms/Macos/Pc/Light/demo/application.js"] = application30;
imports["framework/cache/platforms/Macos/Pc/Dark/demo/application.js"] = application31;
var themeImports_default = imports;
// framework/client/themeLoader.js
var themeLoader = class {
static {
__name(this, "themeLoader");
}
defaultObject = new defaultObject_default();
prepareThemeCore(themeCore, socketManager2, os31, device, tint31) {
themeCore.addDOMToSelector = false;
themeCore.parseEvents = false;
themeCore.executeMethods = false;
themeCore.initializeRenderLoop = false;
themeCore.socketManager = socketManager2;
themeCore.os = os31;
themeCore.device = device;
themeCore.tint = tint31;
if (os31 == this.os && device == this.device && tint31 == this.tint) {
themeCore.createStyleSheet = false;
}
}
async loadCustomThemes(os31, device, tint31) {
var customThemes = new Array();
var applications = this.applicationManager.applications;
for (var applicationID = 0; applicationID < applications.length; applicationID++) {
var applicationFile = applications[applicationID];
customThemes[applicationID] = await this.loadCustomTheme(applicationFile.path, applicationID, os31, device, tint31);
}
return customThemes;
}
async createObject(applicationPath) {
if (document.mode == "production") {
var importObject = themeImports_default[applicationPath];
return new importObject();
} else {
var importObject = await import("/" + applicationPath);
return new importObject.default();
}
}
createApplicationPath(path2, os31, device, tint31) {
device = tools_default.CamelCase(device);
os31 = tools_default.CamelCase(os31);
tint31 = tools_default.CamelCase(tint31);
var applicationPath = "framework/cache/platforms/" + os31 + "/" + device + "/" + tint31 + "/" + path2 + "/application.js";
return applicationPath;
}
async loadCustomTheme(path2, applicationID, os31, device, tint31) {
var applicationPath = this.createApplicationPath(path2, os31, device, tint31);
return await this.createObject(applicationPath);
}
setThemeObjects(themeCore, os31, device, tint31) {
var applicationManager2 = this.applicationManager;
if (!applicationManager2.themeObjects) {
applicationManager2.themeObjects = new Array();
}
if (!applicationManager2.themeObjects[os31]) {
applicationManager2.themeObjects[os31] = new Array();
}
if (!applicationManager2.themeObjects[os31][device]) {
applicationManager2.themeObjects[os31][device] = new Array();
}
applicationManager2.themeObjects[os31][device][tint31] = themeCore.classObjects;
}
async setupApplication(unifyCore, themeCore, application32) {
this.defaultObject.agregateDefaultObject(application32);
this.applicationManager.getDomElement(application32);
themeCore.setTheme();
application32.core = themeCore;
await unifyCore.prepareObjects(application32);
themeCore.parse(application32, true);
themeCore.callAfterLoad(application32);
}
async parseTheme(unifyCore, os31, device, tint31) {
var themeApplications = await this.loadCustomThemes(os31, device, tint31);
var themeCore = new core2();
var application32 = themeApplications[0];
this.prepareThemeCore(themeCore, unifyCore.socketManager, os31, device, tint31);
await this.setupApplication(unifyCore, themeCore, application32);
console.log("setThemeObjects", themeCore, os31, device, tint31);
this.setThemeObjects(themeCore, os31, device, tint31);
}
async loadThemes(application32, applicationID, core3) {
if (application32.loadThemes && applicationID == 0) {
var osList = new Array("Windows", "Macos", "Android");
var deviceList = new Array("Pc");
var tintList = new Array("Light", "Dark");
for (var i = 0; i < osList.length; i++) {
var os31 = osList[i];
for (var j = 0; j < deviceList.length; j++) {
var device = deviceList[j];
for (var k = 0; k < tintList.length; k++) {
var tint31 = tintList[k];
await this.parseTheme(core3, os31, device, tint31);
}
}
}
}
}
};
// framework/configs/config.js
var a31 = { "mode": "production", "serverAddress": "localhost", "ssl": false, "socketPort": 5e3, "port": 3e3, "maxClusters": 1, "os": "Windows", "device": "Pc", "tint": "Dark", "syncClientID": 0, "loadThemes": true };
var config_default = a31;
// framework/client/import.js
var import_default = [application7];
// framework/configs/applications.js
var applications_default = [{ "files": [{ "files": [{ "files": [], "type": "file", "name": "animation.color.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.color.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animation.move.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.move.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animation.render.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.render.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animation.reverse.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.reverse.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animation.rotate.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.rotate.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animation.rotateMoveColor.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.rotateMoveColor.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animation.skewX.js", "path": "demo/animations", "filePath": "application/demo/animations/animation.skewX.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "animations.js", "path": "demo/animations", "filePath": "application/demo/animations/animations.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "animations", "path": "demo", "filePath": "application/demo/animations", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "application.js", "path": "demo", "filePath": "application/demo/application.js", "depth": 2, "dateModified": "Fri Jul 21 2023 11:19:13 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "comment.body.js", "path": "demo/comment", "filePath": "application/demo/comment/comment.body.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.js", "path": "demo/comment", "filePath": "application/demo/comment/comment.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.title.js", "path": "demo/comment", "filePath": "application/demo/comment/comment.title.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comments.messages.js", "path": "demo/comment", "filePath": "application/demo/comment/comments.messages.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "comment.create.author.js", "path": "demo/comment/create", "filePath": "application/demo/comment/create/comment.create.author.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.create.body.js", "path": "demo/comment/create", "filePath": "application/demo/comment/create/comment.create.body.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.create.js", "path": "demo/comment/create", "filePath": "application/demo/comment/create/comment.create.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.create.title.js", "path": "demo/comment/create", "filePath": "application/demo/comment/create/comment.create.title.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.saveButton.js", "path": "demo/comment/create", "filePath": "application/demo/comment/create/comment.saveButton.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.userLabel.js", "path": "demo/comment/create", "filePath": "application/demo/comment/create/comment.userLabel.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "create", "path": "demo/comment", "filePath": "application/demo/comment/create", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "comment.deleteButton.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.deleteButton.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.edit.author.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.edit.author.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.edit.body.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.edit.body.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.edit.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.edit.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.edit.title.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.edit.title.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.editButton.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.editButton.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.information.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.information.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.saveButton.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.saveButton.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "comment.userLabel.js", "path": "demo/comment/edit", "filePath": "application/demo/comment/edit/comment.userLabel.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "edit", "path": "demo/comment", "filePath": "application/demo/comment/edit", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "comment", "path": "demo", "filePath": "application/demo/comment", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "news.edit.body.js", "path": "demo/edit", "filePath": "application/demo/edit/news.edit.body.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.edit.button.js", "path": "demo/edit", "filePath": "application/demo/edit/news.edit.button.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.edit.js", "path": "demo/edit", "filePath": "application/demo/edit/news.edit.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.edit.price.js", "path": "demo/edit", "filePath": "application/demo/edit/news.edit.price.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.edit.title.js", "path": "demo/edit", "filePath": "application/demo/edit/news.edit.title.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "edit", "path": "demo", "filePath": "application/demo/edit", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "grids.js", "path": "demo/examples", "filePath": "application/demo/examples/grids.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "examples", "path": "demo", "filePath": "application/demo/examples", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "fileManager.icon.deleteButton.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.icon.deleteButton.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "fileManager.icon.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.icon.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "fileManager.imagePreviewWindow.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.imagePreviewWindow.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "fileManager.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "fileManager.list.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.list.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "fileManager.removeIcons.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.removeIcons.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "fileManager.upload.js", "path": "demo/fileManager", "filePath": "application/demo/fileManager/fileManager.upload.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "previewWindow.image.js", "path": "demo/fileManager/preview", "filePath": "application/demo/fileManager/preview/previewWindow.image.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "preview", "path": "demo/fileManager", "filePath": "application/demo/fileManager/preview", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "fileManager", "path": "demo", "filePath": "application/demo/fileManager", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "leftSide.button.animations.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.animations.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.fileManager.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.fileManager.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.grid.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.grid.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.news.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.news.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.settings.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.settings.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.signin.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.signin.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.signout.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.signout.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.signup.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.signup.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.button.users.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.button.users.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.header.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.header.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "leftSide.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/leftSide.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "testChild.js", "path": "demo/leftSide", "filePath": "application/demo/leftSide/testChild.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "leftSide", "path": "demo", "filePath": "application/demo/leftSide", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [{ "files": [], "type": "file", "name": "news.list.header.actions.js", "path": "demo/list/header", "filePath": "application/demo/list/header/news.list.header.actions.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.header.body.js", "path": "demo/list/header", "filePath": "application/demo/list/header/news.list.header.body.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.header.js", "path": "demo/list/header", "filePath": "application/demo/list/header/news.list.header.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.header.price.js", "path": "demo/list/header", "filePath": "application/demo/list/header/news.list.header.price.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.header.title.js", "path": "demo/list/header", "filePath": "application/demo/list/header/news.list.header.title.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "header", "path": "demo/list", "filePath": "application/demo/list/header", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "news.list.item.actions.deleteButton.js", "path": "demo/list/item", "filePath": "application/demo/list/item/news.list.item.actions.deleteButton.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.item.actions.js", "path": "demo/list/item", "filePath": "application/demo/list/item/news.list.item.actions.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.item.body.js", "path": "demo/list/item", "filePath": "application/demo/list/item/news.list.item.body.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.item.js", "path": "demo/list/item", "filePath": "application/demo/list/item/news.list.item.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.item.price.js", "path": "demo/list/item", "filePath": "application/demo/list/item/news.list.item.price.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.item.title.js", "path": "demo/list/item", "filePath": "application/demo/list/item/news.list.item.title.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "item", "path": "demo/list", "filePath": "application/demo/list/item", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.table.body.js", "path": "demo/list", "filePath": "application/demo/list/news.list.table.body.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.table.header.js", "path": "demo/list", "filePath": "application/demo/list/news.list.table.header.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.list.table.js", "path": "demo/list", "filePath": "application/demo/list/news.list.table.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "list", "path": "demo", "filePath": "application/demo/list", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "minimizeButton.js", "path": "demo", "filePath": "application/demo/minimizeButton.js", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.body.js", "path": "demo", "filePath": "application/demo/news.body.js", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.js", "path": "demo", "filePath": "application/demo/news.js", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.price.js", "path": "demo", "filePath": "application/demo/news.price.js", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.title.js", "path": "demo", "filePath": "application/demo/news.title.js", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "news.page.backButton.js", "path": "demo/page", "filePath": "application/demo/page/news.page.backButton.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.page.body.js", "path": "demo/page", "filePath": "application/demo/page/news.page.body.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.page.edit.button.js", "path": "demo/page", "filePath": "application/demo/page/news.page.edit.button.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.page.js", "path": "demo/page", "filePath": "application/demo/page/news.page.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.page.price.js", "path": "demo/page", "filePath": "application/demo/page/news.page.price.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.page.save.js", "path": "demo/page", "filePath": "application/demo/page/news.page.save.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "news.page.title.js", "path": "demo/page", "filePath": "application/demo/page/news.page.title.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "search.comments.js", "path": "demo/page", "filePath": "application/demo/page/search.comments.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "page", "path": "demo", "filePath": "application/demo/page", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [{ "files": [], "type": "file", "name": "panel.js", "path": "demo/pages/appearance", "filePath": "application/demo/pages/appearance/panel.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "os.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/os.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "os.label.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/os.label.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "os.selector.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/os.selector.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "os.selector.list.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/os.selector.list.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "tint.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/tint.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "tint.label.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/tint.label.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "tint.selector.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/tint.selector.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "tint.selector.list.js", "path": "demo/pages/appearance/rows", "filePath": "application/demo/pages/appearance/rows/tint.selector.list.js", "depth": 5, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "rows", "path": "demo/pages/appearance", "filePath": "application/demo/pages/appearance/rows", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "themeSelector.image.js", "path": "demo/pages/appearance", "filePath": "application/demo/pages/appearance/themeSelector.image.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "themeSelector.js", "path": "demo/pages/appearance", "filePath": "application/demo/pages/appearance/themeSelector.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "themeSelector.label.js", "path": "demo/pages/appearance", "filePath": "application/demo/pages/appearance/themeSelector.label.js", "depth": 4, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "appearance", "path": "demo/pages", "filePath": "application/demo/pages/appearance", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsDialogButton.js", "path": "demo/pages", "filePath": "application/demo/pages/newsDialogButton.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsItemPage.js", "path": "demo/pages", "filePath": "application/demo/pages/newsItemPage.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsItemPage.limit.js", "path": "demo/pages", "filePath": "application/demo/pages/newsItemPage.limit.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsItemPage.pagination.item.js", "path": "demo/pages", "filePath": "application/demo/pages/newsItemPage.pagination.item.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsItemPage.pagination.js", "path": "demo/pages", "filePath": "application/demo/pages/newsItemPage.pagination.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsItemPage.tableControl.js", "path": "demo/pages", "filePath": "application/demo/pages/newsItemPage.tableControl.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "newsPages.js", "path": "demo/pages", "filePath": "application/demo/pages/newsPages.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "search.input.js", "path": "demo/pages", "filePath": "application/demo/pages/search.input.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "search.select.js", "path": "demo/pages", "filePath": "application/demo/pages/search.select.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "search.widget.js", "path": "demo/pages", "filePath": "application/demo/pages/search.widget.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }, { "files": [], "type": "file", "name": "settings.js", "path": "demo/pages", "filePath": "application/demo/pages/settings.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "pages", "path": "demo", "filePath": "application/demo/pages", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }, { "files": [{ "files": [], "type": "file", "name": "rightSide.js", "path": "demo/rightSide", "filePath": "application/demo/rightSide/rightSide.js", "depth": 3, "dateModified": "Fri Jul 21 2023 11:18:22 GMT+0200 (Central European Summer Time)" }], "type": "directory", "name": "rightSide", "path": "demo", "filePath": "application/demo/rightSide", "depth": 2, "dateModified": "Fri Jul 21 2023 11:18:24 GMT+0200 (Central European Summer Time)" }], "type": "file", "name": "application.js", "path": "demo", "filePath": "application/demo/application.js", "depth": 1, "dateModified": "Fri Jul 21 2023 11:19:13 GMT+0200 (Central European Summer Time)" }];
// framework/client/applicationManager.js
document.promises = new Array();
document.cacheManager = new cacheManager();
document.cacheManager.useDB = false;
document.debugALL = false;
var applicationManager = class {
static {
__name(this, "applicationManager");
}
socketPort = 5002;
defaultSocketPort = 5002;
loadEditor = true;
defaultObject = new defaultObject_default();
themeLoader = new themeLoader();
mode = "development";
serverAddress = "localhost";
serverPort = 8090;
application;
applications;
applicationInstances = new Array();
ssl = false;
themeObjects = new Array();
connectPromise;
signinPromise;
constructor() {
this.themeLoader.applicationManager = this;
}
setParameters(config) {
this.mode = config.mode;
this.ssl = config.ssl;
this.socketPort = config.socketPort;
this.loadThemes = config.loadThemes;
this.os = tools_default.CamelCase(config.os);
this.tint = tools_default.CamelCase(config.tint);
this.device = tools_default.CamelCase(config.device);
if (config.serverAddress) {
this.serverAddress = config.serverAddress;
} else {
this.serverAddress = "localhost";
}
if (config.port) {
this.port = config.port;
} else {
this.port = 3e3;
}
}
setGlobal() {
document.mode = this.mode;
document.config = new Object();
document.config.os = this.os;
document.config.tint = this.tint;
document.config.device = this.device;
}
logConfig(config) {
console.log(config);
console.log("set socket port", this.socketPort);
console.log("running in ", config.mode, " mode.", "address : " + this.serverAddress);
}
parseConfig() {
this.setParameters(config_default);
this.setGlobal();
this.logConfig(config_default);
}
createApplicationPath(path2) {
var device = tools_default.CamelCase(this.device);
var os31 = tools_default.CamelCase(this.os);
var tint31 = tools_default.CamelCase(this.tint);
var applicationPath = "/framework/cache/platforms/" + os31 + "/" + device + "/" + tint31 + "/" + path2 + "/application.js";
return applicationPath;
}
async getApplicationInstance(path2, applicationID) {
if (this.mode == "development") {
var applicationPath = this.createApplicationPath(path2);
var importObject = await import(applicationPath);
this.application = new importObject.default();
} else {
var currentBundle = import_default[applicationID];
if (currentBundle) {
this.application = new currentBundle();
}
}
return this.application;
}
getUserObject(core3, application32, user32) {
if (user32 == null || !user32) {
var userObject = core3.getFirstByClassName("signin", application32);
} else {
var userObject = core3.getFirstByClassName("signin", application32);
if (!userObject) {
return false;
}
if (!user32.sessionKey) {
return false;
}
userObject.username.value = user32.username.value;
if (userObject.sessionKey) {
userObject.sessionKey.value = user32.sessionKey.value;
}
}
return userObject;
}
async singinUser(core3, socketManager2, userObject) {
var user32 = await socketManager2.get("settings", "signIn", userObject);
core3.user = user32;
await core3.setUser(user32, application);
console.log("update user permissions", user32);
core3.updatePermissions(user32.permissionObjects);
}
async checkSignIn(socketManager2, core3, application32) {
var user32 = cookieManager_default.get("user");
var userObject = this.getUserObject(core3, application32, user32);
if (!userObject) {
return false;
}
this.singinUser(core3, socketManager2, userObject);
return true;
}
configurePath() {
this.url = window.location;
this.pathName = this.url.pathname;
}
parseUrlByID(core3, tableName, id2) {
var objects = core3.getObjectsByPropertyName(tableName);
if (objects.length > 0) {
var object93 = objects[0];
if (object93.parent.create) {
object93.parent.create();
}
object93.id = parseFloat(id2);
if (object93.loadPage) {
object93.loadPage();
}
object93.showParents();
}
}
async parseUrl(core3, application32) {
this.configurePath();
var pathName = this.pathName;
var pathParts = pathName.split("/");
pathParts.shift();
var tableName = pathParts[0];
var id2 = pathParts[1];
if (id2) {
this.parseUrlByID(core3, tableName, id2);
} else {
document.stateMachine.composeState();
core3.runDefault(application32);
}
}
createBaseUrl() {
var base = document.createElement("base");
if (this.ssl) {
base.href = "https://" + this.serverAddress;
} else {
base.href = "http://" + this.serverAddress + ":" + this.port;
}
document.head.appendChild(base);
}
createMetaDescription() {
if (this.application.description) {
document.querySelector(".metaDescription").setAttribute("content", this.application.description);
} else {
document.querySelector(".metaDescription").setAttribute("content", "A unifyJS application.");
}
}
async initializeSocketManager(core3, application32) {
var socket2 = new socketManager(this.socketPort);
socket2.ssl = this.ssl;
socket2.serverAddress = this.serverAddress;
this.connectPromise = socket2.connect();
document.connectPromise = this.connectPromise;
await this.connectPromise;
socket2.addClient();
this.signinPromise = this.checkSignIn(socket2, core3, application32);
console.log("after signin");
return socket2;
}
async createApplicationInstances() {
for (var applicationID = 0; applicationID < this.applications.length; applicationID++) {
var applicationFile = this.applications[applicationID];
this.applicationInstances[applicationID] = await this.getApplicationInstance(applicationFile.path, applicationID);
}
}
bindApplications() {
this.applications = applications_default;
document.applications = applications_default;
}
getApplication() {
var applicationFile = this.applications[0];
applicationFile.socket = socket;
}
async start() {
var unifyCore = new core2();
this.parseConfig();
this.bindApplications();
this.createBaseUrl();
await this.createApplicationInstances();
var socket2 = this.initializeSocketManager(unifyCore, this.applicationInstances[0]);
await this.runApplication(socket2, 0, unifyCore);
this.createMetaDescription();
document.timer.lap("Everything is loaded");
console.log(this.applicationInstances[0]);
}
async updateApplications() {
for (var applicationID = 1; applicationID < this.applications.length; applicationID++) {
var applicationFile = this.applications[applicationID];
var unifyCore = new core2();
this.runApplication(applicationFile.socket, applicationID, unifyCore);
}
}
async attachSocket(applicationFile, socket2, applicationID) {
if (!applicationFile.socket) {
applicationFile.socket = await new socketManager(this.defaultSocketPort + applicationID);
if (this.serverAddress) {
applicationFile.socket.serverAddress = this.serverAddress;
}
await applicationFile.socket.connect();
}
return applicationFile.socket;
}
preventDoubleLoading(element2) {
if (element2 && element2.childElementCount != 0) {
return true;
}
}
createCodeEditor(app, applicationID) {
if (applicationID != 0) {
new codePreview(app);
}
}
getDomElement(application32) {
if (this.applications.length == 1) {
application32.selector = "#application";
}
var element2 = document.querySelector(application32.selector);
if (document.querySelectorAll(application32.selector).length == 0) {
return true;
} else {
if (this.preventDoubleLoading(element2)) {
return true;
}
}
return false;
}
configureCore(core3) {
core3.device = this.device;
core3.os = this.os;
core3.tint = this.tint;
}
setGlobalCore(unifyCore, applicationID) {
if (!document.cores) {
document.cores = new Array();
}
document.cores[applicationID] = unifyCore;
}
async parseApplication(core3, application32, applicationID) {
this.defaultObject.agregateDefaultObject(application32);
this.setGlobalCore(core3, applicationID);
await core3.prepareObjects(application32);
await document.connectPromise;
this.configureCore(core3);
core3.setTheme();
application32.core = core3;
await core3.parse(application32, true);
core3.createDependencyMap();
}
hidePreloader() {
if (document.querySelector(".loadingBarPanel, .preloader, #preloader")) {
document.querySelector(".loadingBarPanel, .preloader, #preloader").style.opacity = "0%";
}
setTimeout(function() {
document.querySelector(".loadingBarPanel, .preloader, #preloader").style.display = "none";
}, 1e3);
}
logApplication(application32, unifyCore) {
if (document.debugALL) {
console.log("");
console.log("run application", application32.selector);
console.log("Core", unifyCore);
console.log("Application", application32);
console.log("");
}
}
setServerPort(port) {
if (application.port) {
this.serverPort = application.port;
}
}
prepareApplication(applicationID) {
var application32 = this.applicationInstances[applicationID];
application32.applicationID = applicationID;
this.setServerPort(application32.port);
return application32;
}
bindObjectsToSocket(socket2, application32, unifyCore, applicationID) {
if (applicationID == 0) {
socket2.application = application32;
socket2.core = unifyCore;
}
}
async runApplication(socket2 = false, applicationID, unifyCore) {
if (this.applicationInstances[applicationID]) {
var application32 = this.prepareApplication(applicationID);
this.bindObjectsToSocket(socket2, application32, unifyCore, applicationID);
if (this.getDomElement(application32)) {
return true;
}
unifyCore.socketManager = await socket2;
this.hidePreloader();
this.createCodeEditor(application32, applicationID);
await this.parseApplication(unifyCore, application32, applicationID);
if (applicationID == 0) {
}
await unifyCore.callAfterLoad(application32);
this.logApplication(application32, unifyCore);
if (this.loadThemes) {
await this.themeLoader.loadThemes(application32, applicationID, unifyCore);
}
this.setGlobals();
await unifyCore.callAfterThemeLoad(application32);
}
return true;
}
setGlobals() {
document.timer.initialising = false;
document.themeObjects = this.themeObjects;
}
};
// framework/client/timer.js
var timer = class {
static {
__name(this, "timer");
}
timings = new Array();
initialising = true;
lap(name) {
var timing = new Object();
timing.time = (/* @__PURE__ */ new Date()).getTime();
timing.name = name;
if (this.timings.length > 0) {
var previouseTiming = this.timings[this.timings.length - 1].time;
var timeBetweenPrev = (timing.time - previouseTiming) / 1e3;
var firstTiming = this.timings[0].time;
var timeSinceFirst = (timing.time - firstTiming) / 1e3;
console.log("Time: ", timeSinceFirst, name);
}
this.timings.push(timing);
}
};
// framework/client/index.js
document.states = new Array();
window.addEventListener("popstate", function(event2) {
console.log("popstate tiggered", event2, event2.state.id);
var stateMachine2 = document.stateMachine;
console.log(stateMachine2);
var state2 = stateMachine2.getState(event2.state.id);
console.log("stateMachine.getState", state2, state2.id);
state2.triggerEvents();
}, false);
document.globalZIndex = 2e3;
document.animationID = 0;
document.keyframeID = 0;
document.timer = new timer();
if (!document.extendMap) {
document.extendMap = new Array();
}
function main() {
document.timer.lap("start");
document.mouse = new vector2(0, 0);
document.mouseVelocity = new vector2(0, 0);
var lastMouseUpdate = Date.now();
var previousMouse = new vector2(0, 0);
document.body.addEventListener("mousemove", function(bodyEvent) {
if (document.mouse) {
previousMouse = document.mouse;
document.mouse = new vector2(bodyEvent.clientX, bodyEvent.clientY);
var delta = Date.now() - lastMouseUpdate;
var differenceX = document.mouse.x - previousMouse.x;
var differenceY = document.mouse.y - previousMouse.y;
document.mouseVelocity = new vector2(differenceX / delta, differenceY / delta);
lastMouseUpdate = Date.now();
} else {
document.mouse = new vector2(bodyEvent.screenX, bodyEvent.screenY);
}
});
var applications = new applicationManager();
applications.start();
document.launcher = applications;
}
__name(main, "main");
document.onload = main();
/*! @license DOMPurify 2.3.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 */