Initial Commit
This commit is contained in:
commit
d4a69c41be
2748 files changed
+80489
No files matched your search
@@ -0,0 +1,3 @@
|
||||
/*! For license information please see 9645.8b3fb5fc9283c093.js.LICENSE.txt */
|
||||
export const ids=["9645"];export const modules={13725:function(i,t,s){s.r(t),s.d(t,{flow:()=>r,FlowLayout:()=>c});s("92519"),s("42179"),s("89256"),s("24931"),s("88463"),s("57449"),s("19814"),s("39527"),s("41360");class e{constructor(i){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,!0===i?.roundAverageSize&&(this._roundAverageSize=!0)}set(i,t){const s=this._map.get(i)||0;this._map.set(i,t),this.totalSize+=t-s}get averageSize(){if(this._map.size>0){const i=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(i):i}return 0}getSize(i){return this._map.get(i)}clear(){this._map.clear(),this.totalSize=0}}var h=s("97284");const r=i=>Object.assign({type:c},i);function a(i){return"horizontal"===i?"marginLeft":"marginTop"}function o(i){return"horizontal"===i?"marginRight":"marginBottom"}function n(i){return"horizontal"===i?"xOffset":"yOffset"}function _(i,t){const s=[i,t].sort();return s[1]<=0?Math.min(...s):s[0]>=0?Math.max(...s):s[0]+s[1]}class l{constructor(){this._childSizeCache=new e,this._marginSizeCache=new e,this._metricsCache=new Map}update(i,t){const s=new Set;Object.keys(i).forEach((e=>{const r=Number(e);this._metricsCache.set(r,i[r]),this._childSizeCache.set(r,i[r][(0,h.qF)(t)]),s.add(r),s.add(r+1)}));for(const i of s){const s=this._metricsCache.get(i)?.[a(t)]||0,e=this._metricsCache.get(i-1)?.[o(t)]||0;this._marginSizeCache.set(i,_(s,e))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(i,t){return this._metricsCache.get(i)?.[a(t)]||0}getChildSize(i){return this._childSizeCache.getSize(i)}getMarginSize(i){return this._marginSizeCache.getSize(i)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}class c extends h.IE{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new l,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(i){this._metricsCache.update(i,this.direction),this._scheduleReflow()}_getPhysicalItem(i){return this._newPhysicalItems.get(i)??this._physicalItems.get(i)}_getSize(i){return this._getPhysicalItem(i)&&this._metricsCache.getChildSize(i)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(i){const t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+i*(t.averageMarginSize+this._getAverageSize());if(i<this._first){const s=this._first-i;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(s*t.averageChildSize+(s-1)*t.averageMarginSize)}{const s=i-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+s*(t.averageChildSize+t.averageMarginSize)}}_getPosition(i){const t=this._getPhysicalItem(i),{averageMarginSize:s}=this._metricsCache;return 0===i?this._metricsCache.getMarginSize(0)??s:t?t.pos:this._estimatePosition(i)}_calculateAnchor(i,t){return i<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((i+t)/2/this._delta)))}_getAnchor(i,t){if(0===this._physicalItems.size)return this._calculateAnchor(i,t);if(this._first<0)return this._calculateAnchor(i,t);if(this._last<0)return this._calculateAnchor(i,t);const s=this._getPhysicalItem(this._first),e=this._getPhysicalItem(this._last),h=s.pos;if(e.pos+this._metricsCache.getChildSize(this._last)<i)return this._calculateAnchor(i,t);if(h>t)return this._calculateAnchor(i,t);let r=this._firstVisible-1,a=-1/0;for(;a<i;){a=this._getPhysicalItem(++r).pos+this._metricsCache.getChildSize(r)}return r}_getActiveItems(){0===this._viewDim1||0===this.items.length?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const i=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=i,this._stable=!0}_getItems(){const i=this._newPhysicalItems;let t,s;if(this._stable=!0,null!==this.pin){const{index:i}=this.pin;this._anchorIdx=i,this._anchorPos=this._getPosition(i)}if(t=this._scrollPosition-this._overhang,s=this._scrollPosition+this._viewDim1+this._overhang,s<0||t>this._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(t,s),this._anchorPos=this._getPosition(this._anchorIdx));let e=this._getSize(this._anchorIdx);void 0===e&&(this._stable=!1,e=this._getAverageSize());const h=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,r=this._metricsCache.Line truncated
|
||||
//# sourceMappingURL=9645.8b3fb5fc9283c093.js.map
|
||||
Reference in new issue
Block a user