-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.5fb70200103f780f.js
1 lines (1 loc) · 2.35 KB
/
common.5fb70200103f780f.js
1
"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[76],{3801:(C,a,c)=>{c.d(a,{FQ:()=>y,dF:()=>h});var u=c(177),i=c(4438);class p{constructor(s,e){this._document=e;const t=this._textarea=this._document.createElement("textarea"),n=t.style;n.position="fixed",n.top=n.opacity="0",n.left="-999em",t.setAttribute("aria-hidden","true"),t.value=s,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t)}copy(){const s=this._textarea;let e=!1;try{if(s){const t=this._document.activeElement;s.select(),s.setSelectionRange(0,s.value.length),e=this._document.execCommand("copy"),t&&t.focus()}}catch{}return e}destroy(){const s=this._textarea;s&&(s.remove(),this._textarea=void 0)}}let l=(()=>{class o{constructor(e){this._document=e}copy(e){const t=this.beginCopy(e),n=t.copy();return t.destroy(),n}beginCopy(e){return new p(e,this._document)}static#t=this.\u0275fac=function(t){return new(t||o)(i.KVO(u.qQ))};static#e=this.\u0275prov=i.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();const _=new i.nKC("CDK_COPY_TO_CLIPBOARD_CONFIG");let h=(()=>{class o{constructor(e,t,n){this._clipboard=e,this._ngZone=t,this.text="",this.attempts=1,this.copied=new i.bkB,this._pending=new Set,n&&null!=n.attempts&&(this.attempts=n.attempts)}copy(e=this.attempts){if(e>1){let t=e;const n=this._clipboard.beginCopy(this.text);this._pending.add(n);const r=()=>{const d=n.copy();d||! --t||this._destroyed?(this._currentTimeout=null,this._pending.delete(n),n.destroy(),this.copied.emit(d)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(r,1))};r()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(e=>e.destroy()),this._pending.clear(),this._destroyed=!0}static#t=this.\u0275fac=function(t){return new(t||o)(i.rXU(l),i.rXU(i.SKi),i.rXU(_,8))};static#e=this.\u0275dir=i.FsC({type:o,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,n){1&t&&i.bIt("click",function(){return n.copy()})},inputs:{text:[i.Mj6.None,"cdkCopyToClipboard","text"],attempts:[i.Mj6.None,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"},standalone:!0})}return o})(),y=(()=>{class o{static#t=this.\u0275fac=function(t){return new(t||o)};static#e=this.\u0275mod=i.$C({type:o});static#n=this.\u0275inj=i.G2t({})}return o})()}}]);