| 1 |
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CSSLayoutAPI={}))}(this,(function(t){"use strict";var e,i,n,o,r=function(t,e,i){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=i,this.layoutContext=t,this.inlineSize=null==i?void 0:i.inlineSize,this.blockSize=null==i?void 0:i.blockSize,this.childFragments=null==i?void 0:i.childFragments,this.data=i.data,this.node=e};function a(){a=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n=Object.defineProperty||function(t,e,i){t[e]=i.value},o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,i){return t[e]=i}}function c(t,e,i,o){var r=Object.create((e&&e.prototype instanceof y?e:y).prototype),a=new E(o||[]);return n(r,"_invoke",{value:x(t,i,a)}),r}function d(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function y(){}function f(){}function v(){}var p={};s(p,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(b([])));m&&m!==e&&i.call(m,r)&&(p=m);var S=v.prototype=y.prototype=Object.create(p);function T(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function o(n,r,a,u){var l=d(t[n],t,r);if("throw"!==l.type){var s=l.arg,c=s.value;return c&&"object"==typeof c&&i.call(c,"__await")?e.resolve(c.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(c).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(l.arg)}var r;n(this,"_invoke",{value:function(t,i){function n(){return new e((function(e,n){o(t,i,e,n)}))}return r=r?r.then(n,n):n()}})}function x(t,e,i){var n="suspendedStart";return function(o,r){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw r;return N()}for(i.method=o,i.arg=r;;){var a=i.delegate;if(a){var u=k(a,i);if(u){if(u===h)continue;return u}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=d(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}function k(t,e){var i=e.method,n=t.iterator[i];if(void 0===n)return e.delegate=null,"throw"===i&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=d(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var r=o.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function b(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return f.prototype=v,n(S,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:f,configurable:!0}),f.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},T(L.prototype),s(L.prototype,u,(function(){return this})),t.AsyncIterator=L,t.async=function(e,i,n,o,r){void 0===r&&(r=Promise);var a=new L(c(e,i,n,o),r);return t.isGeneratorFunction(i)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(S),s(S,l,"Generator"),s(S,r,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),i=[];for(var n in e)i.push(n);return i.reverse(),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=b,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return a.type="throw",a.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return n("end");if(this.prev>=r.tryLoc){var u=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(u&&l){if(r.catchLoc>this.prev)return n(r.catchLoc,!0);if(r.finallyLoc>this.prev)return n(r.finallyLoc)}else if(u){if(r.catchLoc>this.prev)return n(r.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(r.finallyLoc>this.prev)return n(r.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&i.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var r=o;break}}r&&("break"===t||"continue"===t)&&e>=r.tryLoc&&r.finallyLoc>=e&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),w(i),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;w(i)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:b(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function u(t,e,i,n,o,r,a){try{var u=t[r](a),l=u.value}catch(t){return void i(t)}u.done?e(l):Promise.resolve(l).then(n,o)}function l(t){return function(){var e=this,i=arguments;return new Promise((function(n,o){var r=t.apply(e,i);function a(t){u(r,n,o,a,l,"next",t)}function l(t){u(r,n,o,a,l,"throw",t)}a(void 0)}))}}function s(t,e){for(var i=0;e.length>i;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=void 0,"symbol"==typeof(o=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(n.key,"string"))?o:o+""),n)}var o}function c(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(e=t.LayoutTaskType||(t.LayoutTaskType={})).Layout="layout",e.IntrinsicSizes="intrinsic-sizes",function(t){t[t.block=0]="block",t[t.normal=1]="normal"}(i||(i={})),function(t){t[t["block-like"]=0]="block-like",t[t.manual=1]="manual"}(n||(n={})),(o=t.PropertyName||(t.PropertyName={})).LAYOUT="display",o.LEFT="left",o.TOP="top",o.BOTTOM="bottom",o.RIGHT="right",o.WIDTH="width",o.HEIGHT="height",o.MIN_WIDTH="minWidth",o.MAX_WIDTH="maxWidth",o.MIN_HEIGHT="minHeight",o.MAX_HEIGHT="maxHeight",o.BOX_SIZING="boxSizing",o.PADDING="padding",o.PADDING_TOP="paddingTop",o.PADDING_BOTTOM="paddingBottom",o.PADDING_START="paddingLeft",o.PADDING_END="paddingRight",o.MARGIN="margin",o.MARGIN_TOP="marginTop",o.MARGIN_BOTTOM="marginBottom",o.MARGIN_START="marginLeft",o.MARGIN_END="marginRight",o.BORDER="border",o.BORDER_TOP="borderTop",o.BORDER_BOTTOM="borderBottom",o.BORDER_START="borderLeft",o.BORDER_END="borderRight",o.FLEX_DIRECTION="flexDirection",o.FLEX_WRAP="flexWrap",o.FLEX_FLOW="flexFlow",o.ALIGN_ITEMS="alignItems",o.ALIGN_CONTENT="alignContent",o.JUSTIFY_CONTENT="justifyContent",o.FLEX="flex",o.ALIGN_SELF="alignSelf",o.FLEX_SHRINK="flexShrink",o.FLEX_BASIS="flexBasis",o.FLEX_GROW="flexGrow",o.OFFSET_WIDTH="offsetWidth",o.OFFSET_HEIGHT="offsetHeight",o.ORDER="order";var d=function(t){if(t.isRejected||t.isFulfilled)return t;var e,i=!0,n=!1,o=!1,r=t.then((function(t){return o=!0,i=!1,e=t,t}),(function(t){throw n=!0,i=!1,t}));return r.isFulfilled=function(){return o},r.isPending=function(){return i},r.isRejected=function(){return n},r.getFullFilledValue=function(){return e},r},h=function(){var t=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise((function(e,i){t.resolve=e,t.reject=i}))},y=function(){function e(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var i=e.prototype;return i.intrinsicSizes=function(){var e=new h;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:t.LayoutTaskType.IntrinsicSizes,deferred:e}),e.promise},i.layoutNextFragment=function(e){if(this.layoutContext.mode===t.LayoutTaskType.IntrinsicSizes)throw Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var i=new h;return this.layoutContext.appendWorkTask({layoutConstraints:e,layoutChild:this,taskType:t.LayoutTaskType.Layout,deferred:i}),i.promise},e}(),f=0,v=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+f++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),p=function(){};p.inputProperties=void 0,p.childrenInputProperties=void 0,p.layoutOptions=void 0;var g=function(t){return void 0===t&&(t=0),new Promise((function(e){setTimeout((function(){e()}),t)}))},m=function(){function e(t,e,i){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=i,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=i}var i=e.prototype;return i.computeLayout=function(){var t=l(a().mark((function t(e,i){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,i);case 4:case"end":return t.stop()}}),t,this)})));return function(e,i){return t.apply(this,arguments)}}(),i.determineAllIntrinsicSizes=function(){var t=l(a().mark((function t(e){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),i.getLayoutDefinitionName=function(e){var i=e.getAllStyle().get(t.PropertyName.LAYOUT);if(!i)throw Error("layout property not found");return i.value},i.determineIntrinsicSizes=function(){var t=l(a().mark((function t(e,i){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(n,e,i);case 3:case"end":return t.stop()}}),t,this)})));return function(e,i){return t.apply(this,arguments)}}(),i.invokeIntrinsicSizesCallback=function(){var e=l(a().mark((function e(i,n,o){var r,u,l,s,c,d,h,y,f,v,p;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.layoutRegistry.getLayout(i),u=new r,l=this.layoutContextFactory({mode:t.LayoutTaskType.IntrinsicSizes}),c=void 0===(s=r.inputProperties)?[]:s,d=[],o.forEach((function(t){var e=l.layoutChildrenFactory({node:t});d.push(e)})),h=this.layoutEdgesFactory({node:n}),y=n.getStyle.apply(n,c),f=u.intrinsicSizes(d,h,y),(v=this.runWorkQueue(f,l.workQueue)).next(),e.next=13,g();case 13:p=v.next().value,l.clearWorkQueue(),n.setIntrisicSizes(p);case 16:case"end":return e.stop()}}),e,this)})));return function(t,i,n){return e.apply(this,arguments)}}(),i.calculateLayout=function(){var t=l(a().mark((function t(e,i,n){var o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(o,e,i,n);case 3:case"end":return t.stop()}}),t,this)})));return function(e,i,n){return t.apply(this,arguments)}}(),i.invokeLayoutCallback=function(){var e=l(a().mark((function e(i,n,o,u){var l,s,c,d,h,y,f,v,p,m,S,T,L;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=this.layoutRegistry.getLayout(i),s=new l,c=this.layoutContextFactory({mode:t.LayoutTaskType.Layout}),h=void 0===(d=l.inputProperties)?[]:d,y=[],o.forEach((function(t){var e=c.layoutChildrenFactory({node:t});y.push(e)})),f=this.layoutEdgesFactory({node:n}),v=n.getStyle.apply(n,h),p=s.layout(y,f,u,v),(m=this.runWorkQueue(p,c.workQueue)).next(),e.next=13,g();case 13:S=m.next().value,c.clearWorkQueue(),T=S instanceof r?S:c.fragmentResultFactory(S),L=c.layoutFragmentFactory({inlineSize:T.inlineSize,blockSize:T.blockSize,data:T.data}),n.setComputedLayout(L),o.forEach((function(t,e){t.setComputedLayout(T.childFragments[e])}));case 19:case"end":return e.stop()}}),e,this)})));return function(t,i,n,o){return e.apply(this,arguments)}}(),i.runWorkQueue=a().mark((function e(i,n){var o,r=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d(i),n.length>0&&o.isPending()&&n.forEach((function(e){e.taskType===t.LayoutTaskType.IntrinsicSizes&&e.deferred.resolve(r.getNodeIntrisicSizes(e.layoutChild.node));if(e.taskType===t.LayoutTaskType.Layout){var i=e.layoutChild,n=e.deferred,o=i.layoutContext,a=r.getNodeFragment(i.node,e.layoutConstraints);n.resolve(o.layoutFragmentFactory(a))}})),void(e.next=4);case 4:if(o.isFulfilled()){e.next=6;break}throw Error("promise not fullfilled!");case 6:return e.abrupt("return",o.getFullFilledValue());case 7:case"end":return e.stop()}}),e)})),i.getNodeIntrisicSizes=function(e){var i,n,o,r,a,u,l,s,c,d,h,y,f=e.getAllStyle();return{minContentInlineSize:(null===(i=f.get(t.PropertyName.MIN_WIDTH))||void 0===i?void 0:i.value)||(null===(n=e.intrisicSizes)||void 0===n?void 0:n.minContentInlineSize)||(null===(o=f.get(t.PropertyName.WIDTH))||void 0===o?void 0:o.value)||0,maxContentInlineSize:(null===(r=f.get(t.PropertyName.MAX_WIDTH))||void 0===r?void 0:r.value)||(null===(a=e.intrisicSizes)||void 0===a?void 0:a.maxContentInlineSize)||(null===(u=f.get(t.PropertyName.WIDTH))||void 0===u?void 0:u.value)||0,minContentBlockSize:(null===(l=f.get(t.PropertyName.MIN_HEIGHT))||void 0===l?void 0:l.value)||(null===(s=e.intrisicSizes)||void 0===s?void 0:s.minContentBlockSize)||(null===(c=f.get(t.PropertyName.HEIGHT))||void 0===c?void 0:c.value)||0,maxContentBlockSize:(null===(d=f.get(t.PropertyName.MAX_HEIGHT))||void 0===d?void 0:d.value)||(null===(h=e.intrisicSizes)||void 0===h?void 0:h.maxContentBlockSize)||(null===(y=f.get(t.PropertyName.HEIGHT))||void 0===y?void 0:y.value)||0}},i.getNodeFragment=function(e,i){var n,o,r,a,u,l;return{inlineSize:(null===(n=e.getComputedLayout())||void 0===n?void 0:n.inlineSize)||(null===(o=e.getAllStyle().get(t.PropertyName.MIN_WIDTH))||void 0===o?void 0:o.value)||(null===(r=e.getAllStyle().get(t.PropertyName.WIDTH))||void 0===r?void 0:r.value)||0,blockSize:(null===(a=e.getComputedLayout())||void 0===a?void 0:a.blockSize)||(null===(u=e.getAllStyle().get(t.PropertyName.MIN_HEIGHT))||void 0===u?void 0:u.value)||(null===(l=e.getAllStyle().get(t.PropertyName.HEIGHT))||void 0===l?void 0:l.value)||0,data:i.data}},e}(),S=1,T=function(){function e(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=S++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var i=e.prototype;return i.setMeasure=function(t){this.measureFn=t},i.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},i.addChild=function(t){var e;null===(e=this.children)||void 0===e||e.push(t)},i.insertChild=function(t,e){this.children.splice(t,0,e)},i.removeChild=function(t){var e,i=null===(e=this.children)||void 0===e?void 0:e.findIndex((function(e){return e.id===t.id}));this.removeChildAtIndex(i)},i.removeChildAtIndex=function(t){this.children.splice(t,1)},i.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},i.setStyle=function(t,e){this.style.set(t,e)},i.getStyle=function(){for(var t=this,e=new Map,i=arguments.length,n=Array(i),o=0;i>o;o++)n[o]=arguments[o];return n.forEach((function(i){var n=t.style.get(i);n&&e.set(i,n)})),e},i.getAllStyle=function(){return this.style},i.markDirty=function(){this.dirty=!0},i.idDirty=function(){return this.dirty},i.getSize=function(){var e,i,n,o;return{width:null!==(e=null===(i=this.style.get(t.PropertyName.WIDTH))||void 0===i?void 0:i.value)&&void 0!==e?e:0,height:null!==(n=null===(o=this.style.get(t.PropertyName.HEIGHT))||void 0===o?void 0:o.value)&&void 0!==n?n:0}},i.computeLayout=function(){var t=l(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,x.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),i.setComputedLayout=function(t){this.computedLayout=t},i.getComputedLayout=function(){return this.computedLayout},i.getAllComputedLayout=function(){},i.toString=function(){return"LayoutObject "+this.id},c(e,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),e}(),L=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(void 0===t&&(t="absolute"),!this.hasLayout(t))throw Error("invalid layout property: "+t);return this.registry.get(t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(e,i){if(""===e)throw new TypeError("layout name cant't be empty");if(t.reservedLayout.includes(e))throw Error("layout name '"+e+"' is a system reserved layout name, please use another name");if(this.hasLayout(e))throw Error("layout '"+e+"' already exist.");this.registry.set(e,i)},e.deleteLayout=function(t){this.registry.delete(t)},c(t,[{key:"size",get:function(){return this.registry.size}}]),t}();L.reservedLayout=[];var x=null;t.AbstractLayoutDefinition=p,t.DefaultLayoutRegistry=L,t.FragmentResult=r,t.LayoutChildren=y,t.LayoutContext=v,t.LayoutEdges=function(e){var i,n,o,r,a,u,l,s,c,d,h,y,f,v,p,g;this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0,this.options=e;var m=e.node.getAllStyle(),S=null!==(i=null===(n=m.get(t.PropertyName.PADDING_TOP))||void 0===n?void 0:n.value)&&void 0!==i?i:0,T=null!==(o=null===(r=m.get(t.PropertyName.PADDING_END))||void 0===r?void 0:r.value)&&void 0!==o?o:0,L=null!==(a=null===(u=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===u?void 0:u.value)&&void 0!==a?a:0,x=null!==(l=null===(s=m.get(t.PropertyName.PADDING_START))||void 0===s?void 0:s.value)&&void 0!==l?l:0,k=null!==(c=null===(d=m.get(t.PropertyName.PADDING_TOP))||void 0===d?void 0:d.value)&&void 0!==c?c:0,I=null!==(h=null===(y=m.get(t.PropertyName.PADDING_END))||void 0===y?void 0:y.value)&&void 0!==h?h:0,w=null!==(f=null===(v=m.get(t.PropertyName.PADDING_BOTTOM))||void 0===v?void 0:v.value)&&void 0!==f?f:0,E=null!==(p=null===(g=m.get(t.PropertyName.PADDING_START))||void 0===g?void 0:g.value)&&void 0!==p?p:0;this.blockStart=S+0+k,this.inlineStart=T+0+I,this.blockEnd=L+0+w,this.inlineEnd=x+0+E,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},t.LayoutEngine=m,t.LayoutFragment=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},t.LayoutObject=T,t.layoutEngine=x,Object.defineProperty(t,"__esModule",{value:!0})}));
|