3 lines
15 KiB
JavaScript
3 lines
15 KiB
JavaScript
|
/*! For license information please see 8614.wL37zvcymaU.js.LICENSE.txt */
|
||
|
export const id=8614;export const ids=[8614,8779,5649];export const modules={82692:(r,e,a)=>{var i=a(43204),s=a(95260),t=a(38103),n=a(5095),o=a(53180),l=a(10694),d=a(86634);class c extends n.oi{constructor(){super(...arguments),this.indeterminate=!1,this.progress=0,this.buffer=1,this.reverse=!1,this.closed=!1,this.stylePrimaryHalf="",this.stylePrimaryFull="",this.styleSecondaryQuarter="",this.styleSecondaryHalf="",this.styleSecondaryFull="",this.animationReady=!0,this.closedAnimationOff=!1,this.resizeObserver=null}connectedCallback(){super.connectedCallback(),this.rootEl&&this.attachResizeObserver()}render(){const r={"mdc-linear-progress--closed":this.closed,"mdc-linear-progress--closed-animation-off":this.closedAnimationOff,"mdc-linear-progress--indeterminate":this.indeterminate,"mdc-linear-progress--animation-ready":this.animationReady},e={"--mdc-linear-progress-primary-half":this.stylePrimaryHalf,"--mdc-linear-progress-primary-half-neg":""!==this.stylePrimaryHalf?`-${this.stylePrimaryHalf}`:"","--mdc-linear-progress-primary-full":this.stylePrimaryFull,"--mdc-linear-progress-primary-full-neg":""!==this.stylePrimaryFull?`-${this.stylePrimaryFull}`:"","--mdc-linear-progress-secondary-quarter":this.styleSecondaryQuarter,"--mdc-linear-progress-secondary-quarter-neg":""!==this.styleSecondaryQuarter?`-${this.styleSecondaryQuarter}`:"","--mdc-linear-progress-secondary-half":this.styleSecondaryHalf,"--mdc-linear-progress-secondary-half-neg":""!==this.styleSecondaryHalf?`-${this.styleSecondaryHalf}`:"","--mdc-linear-progress-secondary-full":this.styleSecondaryFull,"--mdc-linear-progress-secondary-full-neg":""!==this.styleSecondaryFull?`-${this.styleSecondaryFull}`:""},a={"flex-basis":this.indeterminate?"100%":100*this.buffer+"%"},i={transform:this.indeterminate?"scaleX(1)":`scaleX(${this.progress})`};return n.dy` <div role="progressbar" class="mdc-linear-progress ${(0,o.$)(r)}" style="${(0,d.V)(e)}" dir="${(0,l.o)(this.reverse?"rtl":void 0)}" aria-label="${(0,l.o)(this.ariaLabel)}" aria-valuemin="0" aria-valuemax="1" aria-valuenow="${(0,l.o)(this.indeterminate?void 0:this.progress)}" @transitionend="${this.syncClosedState}"> <div class="mdc-linear-progress__buffer"> <div class="mdc-linear-progress__buffer-bar" style="${(0,d.V)(a)}"> </div> <div class="mdc-linear-progress__buffer-dots"></div> </div> <div class="mdc-linear-progress__bar mdc-linear-progress__primary-bar" style="${(0,d.V)(i)}"> <span class="mdc-linear-progress__bar-inner"></span> </div> <div class="mdc-linear-progress__bar mdc-linear-progress__secondary-bar"> <span class="mdc-linear-progress__bar-inner"></span> </div> </div>`}update(r){!r.has("closed")||this.closed&&void 0!==r.get("closed")||this.syncClosedState(),super.update(r)}async firstUpdated(r){super.firstUpdated(r),this.attachResizeObserver()}syncClosedState(){this.closedAnimationOff=this.closed}updated(r){!r.has("indeterminate")&&r.has("reverse")&&this.indeterminate&&this.restartAnimation(),r.has("indeterminate")&&void 0!==r.get("indeterminate")&&this.indeterminate&&window.ResizeObserver&&this.calculateAndSetAnimationDimensions(this.rootEl.offsetWidth),super.updated(r)}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),super.disconnectedCallback()}attachResizeObserver(){if(window.ResizeObserver)return this.resizeObserver=new window.ResizeObserver((r=>{if(this.indeterminate)for(const e of r)if(e.contentRect){const r=e.contentRect.width;this.calculateAndSetAnimationDimensions(r)}})),void this.resizeObserver.observe(this.rootEl);this.resizeObserver=null}calculateAndSetAnimationDimensions(r){const e=.8367142*r,a=2.00611057*r,i=.37651913*r,s=.84386165*r,t=1.60277782*r;this.stylePrimaryHalf=`${e}px`,this.stylePrimaryFull=`${a}px`,this.styleSecondaryQuarter=`${i}px`,this.styleSecondaryHalf=`${s}px`,this.styleSecondaryFull=`${t}px`,this.restartAnimation()}async restartAnimation(){this.animationReady=!1,await this.updateComplete,await new Promise(requestAnimationFrame),this.animationReady=!0,await this.updateComplete}open(){this.closed=!1}close(){this.closed=!0}
|
||
|
//# sourceMappingURL=8614.wL37zvcymaU.js.map
|