-
Notifications
You must be signed in to change notification settings - Fork 0
/
6-es2015.44e085048b11ee3a640b.js
1 lines (1 loc) · 18.8 KB
/
6-es2015.44e085048b11ee3a640b.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{G7lC:function(t,e,n){"use strict";n.r(e),n.d(e,"GuideModule",function(){return G});var i=n("VbQ3"),o=n("An66"),s=n("kZht"),r=n("pTnX"),c=n("5XID"),a=n("ROBh"),l=n("47ST"),h=n("P4Xx"),u=n("bwdy"),m=n("8j5Y"),g=n("YtkY"),p=n("4e/d"),d=n("ruxD"),f=n("7ntQ"),v=n("J+dc"),b=n("6uGs"),_=n("ENSU");const S=["*"];function I(t){return Error(`Unable to find icon with the name "${t}"`)}function C(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function w(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class F{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let R=(()=>{class t{constructor(t,e,n,i){this._httpClient=t,this._sanitizer=e,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass="material-icons",this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,i){return this._addSvgIconConfig(t,e,new F(n,null,i))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,i){const o=this._sanitizer.sanitize(s.J.HTML,n);if(!o)throw w(n);return this._addSvgIconConfig(t,e,new F("",o,i))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new F(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){const i=this._sanitizer.sanitize(s.J.HTML,e);if(!i)throw w(e);return this._addSvgIconSetConfig(t,new F("",i,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(s.J.RESOURCE_URL,t);if(!e)throw C(t);const n=this._cachedIconsByUrl.get(e);return n?Object(a.a)(y(n)):this._loadSvgIconFromConfig(new F(t,null)).pipe(Object(m.a)(t=>this._cachedIconsByUrl.set(e,t)),Object(g.a)(t=>y(t)))}getNamedSvgIcon(t,e=""){const n=E(e,t);let i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);if(i=this._getIconConfigFromResolvers(e,t),i)return this._svgIconConfigs.set(n,i),this._getSvgFromConfig(i);const o=this._iconSetConfigs.get(e);return o?this._getSvgFromIconSetConfigs(t,o):Object(l.a)(I(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Object(a.a)(y(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Object(g.a)(t=>y(t)))}_getSvgFromIconSetConfigs(t,e){const n=this._extractIconWithNameFromAnySet(t,e);if(n)return Object(a.a)(n);const i=e.filter(t=>!t.svgText).map(t=>this._loadSvgIconSetFromConfig(t).pipe(Object(p.a)(e=>{const n=this._sanitizer.sanitize(s.J.RESOURCE_URL,t.url);return this._errorHandler.handleError(new Error(`Loading icon set URL: ${n} failed: ${e.message}`)),Object(a.a)(null)})));return Object(h.a)(i).pipe(Object(g.a)(()=>{const n=this._extractIconWithNameFromAnySet(t,e);if(!n)throw I(t);return n}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){const i=e[n];if(i.svgText&&i.svgText.indexOf(t)>-1){const e=this._svgElementFromConfig(i),n=this._extractSvgIconFromSet(e,t,i.options);if(n)return n}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Object(m.a)(e=>t.svgText=e),Object(g.a)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Object(a.a)(null):this._fetchIcon(t).pipe(Object(m.a)(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){const i=t.querySelector(`[id="${e}"]`);if(!i)return null;const o=i.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,n);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),n);const s=this._svgElementFromString("<svg></svg>");return s.appendChild(o),this._setSvgAttributes(s,n)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){const e=this._svgElementFromString("<svg></svg>"),n=t.attributes;for(let i=0;i<n.length;i++){const{name:t,value:o}=n[i];"id"!==t&&e.setAttribute(t,o)}for(let i=0;i<t.childNodes.length;i++)t.childNodes[i].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[i].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){var e;const{url:n,options:i}=t,o=null!==(e=null==i?void 0:i.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==n)throw Error(`Cannot fetch icon from URL "${n}".`);const r=this._sanitizer.sanitize(s.J.RESOURCE_URL,n);if(!r)throw C(n);const c=this._inProgressUrlFetches.get(r);if(c)return c;const a=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(Object(d.a)(()=>this._inProgressUrlFetches.delete(r)),Object(f.a)());return this._inProgressUrlFetches.set(r,a),a}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(E(t,e),n),this}_addSvgIconSetConfig(t,e){const n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let i=0;i<this._resolvers.length;i++){const o=this._resolvers[i](e,t);if(o)return(n=o).url&&n.options?new F(o.url,null,o.options):new F(o,null)}var n}}return t.\u0275fac=function(e){return new(e||t)(s.Vb(b.a,8),s.Vb(_.b),s.Vb(o.c,8),s.Vb(s.m))},t.\u0275prov=Object(s.Ib)({factory:function(){return new t(Object(s.Vb)(b.a,8),Object(s.Vb)(_.b),Object(s.Vb)(o.c,8),Object(s.Vb)(s.m))},token:t,providedIn:"root"}),t})();function y(t){return t.cloneNode(!0)}function E(t,e){return t+":"+e}class x{constructor(t){this._elementRef=t}}const q=Object(r.h)(x),O=new s.r("mat-icon-location",{providedIn:"root",factory:function(){const t=Object(s.W)(o.c),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),A=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],T=A.map(t=>`[${t}]`).join(", "),N=/^url\(['"]?#(.*?)['"]?\)$/;let M=(()=>{class t extends q{constructor(t,e,n,i,o){super(t),this._iconRegistry=e,this._location=i,this._errorHandler=o,this._inline=!1,this._currentIconFetch=u.a.EMPTY,n||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=Object(c.a)(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let i=0;i<e.length;i++)e[i].textContent+=" ";const n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((e,n)=>{e.forEach(e=>{n.setAttribute(e.name,`url('${t}#${e.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(T),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let i=0;i<e.length;i++)A.forEach(t=>{const o=e[i],s=o.getAttribute(t),r=s?s.match(N):null;if(r){let e=n.get(o);e||(e=[],n.set(o,e)),e.push({name:t,value:r[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(Object(v.a)(1)).subscribe(t=>this._setSvgElement(t),t=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${n}! ${t.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(s.Mb(s.l),s.Mb(R),s.Wb("aria-hidden"),s.Mb(O),s.Mb(s.m))},t.\u0275cmp=s.Gb({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(s.Db("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),s.Eb("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[s.zb],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(s.cc(),s.bc(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})(),k=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.Kb({type:t}),t.\u0275inj=s.Jb({imports:[[r.a],r.a]}),t})();var L=n("1VvW"),j=n("b5Xb"),z=n("M1Zg");function U(t,e){if(1&t&&(s.qc(0,"\n "),s.Rb(1,"span",16),s.qc(2),s.Qb(),s.qc(3,"\n ")),2&t){const t=e.$implicit;s.Cb(2),s.rc("Hello ",t.name,"")}}function $(t,e){if(1&t&&(s.qc(0,"\n "),s.Nb(1,"img",17),s.qc(2)),2&t){const t=e.$implicit;s.Cb(2),s.rc("\n Angular ",t.full,"\n ")}}function Q(t,e){1&t&&s.qc(0," ... ")}function B(t,e){1&t&&s.qc(0,"\n Lorem ipsum, or lipsum as it is sometimes known, is dummy text used in laying out print, graphic or web\n designs. The passage is attributed to an unknown typesetter in the 15th century who is thought to have\n scrambled parts of Cicero's De Finibus Bonorum et Malorum for use in a type specimen book. It usually\n begins with: \u201cLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt\n ut labore et dolore magna aliqua.\u201d The purpose of lorem ipsum is to addTooltipElementToBody a natural\n looking block of text (sentence, paragraph, page, etc.) that doesn't distract from the layout. A\n practice not without controversy, laying out pages with meaningless filler text can be very useful when\n the focus is meant to be on design, not content. The passage experienced a surge in popularity during\n the 1960s when Letraset used it on their dry-transfer sheets, and again during the 90s as desktop\n publishers bundled the text with their software. Today it's seen all around the web; on templates,\n websites, and stock designs. Use our generator to get your own, or read on for the authoritative history\n of lorem ipsum.\n ")}function P(t,e){}const V=function(t){return{$implicit:t}};function W(t,e){if(1&t&&(s.Pb(0),s.qc(1,"\n "),s.oc(2,P,0,0,"ng-template",18),s.qc(3,"\n "),s.Ob()),2&t){const t=e.$implicit;s.ac();const n=s.hc(61);s.Cb(2),s.dc("ngTemplateOutlet",n)("ngTemplateOutletContext",s.fc(2,V,t))}}function D(t,e){1&t&&s.qc(0),2&t&&s.rc("\n ",e.$implicit.isMarked?"Remove from favorite list":"Add to favorite list","\n ")}function H(t,e){if(1&t){const t=s.Sb();s.qc(0,"\n "),s.Rb(1,"div",19),s.qc(2,"\n "),s.Rb(3,"mat-icon",20),s.Yb("click",function(){s.ic(t);const n=e.$implicit;return s.ac().markFavorite(n)}),s.qc(4,"\n star_rate\n "),s.Qb(),s.qc(5,"\n\n "),s.Rb(6,"mat-icon",21),s.Yb("click",function(){s.ic(t);const n=e.$implicit;return s.ac().remove(n)}),s.qc(7,"\n delete\n "),s.Qb(),s.qc(8),s.Qb(),s.qc(9,"\n\n "),s.oc(10,D,1,1,"ng-template",null,22,s.pc),s.qc(12,"\n ")}if(2&t){const t=e.$implicit,n=s.hc(11);s.Cb(3),s.Eb("favorite-line--is-favorite",t.isMarked),s.dc("tooltip",n)("tooltip-context",t),s.Cb(5),s.rc("\n\n ",t.title,"\n ")}}const J=function(){return{name:"Max"}};let Y=(()=>{class t{constructor(t,e){this.zone=t,this.cd=e,this.version=s.P,this.favorites=new Array(1e4).fill(0).map((t,e)=>({id:e+1,title:Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),isMarked:!1}))}markFavorite(t){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.favorites=this.favorites.map(e=>t.id===e.id?Object.assign(Object.assign({},t),{isMarked:!t.isMarked}):e),this.cd.detectChanges()},100)})}remove(t){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.favorites=this.favorites.filter(e=>e.id!==t.id),this.cd.detectChanges()},100)})}}return t.\u0275fac=function(e){return new(e||t)(s.Mb(s.A),s.Mb(s.h))},t.\u0275cmp=s.Gb({type:t,selectors:[["guide"]],decls:65,vars:11,consts:[[1,"wrapper","wrapper--4"],["tooltip","Bottom","tooltip-placement","bottom",1,"cell"],["tooltip","Right","tooltip-placement","right",1,"cell"],["tooltip","Left","tooltip-placement","left",1,"cell"],["tooltip","Top","tooltip-placement","top",1,"cell"],["tooltip-placement","bottom",1,"cell",3,"tooltip","tooltip-context"],["template1",""],["tooltip-placement","right",1,"cell",3,"tooltip","tooltip-context"],["template2",""],["tooltip-placement","left",1,"cell",3,"tooltip"],["template3",""],["tooltip-size","medium","tooltip-placement","top","tooltip-css-style","height: 100px; overflow: auto",1,"cell",3,"tooltip"],["template4",""],["minBufferPx","200","maxBufferPx","200",3,"itemSize"],[4,"cdkVirtualFor","cdkVirtualForOf"],["virtualRef",""],[2,"text-decoration","underline","color","yellow"],["src","assets/img/angular.svg","alt","logo"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"favorite-line"],["tooltip-placement","right",1,"favorite-line--icon",3,"tooltip","tooltip-context","click"],["tooltip","remove element","tooltip-placement","right",3,"click"],["templateRef",""]],template:function(t,e){if(1&t&&(s.Rb(0,"div"),s.qc(1,"\n "),s.Rb(2,"h2"),s.qc(3,"Basic"),s.Qb(),s.qc(4,"\n\n "),s.Rb(5,"div",0),s.qc(6,"\n "),s.Rb(7,"div",1),s.qc(8,"Bottom"),s.Qb(),s.qc(9,"\n "),s.Rb(10,"div",2),s.qc(11,"Right"),s.Qb(),s.qc(12,"\n "),s.Rb(13,"div",3),s.qc(14,"Left"),s.Qb(),s.qc(15,"\n "),s.Rb(16,"div",4),s.qc(17,"Top"),s.Qb(),s.qc(18,"\n "),s.Qb(),s.qc(19,"\n\n "),s.Rb(20,"h2"),s.qc(21,"With ng-template"),s.Qb(),s.qc(22,"\n\n "),s.Rb(23,"div",0),s.qc(24,"\n "),s.Rb(25,"div",5),s.qc(26,"\n Bottom with HTML\n\n "),s.oc(27,U,4,1,"ng-template",null,6,s.pc),s.qc(29,"\n "),s.Qb(),s.qc(30,"\n "),s.Rb(31,"div",7),s.qc(32,"\n Right with HTML\n\n "),s.oc(33,$,3,1,"ng-template",null,8,s.pc),s.qc(35,"\n "),s.Qb(),s.qc(36,"\n "),s.Rb(37,"div",9),s.qc(38,"\n Left with HTML\n\n "),s.oc(39,Q,1,0,"ng-template",null,10,s.pc),s.qc(41,"\n "),s.Qb(),s.qc(42,"\n "),s.Rb(43,"div",11),s.qc(44,"\n Top with HTML\n\n "),s.oc(45,B,1,0,"ng-template",null,12,s.pc),s.qc(47,"\n "),s.Qb(),s.qc(48,"\n "),s.Qb(),s.qc(49,"\n\n "),s.Rb(50,"h2"),s.qc(51,"Example with remove Nodes"),s.Qb(),s.qc(52,"\n\n "),s.Rb(53,"div"),s.qc(54,"\n "),s.Rb(55,"cdk-virtual-scroll-viewport",13),s.qc(56,"\n "),s.oc(57,W,4,4,"ng-container",14),s.qc(58,"\n "),s.Qb(),s.qc(59,"\n\n "),s.oc(60,H,13,5,"ng-template",null,15,s.pc),s.qc(62,"\n "),s.Qb(),s.qc(63,"\n"),s.Qb(),s.qc(64,"\n")),2&t){const t=s.hc(28),n=s.hc(34),i=s.hc(40),o=s.hc(46);s.Cb(25),s.dc("tooltip",t)("tooltip-context",s.ec(10,J)),s.Cb(6),s.dc("tooltip",n)("tooltip-context",e.version),s.Cb(6),s.dc("tooltip",i),s.Cb(6),s.dc("tooltip",o),s.Cb(12),s.lc("height",200,"px"),s.dc("itemSize",24),s.Cb(2),s.dc("cdkVirtualForOf",e.favorites)}},directives:[z.a,i.e,i.a,i.d,o.i,M],encapsulation:2,changeDetection:0}),t})(),G=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.Kb({type:t}),t.\u0275inj=s.Jb({imports:[[o.b,j.a,L.b.forChild([{path:"",component:Y}]),k,i.g]]}),t})()}}]);