site
Version:
Site Engine is the world's first all-in-one engine to build a modern web site, game, or blog. No HTML or CSS knowledge required.
1 lines • 25.9 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Flipper=exports.ComboBox=exports.Button=exports.Video=exports.Image=exports.Stack=exports.SceneBox=exports.Board=exports.Group=exports.TextAreaBox=exports.TextBox=exports.Text=exports.Container=exports.Contented=exports.Sourced=exports.setRoot=exports.root=exports.enableAntiFraction=exports.antiFractionEnabled=exports.getSize=exports.refreshRem=exports.getRem=exports.setRem=exports.HeightRem=exports.WidthRem=exports.MaxRem=exports.MinRem=exports.GmRem=exports.getRemInPixels=exports.Circle=exports.Rectangle=exports.Line=exports.Svg=exports.onResize=exports.RoundedCorners=exports.Border=exports.Padding=exports.parseLength=exports.NoneLength=exports.AutoLength=exports.RatioLength=exports.EmLength=exports.RemLength=exports.Length=exports.LayoutXY=exports.transition=exports.Element=exports.Color=void 0;var t=require("./shared.manifest"),e=l(require("./client.browser")),r=l(require("./client.dom")),s=l(require("./client.ui.measure")),i=h(require("./shared.color")),n=h(require("./client.ui.element")),o=l(require("./client.ui.svg")),a=l(require("./client.ui.transition"));function h(t){return t&&t.__esModule?t:{default:t}}function l(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var u,d,p,c,g,x,m,C,v,f,w,E,y,A,L,S,b,F,T,R,D,_,N,P,I,O,B,U,M,k,V,z,H,G,W,X,q,Z,Y,j,K,J,Q,$,tt,et,rt,st,it,nt,ot,at,ht,lt=function(t,e){return(t%e+e)%e},ut=function(t){return null!=t},dt=function(t,e,r,s){return t(e)[r](e,...s)};exports.LayoutXY=u=s.LayoutXY,exports.Length=d=s.Length,exports.RemLength=p=s.RemLength,exports.EmLength=c=s.EmLength,exports.RatioLength=g=s.RatioLength,exports.AutoLength=x=s.AutoLength,exports.NoneLength=m=s.NoneLength,exports.parseLength=C=s.parseLength,exports.Padding=v=s.Padding,exports.Border=f=s.Border,exports.RoundedCorners=w=s.RoundedCorners,exports.Color=i.default,exports.onResize=E=(0,t.eventField)(),exports.Element=n.default,exports.Svg=y=o.Svg,exports.Line=A=o.Line,exports.Rectangle=L=o.Rectangle,exports.Circle=S=o.Circle,exports.transition=a,exports.getRemInPixels=b=function(){return(()=>I)()},F=class{constructor(t){(t=>(()=>{this.value=t})())(t)}},exports.GmRem=T=class extends F{},exports.MinRem=R=class extends F{},exports.MaxRem=D=class extends F{},exports.WidthRem=_=class extends F{},exports.HeightRem=N=class extends F{},P=new T("handheld"===e.deviceType?.03125:.015625),I=null,exports.setRem=O=function(t){return(()=>(P="number"==typeof t?(()=>new T(t))():(()=>t)(),U()))()},exports.getRem=B=function(){return(()=>P)()},exports.refreshRem=U=function(){var e,r;return r=(e=function(){var t=arguments;return(()=>P instanceof t[0])()})(T)?(()=>Math.sqrt(window.innerWidth*window.innerHeight))():e(R)?(()=>Math.min(window.innerWidth,window.innerHeight))():e(D)?(()=>Math.max(window.innerWidth,window.innerHeight))():e(_)?(()=>window.innerWidth)():e(N)?(()=>window.innerHeight)():(()=>(0,t.fail)())(),I=P.value*r,document.remInPixels_705357537593286848=I,document.documentElement.style.fontSize=I+"px",k()},M=null,k=function(){return M=new t.Point(window.innerWidth/I,window.innerHeight/I),void(document.viewportSize_705357537593286848=M)},exports.getSize=V=function(){return(()=>(ut(M)||(()=>k())(),M))()},exports.antiFractionEnabled=z=!1,exports.enableAntiFraction=H=function(){return(()=>z?void 0:(()=>(exports.antiFractionEnabled=z=!0,setInterval(function(){var e,r;return e=function(s,i){return n=s.computeTranslateFraction(),ut(n)?(()=>(o=n.opposite(),a=o.x,h=o.y,i.x+a<=-.5&&(a+=1),i.y+h<=-.5&&(h+=1),o=new t.Point(a,h),r.push({element:s,offset:o}),ut(s.getChildren)?(()=>s.getChildren().filter(function(t){return(()=>!t.hasAnimation())()}).forEach(function(t){return(()=>e(t,i.add(o)))()}))():void 0))():void 0;var n,o,a,h},r=[],e(G,new t.Point(0,0)),r.forEach(function(t){return e=t.element.getAntiFractionOffset(),Math.abs(e.x-t.offset.x)>.001||Math.abs(e.y-t.offset.y)>.001?(()=>t.element.setAntiFractionOffset(t.offset))():void 0;var e})},1e3)))())()},exports.root=G=null,exports.setRoot=W=function(t){return(()=>(ut(G)&&(()=>document.body.removeChild(G.raw))(),exports.root=G=t,document.body.insertBefore(G.raw,document.body.firstChild)))()},exports.Sourced=(ot=Symbol(),(at=class extends n.default{constructor(){(()=>{var t=arguments;(()=>{var e,r,s,i;super((e=n.default.analyseArguments(t)).main[0],e.main[1],e.options),r=void 0===(s=void 0===(i=e.main[2])?e.options.source:i)?this.constructor.DEFAULT_SOURCE:s,this.setSource(r)})()})()}setSource(t){return(t=>(()=>(this[ot]=t,this))())(t)}getSource(){return(()=>{return(()=>this[ot])()})()}}).DEFAULT_SOURCE="",X=at),exports.Contented=q=(()=>{var e=Symbol(),s=class extends n.default{constructor(){(()=>{var t=arguments;(()=>{var e,r,s,i;super((e=n.default.analyseArguments(t)).options),r=void 0===(s=void 0===(i=e.main[0])?e.options.content:i)?this.constructor.DEFAULT_CONTENT:s,this.raw.classList.add("contented-705357537593286848"),this.setContent(r)})()})()}setContent(s){return(s=>(()=>{var i;return s!==this[e]&&(()=>(this[e]instanceof n.default&&(()=>this[e].setParent(null))(),this[e]=s,this.empty(),s instanceof n.default?(()=>(s.setAnchor(new t.Point(0,0)).setPosition(new t.Point(0,0)),s.setParent(this),this.raw.appendChild(s.raw),this.refreshPointerArea(s)))():(()=>((i=r.parseElement('<div xmlns="http://www.w3.org/1999/xhtml" />')).textContent=s,this.raw.appendChild(i)))()))(),this})())(s)}getContent(){return(()=>{return(()=>this[e])()})()}};return s.DEFAULT_CONTENT="",s})(),exports.Container=(ht=Symbol(),Z=class extends n.default{constructor(){(()=>{var t=arguments;(()=>{var e;(e=>super(...t))(),e=this.constructor.analyseArguments(t),this[ht]=[],(t=>this.add(...t))(e.main)})()})()}getChildren(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"clone",[]))())()}getNonCollapsedChildren(){return(()=>(()=>this[ht].filter(t=>(()=>"collapsed"!==t.getVisibility())()))())()}getChild(t){return(t=>(()=>this[ht][t])())(t)}getFirstChild(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"first",[]))())()}getLastChild(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"last",[]))())()}getFirstChildOrNull(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"firstOrNull",[]))())()}getLastChildOrNull(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"lastOrNull",[]))())()}getFirstChildOrVoid(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"firstOrVoid",[]))())()}getLastChildOrVoid(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"lastOrVoid",[]))())()}getFirstNonCollapsedChild(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"first",[t=>(()=>"collapsed"!==t.getVisibility())()]))())()}getLastNonCollapsedChild(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"last",[t=>(()=>"collapsed"!==t.getVisibility())()]))())()}getFirstNonCollapsedChildOrNull(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"firstOrNull",[t=>(()=>"collapsed"!==t.getVisibility())()]))())()}getLastNonCollapsedChildOrNull(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"lastOrNull",[t=>(()=>"collapsed"!==t.getVisibility())()]))())()}getFirstNonCollapsedChildOrVoid(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"firstOrVoid",[t=>(()=>"collapsed"!==t.getVisibility())()]))())()}getLastNonCollapsedChildOrVoid(){return(()=>(()=>dt(t.dotDot_573300145710716007,this[ht],"lastOrVoid",[t=>(()=>"collapsed"!==t.getVisibility())()]))())()}getChildCount(){return(()=>(()=>this[ht].length)())()}getNonCollapsedChildCount(){return(()=>(()=>this.getNonCollapsedChildren().length)())()}hasChild(t){return(t=>(()=>this[ht].includes(t))())(t)}add(){return(()=>{var t=arguments;return(()=>{var e,r;return e=t[0]instanceof Array?(()=>t[0])():(()=>Array.from(t))(),r=document.createDocumentFragment(),e.forEach(t=>(()=>(this[ht].push(t),t.setParent(this),r.appendChild(t.raw),this.refreshPointerArea(t)))()),this.raw.appendChild(r),this})()})()}insertBefore(e,...r){return((e,...r)=>(()=>{var s,i;return"number"==typeof e&&e>=this[ht].length?(()=>this.add(...r))():(()=>(r[0]instanceof Array&&(r=r[0]),"number"==typeof e?(()=>(s=this[ht][e],dt(t.dotDot_573300145710716007,this[ht],"insertBeforeIndex",[e,...r])))():(()=>dt(t.dotDot_573300145710716007,this[ht],"insertBefore",[e,...r]))(),i=document.createDocumentFragment(),r.forEach(t=>(()=>(t.setParent(this),i.appendChild(t.raw),this.refreshPointerArea(t)))()),this.raw.insertBefore(i,"number"==typeof e?(()=>s.raw)():(()=>e.raw)())))(),this})())(e,...r)}insertAfter(e,...r){return((e,...r)=>(()=>(e===dt(t.dotDot_573300145710716007,this[ht],"last",[])?(()=>this.add(...r))():(()=>this.insertBefore(this[ht][this[ht].indexOf(e)+1],...r))(),this))())(e,...r)}replaceChild(t,e){return((t,e)=>(()=>{var r,s;return[r,s]="number"==typeof t?(()=>[this[ht][t],t])():(()=>[t,this[ht].indexOf(t)])(),r.setParent(null),this[ht][s]=e,e.setParent(this),this.raw.replaceChild(e.raw,r.raw),this.refreshPointerArea(e),this})())(t,e)}remove(e){return(e=>(()=>(this.raw.removeChild(e.raw),e.setParent(null),dt(t.dotDot_573300145710716007,this[ht],"remove",[e]),this))())(e)}empty(){return(()=>(()=>(this.getChildren().forEach(t=>(()=>this.remove(t))()),this))())()}setPointerArea(t){return(t=>(()=>(super.setPointerArea(t),ut(this[ht])&&(()=>this[ht].forEach(t=>(()=>this.refreshPointerArea(t))()))(),this))())(t)}}),exports.Text=Y=(()=>{var t=class extends X{constructor(){(()=>{var t=arguments;(()=>{var e;super(void 0,void 0,(e=n.default.analyseArguments(t)).main[0],e.options)})()})()}setSource(t){return(t=>(()=>(super.setSource(t),this.raw.textContent=t,this))())(t)}};return t.DEFAULT_WRAPPING="none",t})(),exports.TextBox=j=(()=>{var e=Symbol(),r=class extends X{constructor(){(()=>{var t=arguments;(()=>{var e,r,s;e=n.default.analyseArguments(t),r=n.default.optionsWithEventListenerAdded(e.options,"preInit",t=>(()=>t.sender.raw.addEventListener("input",()=>{return(()=>s())()}))()),super('<input xmlns="http://www.w3.org/1999/xhtml"\nclass="text-input-705357537593286848" spellcheck="false" />',!0,e.main[0],r),s=(()=>{return(()=>super.setSource(this.raw.value))()}),this.initProperty(e.options.textMode,this.setTextMode,this.constructor.DEFAULT_TEXT_MODE)})()})()}setSource(t){return(t=>(()=>(super.setSource(t),this.raw.value=t,this))())(t)}setTextMode(r){return(r=>(()=>(this[e]=r,this.raw.type="text"===r?"text":"password"===r?"password":"number"===r?"number":"tel"===r?"tel":(()=>(0,t.fail)())(),this))())(r)}getTextMode(){return(()=>{return(()=>this[e])()})()}};return r.DEFAULT_TEXT_MODE="text",r.DEFAULT_BORDER={width:"0.0933333em"},r.DEFAULT_PADDING="0.15em",r.DEFAULT_POINTER_DEFAULT_ENABLED=!0,r.DEFAULT_SELECTABLE=!0,r})(),exports.TextAreaBox=K=(()=>{var t=class extends X{constructor(){(()=>{var t=arguments;(()=>{var e,r,s;e=n.default.analyseArguments(t),r=n.default.optionsWithEventListenerAdded(e.options,"preInit",t=>(()=>t.sender.raw.addEventListener("input",()=>{return(()=>s())()}))()),super('<textarea xmlns="http://www.w3.org/1999/xhtml"\nclass="text-input-705357537593286848" spellcheck="false" style="resize: none;" />',!0,e.main[0],r),s=(()=>{return(()=>super.setSource(this.raw.value))()})})()})()}setSource(t){return(t=>(()=>(super.setSource(t),this.raw.value=t,this))())(t)}};return t.DEFAULT_BORDER={width:"0.0933333em"},t.DEFAULT_PADDING="0.15em",t.DEFAULT_POINTER_DEFAULT_ENABLED=!0,t.DEFAULT_SELECTABLE=!0,t})(),exports.Group=J=(()=>{var t=class extends Z{constructor(){(()=>{var t=arguments;(()=>((e=>super(...t))(),this.raw.classList.add("group-705357537593286848")))()})()}};return t.DEFAULT_SIZE=new u(1,1),t})(),exports.Board=Q=(()=>{var e=Symbol(),r=Symbol(),s=Symbol(),i=Symbol(),n=Symbol(),o=class extends J{constructor(){(()=>{var o=arguments;(()=>{super(...o),this.onModalShown=(0,t.eventField)(),this[e]=null,this[r]=null,this[s]=null,this[i]=null,this[n]=null})()})()}hasModal(){return(()=>{return(()=>null!==this[e])()})()}showModal(n,o){return((n,o)=>(void 0===o&&(o={}),(()=>(o=dt(t.dotDot_573300145710716007,Object,"clone",[o]),null!==this[e]&&(()=>(0,t.fail)())(),new Promise((t,a)=>(()=>(this[e]=n,this.add(this[r]=new Q({backgroundPaint:"rgb(0,0,0)",opacity:0,zIndex:99997})),this.add(n.setOpacity(0).setZIndex(99998)),this.add(this[s]=new Q({backgroundPaint:"rgb(0,0,0)",opacity:0,zIndex:99999})),o.outsideClickTriggersClose&&(()=>this[r].onClick(()=>{return(()=>this.closeModal())()}))(),this[i]=t,this[r].animate({to:{opacity:.8},duration:300}),n.animate({to:{opacity:1},delay:300,duration:300}).then(()=>{return(()=>(this.remove(this[s]),this[s]=null,this.onModalShown.fire()))()})))())))()))(n,o)}closeModal(){return(()=>{return(()=>null!==this[e]&&null===this[s]&&null===this[n]?(()=>(this.add(this[s]=new Q({backgroundPaint:"rgb(0,0,0)",opacity:0,zIndex:99999})),this[e].animate({to:{opacity:0},duration:300}),this[n]=this[r].animate({to:{opacity:0},delay:300,duration:300}).then(()=>{return(()=>{this.remove(this[r]),this.remove(this[e]),this.remove(this[s]),this[s]=null,this[e]=null,this[r]=null,this[n]=null,this[i](),this[i]=null})()}),this[n]))():(()=>(0,t.fail)())())()})()}getModal(){return(()=>{return(()=>this[e])()})()}};return o.OVERFLOW="hidden",o})(),exports.SceneBox=$=(()=>{var e=Symbol(),r=class extends q{constructor(){(()=>{var t=arguments;(()=>{var e;e=n.default.analyseArguments(t),super(new Q,e.options),(t=>this.add(...t))(e.main)})()})()}add(){return(()=>{var t=arguments;return(()=>(Array.from(t).forEach(t=>(()=>t.setSize(1,1).setZIndex(-99999).hide())()),(t=>this.getContent().add(...t))(t),this))()})()}remove(t){return(t=>(()=>(this.getContent().remove(t),this))())(t)}empty(){return(()=>{return(()=>(this.getContent().empty(),this))()})()}getScenes(){return(()=>{return(()=>this.getContent().getChildren())()})()}showScene(r,s,i,n){return((r,s,i,n)=>(void 0===s&&(s=a.cut),void 0===i&&(i=0),void 0===n&&(n="linear"),(()=>{var o;return o=this[e],this[e]=r,dt(t.dotDot_573300145710716007,Promise,"delay",[0]).then(()=>{return(()=>s(o,r,this,i,n))()}).then(()=>{return(()=>(ut(o)&&(()=>o.setZIndex(-99999).hide())(),r.setZIndex(0)))()})})()))(r,s,i,n)}getCurrentScene(){return(()=>{return(()=>this[e])()})()}};return r.DEFAULT_SIZE=new u(1,1),r.prototype[e]=null,r})(),exports.Stack=tt=(()=>{var e=Symbol(),r=Symbol(),s=Symbol(),i=Symbol(),n=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=class extends Z{constructor(){(()=>{var t=arguments;(()=>{var e;(e=>super(...t))(),e=this.constructor.analyseArguments(t),this.raw.classList.add("stack-705357537593286848"),this.initProperty(e.options.horizontal,this.setHorizontal,this.constructor.DEFAULT_HORIZONTAL),this.initProperty(e.options.reverse,this.setReverse,this.constructor.DEFAULT_REVERSE),this.initProperty(e.options.childAlignment,this.setChildAlignment,this.constructor.DEFAULT_CHILD_ALIGNMENT),this.initProperty(e.options.childSpacing,this.setChildSpacing,this.constructor.DEFAULT_CHILD_SPACING)})()})()}static initNewChildren(e){return(e=>(()=>e.forEach(e=>(()=>(e.setAnchor(new t.Point(0,0)).setPosition(new t.Point(0,0)),e.refreshRawMargin()))()))())(e)}refreshOldEdgeChildRawMargin(){return(()=>{return(()=>(ut(this[e])&&(()=>this[e].refreshRawMargin())(),this[e]=this.getFirstNonCollapsedChildOrNull(),ut(this[r])&&(()=>this[r].refreshRawMargin())(),this[r]=this.getLastNonCollapsedChildOrNull(),this))()})()}refreshEdgeChildRawMargin(){return(()=>{return(()=>(this[e]=this.getFirstNonCollapsedChildOrNull(),ut(this[e])&&(()=>this[e].refreshRawMargin())(),this[r]=this.getLastNonCollapsedChildOrNull(),ut(this[r])&&(()=>this[r].refreshRawMargin())(),this))()})()}add(){return(()=>{var t=arguments;return(()=>{var e;return(t=>super.add(...t))(t),e=t[0]instanceof Array?(()=>t[0])():(()=>Array.from(t))(),this.constructor.initNewChildren(e),this.refreshOldEdgeChildRawMargin()})()})()}insertBefore(t,...e){return((t,...e)=>(()=>(super.insertBefore(t,...e),e[0]instanceof Array&&(e=e[0]),this.constructor.initNewChildren(e),this.refreshOldEdgeChildRawMargin()))())(t,...e)}insertAfter(e,...r){return((e,...r)=>(()=>{var s;return s=this.getChildren(),e===dt(t.dotDot_573300145710716007,s,"last",[])?(()=>this.add(...r))():(()=>this.insertBefore(s[s.indexOf(e)+1],...r))(),this})())(e,...r)}replaceChild(t,e){return((t,e)=>(()=>(super.replaceChild(t,e),this.constructor.initNewChildren([e]),this.refreshOldEdgeChildRawMargin()))())(t,e)}remove(t){return(t=>(()=>(super.remove(t),this.refreshEdgeChildRawMargin()))())(t)}[s](){return(()=>{return(()=>{var t;return t=this[i]?(()=>this[n]?"row-reverse":"row")():(()=>this[n]?"column-reverse":"column")(),ut(this.raw.style.flexDirection)?(()=>{this.raw.style.flexDirection=t})():(()=>{this.raw.style.webkitFlexDirection=t})(),this[o]()})()})()}[o](){return(()=>{return(()=>(this.getNonCollapsedChildren().forEach(t=>(()=>t.refreshRawMargin())()),this))()})()}setHorizontal(t){return(t=>(()=>(this[i]=t,this[s]()))())(t)}getHorizontal(){return(()=>{return(()=>this[i])()})()}setReverse(t){return(t=>(()=>(this[n]=t,this[s]()))())(t)}getReverse(){return(()=>{return(()=>this[n])()})()}setChildAlignment(e){return(e=>(()=>{var r;return this[a]=e,r="center"===e?"center":(()=>"start"===e?"flex-start":(()=>"end"===e?"flex-end":(()=>"stretch"===e?"":(()=>(0,t.fail)())())())())(),ut(this.raw.style.alignItems)?(()=>{this.raw.style.alignItems=r})():(()=>{this.raw.style.webkitAlignItems=r})(),this[o]()})())(e)}getChildAlignment(){return(()=>{return(()=>this[a])()})()}setChildSpacing(t){return(t=>(()=>(this[h]=d.from(t),this[o]()))())(t)}getChildSpacing(){return(()=>{return(()=>this[h])()})()}};return l.DEFAULT_HORIZONTAL=!1,l.DEFAULT_REVERSE=!1,l.DEFAULT_CHILD_ALIGNMENT="stretch",l.DEFAULT_CHILD_SPACING=0,l.prototype[e]=null,l.prototype[r]=null,l})(),exports.Image=et=(()=>{var t=class extends X{constructor(){(()=>{var t=arguments;(()=>{var e;super('<img xmlns="http://www.w3.org/1999/xhtml" class="img-705357537593286848"\nsrc="about:blank" alt="" />',!0,(e=n.default.analyseArguments(t)).main[0],e.options)})()})()}setSource(t){return(t=>(()=>(super.setSource(t),this.raw.src=t,this))())(t)}};return t.DEFAULT_SOURCE="about:blank",t})(),exports.Video=rt=(()=>{var t=Symbol(),e=class extends X{constructor(){(()=>{var t=arguments;(()=>{var e,r;e=n.default.analyseArguments(t),(r=document.createElementNS("http://www.w3.org/1999/xhtml","video")).className="video-705357537593286848",r.playsInline=!0,super(r,!0,e.main[0],e.options),this.initProperty(e.options.controlsVisible,this.setControlsVisible,this.constructor.DEFAULT_CONTROLS_VISIBLE)})()})()}setSource(t){return(t=>(()=>(super.setSource(t),this.raw.src=t,this))())(t)}play(){return(()=>{return(()=>this.raw.play())()})()}pause(){return(()=>{return(()=>this.raw.pause())()})()}setControlsVisible(e){return(e=>(()=>(this[t]=e,this.raw.controls=e,this))())(e)}getControlsVisible(){return(()=>{return(()=>this[t])()})()}};return e.DEFAULT_SOURCE="about:blank",e.DEFAULT_CONTROLS_VISIBLE=!0,e})(),exports.Button=st=(()=>{var t=class extends q{};return t.DEFAULT_BORDER=new s.Border({width:"0.0933333em"}),t.DEFAULT_POINTER="link",t.DEFAULT_PADDING=new s.Padding("0.5em","0.25em"),t.DEFAULT_WRAPPING="none",t.DEFAULT_TEXT_ALIGNMENT="center",t})(),exports.ComboBox=it=(()=>{var e=Symbol(),r=Symbol(),s=Symbol(),i=Symbol(),n=Symbol(),o=Symbol(),a=class extends st{constructor(){(()=>{var i=arguments;(()=>{var n,o;super(...i),n=this.constructor.analyseArguments(i),this.onSelectionChange=(0,t.eventField)(),this.initEvent(n.options.selectionChange,this.onSelectionChange),this[e]=new tt(dt(t.dotDot_573300145710716007,Object,"absorb",[void 0===(o=n.options.stackStyles)?{}:o,this.constructor.DEFAULT_STACK_STYLES])),this.initProperty(n.options.items,this[r],this.constructor.DEFAULT_ITEMS),this.initProperty(n.options.selectedIndex,this[s],this.constructor.DEFAULT_SELECTED_INDEX),this.onClick(()=>{return(()=>G.showModal(this[e],{outsideClickTriggersClose:!0}))()})})()})()}[s](t){return(t=>(()=>{var e;return this[i]=t,this.setContent(void 0===(e=this.getSelectedItem())||null===e?this.constructor.DEFAULT_CONTENT:e),this.onSelectionChange.fire(),this})())(t)}setSelectedIndex(t){return(t=>(()=>(t!==this[i]&&(()=>this[s](t))(),this))())(t)}getSelectedIndex(){return(()=>{return(()=>this[i])()})()}getSelectedItem(){return(()=>{return(()=>null===this[i]?null:(()=>this[n][this[i]])())()})()}[r](t){return(t=>(()=>(this[n]=t,this[o]=[],this[e].empty().add(t.map((t,r)=>(()=>this[o][r]=new Y(t,{pointer:"link",click:()=>{return(()=>(this.setSelectedIndex(r),this[e].close()))()}}))())),this))())(t)}setItems(t,e){return((t,e)=>(void 0===e&&(e=this.constructor.DEFAULT_SELECTED_INDEX),(()=>(this[r](t),this[s](e),this))()))(t,e)}getItems(){return(()=>{return(()=>this[n])()})()}setItem(t,e){return((t,e)=>(()=>(this[n][t]=e,this[o][t].setSource(e),t===this[i]&&(()=>this.setContent(e))(),this))())(t,e)}getItem(t){return(t=>(()=>this[n][t])())(t)}};return a.DEFAULT_ITEMS=[],a.DEFAULT_SELECTED_INDEX=null,a.DEFAULT_CONTENT="Please Select",a.DEFAULT_STACK_STYLES={backgroundPaint:"rgb(255,255,255)",childSpacing:"0.5em",padding:"0.5em"},a})(),exports.Flipper=nt=(()=>{var e=Symbol(),r=Symbol(),s=Symbol(),i=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=Symbol(),u=Symbol(),d=class extends q{constructor(){(()=>{var t=arguments;(()=>{var l,u,d,p,c,g,x;l=n.default.analyseArguments(t),super(new Q,l.options),this[e]=void 0===(u=l.options.orientation)?"horizontal":u,this[r]=void 0===(d=l.options.perspective)?"0rem":d,this[s]=void 0!==(p=l.options.destroys3dWhenFlat)&&p,this[i]=void 0!==(c=l.options.hidesBackFace)&&c,this[o]=this[s],this[a]=!1,this.getContent().add(new Q({rotate3d:this[s]?null:(()=>({perspective:this[r],axisAngle:this[h](),angle:"0deg"}))(),backFaceVisible:this[o]},void 0===(g=l.options.frontFace)?new Q:g),new Q({visibility:this[s]?"collapsed":(()=>this[i]?"hidden":"visible")(),rotate3d:this[s]?null:(()=>({perspective:this[r],axisAngle:this[h](),angle:"180deg"}))(),backFaceVisible:this[o]},void 0===(x=l.options.backFace)?new Q:x))})()})()}[h](){return(()=>{return(()=>(()=>{var r=this[e];return"horizontal"===r?"90deg":"vertical"===r?"0deg":(()=>(0,t.fail)())()})())()})()}setFrontFace(t){return(t=>(()=>(this.getContent().getChild(0).replaceChild(0,t),this))())(t)}getFrontFace(){return(()=>{return(()=>this.getContent().getChild(0).getChild(0))()})()}setBackFace(t){return(t=>(()=>(this.getContent().getChild(1).replaceChild(0,t),this))())(t)}getBackFace(){return(()=>{return(()=>this.getContent().getChild(1).getChild(0))()})()}flip(t,e,n){return((t,e,n)=>(void 0===n&&(n="linear"),(()=>{var u,d;this[a]=!0,u=this.getContent().getChild(lt(this[l],2)),d=this.getContent().getChild(lt(this[l]+1,2));return this[l]=this[l]+t,u.stopAnimation(),d.stopAnimation(),this[s]?(()=>(u.setBackFaceVisible(!1).setRotate3d({perspective:this[r],axisAngle:this[h](),angle:"0deg"}),d.setBackFaceVisible(!1).setRotate3d({perspective:this[r],axisAngle:this[h](),angle:"180deg"}).show(),Promise.all([u.animate({keyframes:{to:{rotate3d:{perspective:this[r],axisAngle:this[h](),angle:180*t+"deg"}}},duration:e,timingFunction:n}),d.animate({keyframes:{to:{rotate3d:{perspective:this[r],axisAngle:this[h](),angle:180+180*t+"deg"}}},duration:e,timingFunction:n})]).then(()=>{return(()=>{this.getContent().getChild(lt(this[l],2)).setRotate3d(null),this.getContent().getChild(lt(this[l]+1,2)).collapse().setRotate3d(null),u.setBackFaceVisible(this[o]),d.setBackFaceVisible(this[o]),this[a]=!1})()})))():(()=>(this[i]&&(()=>d.show())(),Promise.all([u.animate({keyframes:{from:{rotate3d:{perspective:this[r],axisAngle:this[h](),angle:"0deg"}},to:{rotate3d:{perspective:this[r],axisAngle:this[h](),angle:180*t+"deg"}}},duration:e,timingFunction:n,fillMode:"forwards"}),d.animate({keyframes:{from:{rotate3d:{perspective:this[r],axisAngle:this[h](),angle:"180deg"}},to:{rotate3d:{perspective:this[r],axisAngle:this[h](),angle:180+180*t+"deg"}}},duration:e,timingFunction:n,fillMode:"forwards"})]).then(()=>{return(()=>{this[i]&&(()=>this.getContent().getChild(lt(this[l]+1,2)).hide())(),this[a]=!1})()})))()})()))(t,e,n)}isReversed(){return(()=>{return(()=>1===lt(this[l],2))()})()}isFlipping(){return(()=>{return(()=>this[a])()})()}getCurrentFrontFace(){return(()=>{return(()=>this.getContent().getChild(lt(this[l],2)).getChild(0))()})()}getCurrentBackFace(){return(()=>{return(()=>this.getContent().getChild(lt(this[l]+1,2)).getChild(0))()})()}[u](t){return(t=>(()=>{var e,n;return this[l]=t?1:0,this[a]=!1,e=this.getContent().getChild(t?1:0),n=this.getContent().getChild(t?0:1),e.stopAnimation(),n.stopAnimation(),e.setVisibility("visible").setRotate3d(this[s]?null:(()=>({perspective:this[r],axisAngle:this[h](),angle:"0deg"}))()),n.setVisibility(this[s]?"collapsed":(()=>this[i]?"hidden":"visible")()).setRotate3d(this[s]?null:(()=>({perspective:this[r],axisAngle:this[h](),angle:"180deg"}))()),this})())(t)}reset(){return(()=>{return(()=>this[u](!1))()})()}resetToReversed(){return(()=>{return(()=>this[u](!0))()})()}};return d.prototype[l]=0,d})(),exports.LayoutXY=u,exports.Length=d,exports.RemLength=p,exports.EmLength=c,exports.RatioLength=g,exports.AutoLength=x,exports.NoneLength=m,exports.parseLength=C,exports.Padding=v,exports.Border=f,exports.RoundedCorners=w,exports.onResize=E,exports.Svg=y,exports.Line=A,exports.Rectangle=L,exports.Circle=S,exports.getRemInPixels=b,exports.GmRem=T,exports.MinRem=R,exports.MaxRem=D,exports.WidthRem=_,exports.HeightRem=N,exports.setRem=O,exports.getRem=B,exports.refreshRem=U,exports.getSize=V,exports.antiFractionEnabled=z,exports.enableAntiFraction=H,exports.root=G,exports.setRoot=W,exports.Sourced=X,exports.Contented=q,exports.Container=Z,exports.Text=Y,exports.TextBox=j,exports.TextAreaBox=K,exports.Group=J,exports.Board=Q,exports.SceneBox=$,exports.Stack=tt,exports.Image=et,exports.Video=rt,exports.Button=st,exports.ComboBox=it,exports.Flipper=nt;