%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/graphicd/public_html/vebto/public/client/
Upload File :
Create Path :
Current File : /home/graphicd/public_html/vebto/public/client/123-es2015.724b3495d392b469a4af.js

(self.webpackChunkbedrive2=self.webpackChunkbedrive2||[]).push([[123],{83461:function(e,t,n){"use strict";n.d(t,{Zt:function(){return me},Bh:function(){return pe},Wj:function(){return de},_t:function(){return _e},bA:function(){return z}});var i=n(37716),a=n(38583),s=n(71386),o=n(80521),r=n(39490),l=n(67574),c=n(33637),d=n(26561);function u(e){const{subscriber:t,counter:n,period:i}=e;t.next(n),this.schedule({subscriber:t,counter:n+1,period:i},i)}var p=n(79765),g=n(75319),h=n(61927),m=n(66682),f=n(46782),_=n(39761),b=n(88002),v=n(15257),Z=n(93342),x=n(43190),y=n(70946);function A(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function w(e,t){const n=t?"":"none";A(e.style,{touchAction:t?"":"none",webkitUserDrag:t?"":"none",webkitTapHighlightColor:t?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function C(e,t){const n=e.style;n.position=t?"":"fixed",n.top=n.opacity=t?"":"0",n.left=t?"":"-999em"}function T(e){const t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function q(e,t){return e.getPropertyValue(t).split(",").map(e=>e.trim())}function k(e){const t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}}function M(e,t,n){const{top:i,bottom:a,left:s,right:o}=e;return n>=i&&n<=a&&t>=s&&t<=o}function I(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function U(e,t,n,i){const{top:a,right:s,bottom:o,left:r,width:l,height:c}=e,d=l*t,u=c*t;return i>a-u&&i<o+u&&n>r-d&&n<s+d}class O{constructor(e,t){this._document=e,this._viewportRuler=t,this.positions=new Map}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),e.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:k(e)})})}handleScroll(e){const t=e.target,n=this.positions.get(t);if(!n)return null;const i=t===this._document?t.documentElement:t,a=n.scrollPosition;let s,o;if(t===this._document){const e=this._viewportRuler.getViewportScrollPosition();s=e.top,o=e.left}else s=t.scrollTop,o=t.scrollLeft;const r=a.top-s,l=a.left-o;return this.positions.forEach((e,n)=>{e.clientRect&&t!==n&&i.contains(n)&&I(e.clientRect,r,l)}),a.top=s,a.left=o,{top:r,left:l}}}function D(e){const t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),i=e.nodeName.toLowerCase();t.removeAttribute("id");for(let a=0;a<n.length;a++)n[a].removeAttribute("id");return"canvas"===i?N(e,t):"input"!==i&&"select"!==i&&"textarea"!==i||J(e,t),P("canvas",e,t,N),P("input, textarea, select",e,t,J),t}function P(e,t,n,i){const a=t.querySelectorAll(e);if(a.length){const t=n.querySelectorAll(e);for(let e=0;e<a.length;e++)i(a[e],t[e])}}let S=0;function J(e,t){"file"!==t.type&&(t.value=e.value),"radio"===t.type&&t.name&&(t.name=`mat-clone-${t.name}-${S++}`)}function N(e,t){const n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch(i){}}const R=(0,o.i$)({passive:!0}),Q=(0,o.i$)({passive:!1});class F{constructor(e,t,n,i,a,s){this._config=t,this._document=n,this._ngZone=i,this._viewportRuler=a,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new p.xQ,this._pointerMoveSubscription=g.w.EMPTY,this._pointerUpSubscription=g.w.EMPTY,this._scrollSubscription=g.w.EMPTY,this._resizeSubscription=g.w.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new p.xQ,this.started=new p.xQ,this.released=new p.xQ,this.ended=new p.xQ,this.entered=new p.xQ,this.exited=new p.xQ,this.dropped=new p.xQ,this.moved=this._moveEvents,this._pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){const t=this._handles.find(t=>{const n=e.target;return!!n&&(n===t||t.contains(n))});!t||this._disabledHandles.has(t)||this.disabled||this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)},this._pointerMove=e=>{const t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging){if(Math.abs(t.x-this._pickupPositionOnPage.x)+Math.abs(t.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const t=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),n=this._dropContainer;if(!t)return void this._endDragSequence(e);n&&(n.isDragging()||n.isReceiving())||(e.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(e)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect())),e.preventDefault();const n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{const e=this._activeTransform;e.x=n.x-this._pickupPositionOnPage.x+this._passiveTransform.x,e.y=n.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(e.x,e.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${e.x} ${e.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})},this._pointerUp=e=>{this._endDragSequence(e)},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new O(n,a),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){const t=(0,r.Ig)(e);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>w(e,t)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(e=>(0,r.fI)(e)),this._handles.forEach(e=>w(e,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(e=>{this._handles.indexOf(e)>-1&&t.add(e)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=(0,r.fI)(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,Q),t.addEventListener("touchstart",this._pointerDown,R)}),this._initialTransform=void 0,this._rootElement=t),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?(0,r.fI)(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&L(this._rootElement),L(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),w(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),w(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&L(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&L(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(e))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(e){$(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const e=this._rootElement,n=e.parentNode,i=this._preview=this._createPreviewElement(),a=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),o=this._getShadowRoot();n.insertBefore(s,e),C(e,!1),this._document.body.appendChild(n.replaceChild(a,e)),function(e,t){return t||e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement||e.body}(this._document,o).appendChild(i),this.started.next({source:this}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const n=this.isDragging(),i=$(t),a=!i&&0!==t.button,s=this._rootElement,o=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(t.target&&t.target.draggable&&"mousedown"===t.type&&t.preventDefault(),n||a||o)return;this._handles.length&&(this._rootElementTapHighlight=s.style.webkitTapHighlightColor||"",s.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(e=>{this._updateOnScroll(e)}),this._boundaryElement&&(this._boundaryRect=k(this._boundaryElement));const r=this._previewTemplate;this._pickupPositionInElement=r&&r.template&&!r.matchSize?{x:0,y:0}:this._getPointerPositionInElement(e,t);const l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){C(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const t=this._dropContainer,n=t.getItemIndex(this),i=this._getPointerPositionOnPage(e),a=this._getDragDistance(this._getPointerPositionOnPage(e)),s=t._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:a}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:a}),t.drop(this,n,this._initialIndex,this._initialContainer,s,a),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:i}){let a=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,e,t,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(n,i),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this._preview.style.transform=E(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y)}_createPreviewElement(){const e=this._previewTemplate,t=this.previewClass,n=e?e.template:null;let i;if(n&&e){const t=e.matchSize?this._rootElement.getBoundingClientRect():null,a=e.viewContainer.createEmbeddedView(n,e.context);a.detectChanges(),i=V(a,this._document),this._previewRef=a,e.matchSize?H(i,t):i.style.transform=E(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const e=this._rootElement;i=D(e),H(i,e.getBoundingClientRect())}return A(i.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:`${this._config.zIndex||1e3}`}),w(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(e=>i.classList.add(e)):i.classList.add(t)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=E(e.left,e.top);const t=function(e){const t=getComputedStyle(e),n=q(t,"transition-property"),i=n.find(e=>"transform"===e||"all"===e);if(!i)return 0;const a=n.indexOf(i),s=q(t,"transition-duration"),o=q(t,"transition-delay");return T(s[a])+T(o[a])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(e=>{const n=t=>{(!t||t.target===this._preview&&"transform"===t.propertyName)&&(this._preview.removeEventListener("transitionend",n),e(),clearTimeout(i))},i=setTimeout(n,1.5*t);this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=V(this._placeholderRef,this._document)):n=D(this._rootElement),n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t){const n=this._rootElement.getBoundingClientRect(),i=e===this._rootElement?null:e,a=i?i.getBoundingClientRect():n,s=$(t)?t.targetTouches[0]:t,o=this._getViewportScrollPosition();return{x:a.left-n.left+(s.pageX-a.left-o.left),y:a.top-n.top+(s.pageY-a.top-o.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),n=$(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=n.pageX-t.left,a=n.pageY-t.top;if(this._ownerSVGElement){const e=this._ownerSVGElement.getScreenCTM();if(e){const t=this._ownerSVGElement.createSVGPoint();return t.x=i,t.y=a,t.matrixTransform(e.inverse())}}return{x:i,y:a}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:i}=this.constrainPosition?this.constrainPosition(e,this):e;if("x"===this.lockAxis||"x"===t?i=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==t||(n=this._pickupPositionOnPage.x),this._boundaryRect){const{x:e,y:t}=this._pickupPositionInElement,a=this._boundaryRect,s=this._previewRect,o=a.top+t,r=a.bottom-(s.height-t);n=Y(n,a.left+e,a.right-(s.width-e)),i=Y(i,o,r)}return{x:n,y:i}}_updatePointerDirectionDelta(e){const{x:t,y:n}=e,i=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-a.x),o=Math.abs(n-a.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=t>a.x?1:-1,a.x=t),o>this._config.pointerDirectionChangeThreshold&&(i.y=n>a.y?1:-1,a.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,w(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,Q),e.removeEventListener("touchstart",this._pointerDown,R)}_applyRootElementTransform(e,t){const n=E(e,t);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const n=this._boundaryElement.getBoundingClientRect(),i=this._rootElement.getBoundingClientRect();if(0===n.width&&0===n.height||0===i.width&&0===i.height)return;const a=n.left-i.left,s=i.right-n.right,o=n.top-i.top,r=i.bottom-n.bottom;n.width>i.width?(a>0&&(e+=a),s>0&&(e-=s)):e=0,n.height>i.height?(o>0&&(t+=o),r>0&&(t-=r)):t=0,e===this._passiveTransform.x&&t===this._passiveTransform.y||this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:$(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const n=e.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&I(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const e=this._parentPositions.positions.get(this._document);return e?e.scrollPosition:this._viewportRuler.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,o.kV)(this._rootElement)),this._cachedShadowRoot}}function E(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Y(e,t,n){return Math.max(t,Math.min(n,e))}function L(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function $(e){return"t"===e.type[0]}function V(e,t){const n=e.rootNodes;if(1===n.length&&n[0].nodeType===t.ELEMENT_NODE)return n[0];const i=t.createElement("div");return n.forEach(e=>i.appendChild(e)),i}function H(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=E(t.left,t.top)}function z(e,t,n){const i=B(t,e.length-1),a=B(n,e.length-1);if(i===a)return;const s=e[i],o=a<i?-1:1;for(let r=i;r!==a;r+=o)e[r]=e[r+o];e[a]=s}function B(e,t){return Math.max(0,Math.min(t,e))}class j{constructor(e,t,n,i,a){this._dragDropRegistry=t,this._ngZone=i,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new p.xQ,this.entered=new p.xQ,this.exited=new p.xQ,this.dropped=new p.xQ,this.sorted=new p.xQ,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=g.w.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new p.xQ,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function(e=0,t=c.P){return(!(0,d.k)(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=c.P),new l.y(n=>(n.add(t.schedule(u,e,{subscriber:n,counter:0,period:e})),n))}(0,h.Z).pipe((0,f.R)(this._stopScrollTimers)).subscribe(()=>{const e=this._scrollNode,t=this.autoScrollStep;1===this._verticalScrollDirection?X(e,-t):2===this._verticalScrollDirection&&X(e,t),1===this._horizontalScrollDirection?W(e,-t):2===this._horizontalScrollDirection&&W(e,t)})},this.element=(0,r.fI)(e),this._document=n,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new O(n,a)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,i){let a;this._draggingStarted(),null==i?(a=this.sortingDisabled?this._draggables.indexOf(e):-1,-1===a&&(a=this._getItemIndexFromPointerPosition(e,t,n))):a=i;const s=this._activeDraggables,o=s.indexOf(e),l=e.getPlaceholderElement();let c=s[a];if(c===e&&(c=s[a+1]),o>-1&&s.splice(o,1),c&&!this._dragDropRegistry.isDragging(c)){const t=c.getRootElement();t.parentElement.insertBefore(l,t),s.splice(a,0,e)}else if(this._shouldEnterAsFirstChild(t,n)){const t=s[0].getRootElement();t.parentNode.insertBefore(l,t),s.unshift(e)}else(0,r.fI)(this.element).appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,i,a,s){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:i,isPointerOverContainer:a,distance:s})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(e=>e._withDropContainer(this)),this.isDragging()&&(t.filter(e=>e.isDragging()).every(t=>-1===e.indexOf(t))?this._reset():this._cacheItems()),this}withDirection(e){return this._direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._orientation=e,this}withScrollableParents(e){const t=(0,r.fI)(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?G("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,t=>t.drag===e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,i){if(this.sortingDisabled||!this._clientRect||!U(this._clientRect,.05,t,n))return;const a=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,n,i);if(-1===s&&a.length>0)return;const o="horizontal"===this._orientation,r=G(a,t=>t.drag===e),l=a[s],c=l.clientRect,d=r>s?1:-1,u=this._getItemOffsetPx(a[r].clientRect,c,d),p=this._getSiblingOffsetPx(r,a,d),g=a.slice();z(a,r,s),this.sorted.next({previousIndex:r,currentIndex:s,container:this,item:e}),a.forEach((t,n)=>{if(g[n]===t)return;const i=t.drag===e,a=i?u:p,s=i?e.getPlaceholderElement():t.drag.getRootElement();t.offset+=a,o?(s.style.transform=`translate3d(${Math.round(t.offset)}px, 0, 0)`,I(t.clientRect,0,a)):(s.style.transform=`translate3d(0, ${Math.round(t.offset)}px, 0)`,I(t.clientRect,a,0))}),this._previousSwap.overlaps=M(c,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?i.x:i.y}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,i=0,a=0;if(this._parentPositions.positions.forEach((s,o)=>{o!==this._document&&s.clientRect&&!n&&U(s.clientRect,.05,e,t)&&([i,a]=function(e,t,n,i){const a=K(t,i),s=ee(t,n);let o=0,r=0;if(a){const t=e.scrollTop;1===a?t>0&&(o=1):e.scrollHeight-t>e.clientHeight&&(o=2)}if(s){const t=e.scrollLeft;1===s?t>0&&(r=1):e.scrollWidth-t>e.clientWidth&&(r=2)}return[o,r]}(o,s.clientRect,e,t),(i||a)&&(n=o))}),!i&&!a){const{width:s,height:o}=this._viewportRuler.getViewportSize(),r={width:s,height:o,top:0,right:s,bottom:o,left:0};i=K(r,t),a=ee(r,e),n=window}!n||i===this._verticalScrollDirection&&a===this._horizontalScrollDirection&&n===this._scrollNode||(this._verticalScrollDirection=i,this._horizontalScrollDirection=a,this._scrollNode=n,(i||a)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=(0,r.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const e=(0,r.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}_cacheItemPositions(){const e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(e=>{const t=e.getVisibleElement();return{drag:e,offset:0,clientRect:k(t)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_reset(){this._isDragging=!1;const e=(0,r.fI)(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(e=>{const t=e.getRootElement();t&&(t.style.transform="")}),this._siblings.forEach(e=>e._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(e,t,n){const i="horizontal"===this._orientation,a=t[e].clientRect,s=t[e+-1*n];let o=a[i?"width":"height"]*n;if(s){const e=i?"left":"top",t=i?"right":"bottom";-1===n?o-=s.clientRect[e]-a[t]:o+=a[e]-s.clientRect[t]}return o}_getItemOffsetPx(e,t,n){const i="horizontal"===this._orientation;let a=i?t.left-e.left:t.top-e.top;return-1===n&&(a+=i?t.width-e.width:t.height-e.height),a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){const a=n[n.length-1].clientRect;return i?e>=a.right:t>=a.bottom}{const a=n[0].clientRect;return i?e<=a.left:t<=a.top}}_getItemIndexFromPointerPosition(e,t,n,i){const a="horizontal"===this._orientation,s=G(this._itemPositions,({drag:s,clientRect:o},r,l)=>{if(s===e)return l.length<2;if(i){const e=a?i.x:i.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&e===this._previousSwap.delta)return!1}return a?t>=Math.floor(o.left)&&t<Math.floor(o.right):n>=Math.floor(o.top)&&n<Math.floor(o.bottom)});return-1!==s&&this.sortPredicate(s,e,this)?s:-1}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(e,t){return null!=this._clientRect&&M(this._clientRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(i=>i._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._clientRect||!M(this._clientRect,t,n)||!this.enterPredicate(e,this))return!1;const i=this._getShadowRoot().elementFromPoint(t,n);if(!i)return!1;const a=(0,r.fI)(this.element);return i===a||a.contains(i)}_startReceiving(e,t){const n=this._activeSiblings;!n.has(e)&&t.every(e=>this.enterPredicate(e,this)||this._draggables.indexOf(e)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&(this._itemPositions.forEach(({clientRect:e})=>{I(e,t.top,t.left)}),this._itemPositions.forEach(({drag:e})=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=(0,o.kV)((0,r.fI)(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._activeDraggables.filter(e=>e.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function G(e,t){for(let n=0;n<e.length;n++)if(t(e[n],n,e))return n;return-1}function X(e,t){e===window?e.scrollBy(0,t):e.scrollTop+=t}function W(e,t){e===window?e.scrollBy(t,0):e.scrollLeft+=t}function K(e,t){const{top:n,bottom:i,height:a}=e,s=.05*a;return t>=n-s&&t<=n+s?1:t>=i-s&&t<=i+s?2:0}function ee(e,t){const{left:n,right:i,width:a}=e,s=.05*a;return t>=n-s&&t<=n+s?1:t>=i-s&&t<=i+s?2:0}const te=(0,o.i$)({passive:!1,capture:!0});let ne=(()=>{class e{constructor(e,t){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=e=>e.isDragging(),this.pointerMove=new p.xQ,this.pointerUp=new p.xQ,this.scroll=new p.xQ,this._preventDefaultWhileDragging=e=>{this._activeDragInstances.length>0&&e.preventDefault()},this._persistentTouchmoveListener=e=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))},this._document=t}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,te)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,te)}startDragging(e,t){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const e=t.type.startsWith("touch");this._globalListeners.set(e?"touchend":"mouseup",{handler:e=>this.pointerUp.next(e),options:!0}).set("scroll",{handler:e=>this.scroll.next(e),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:te}),e||this._globalListeners.set("mousemove",{handler:e=>this.pointerMove.next(e),options:te}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((e,t)=>{this._document.addEventListener(t,e.handler,e.options)})})}}stopDragging(e){const t=this._activeDragInstances.indexOf(e);t>-1&&(this._activeDragInstances.splice(t,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,t)=>{this._document.removeEventListener(t,e.handler,e.options)}),this._globalListeners.clear()}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(i.R0b),i.LFG(a.K0))},e.\u0275prov=(0,i.Yz7)({factory:function(){return new e((0,i.LFG)(i.R0b),(0,i.LFG)(a.K0))},token:e,providedIn:"root"}),e})();const ie={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let ae=(()=>{class e{constructor(e,t,n,i){this._document=e,this._ngZone=t,this._viewportRuler=n,this._dragDropRegistry=i}createDrag(e,t=ie){return new F(e,t,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new j(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(a.K0),i.LFG(i.R0b),i.LFG(s.rL),i.LFG(ne))},e.\u0275prov=(0,i.Yz7)({factory:function(){return new e((0,i.LFG)(a.K0),(0,i.LFG)(i.R0b),(0,i.LFG)(s.rL),(0,i.LFG)(ne))},token:e,providedIn:"root"}),e})();const se=new i.OlP("CDK_DRAG_PARENT"),oe=new i.OlP("CdkDropListGroup"),re=new i.OlP("CDK_DRAG_CONFIG");let le=0;const ce=new i.OlP("CdkDropList");let de=(()=>{class e{constructor(t,n,a,s,o,r,l){this.element=t,this._changeDetectorRef=a,this._scrollDispatcher=s,this._dir=o,this._group=r,this._destroyed=new p.xQ,this.connectedTo=[],this.id="cdk-drop-list-"+le++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new i.vpe,this.entered=new i.vpe,this.exited=new i.vpe,this.sorted=new i.vpe,this._unsortedItems=new Set,this._dropListRef=n.createDropList(t),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=(e,t)=>this.enterPredicate(e.data,t.data),this._dropListRef.sortPredicate=(e,t,n)=>this.sortPredicate(e,t.data,n.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),r&&r._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=(0,r.Ig)(e)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,t)=>e._dragRef.getVisibleElement().compareDocumentPosition(t._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe((0,_.O)(this._dir.value),(0,f.R)(this._destroyed)).subscribe(e=>t.withDirection(e)),t.beforeStarted.subscribe(()=>{const n=(0,r.Eq)(this.connectedTo).map(t=>"string"==typeof t?e._dropLists.find(e=>e.id===t):t);if(this._group&&this._group._items.forEach(e=>{-1===n.indexOf(e)&&n.push(e)}),!this._scrollableParentsResolved){const e=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(e=>e.getElementRef().nativeElement);this._dropListRef.withScrollableParents(e),this._scrollableParentsResolved=!0}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=(0,r.Ig)(this.sortingDisabled),t.autoScrollDisabled=(0,r.Ig)(this.autoScrollDisabled),t.autoScrollStep=(0,r.su)(this.autoScrollStep,2),t.connectedTo(n.filter(e=>e&&e!==this).map(e=>e._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(e=>{this.entered.emit({container:this,item:e.item.data,currentIndex:e.currentIndex})}),e.exited.subscribe(e=>{this.exited.emit({container:this,item:e.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(e=>{this.sorted.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,container:this,item:e.item.data})}),e.dropped.subscribe(e=>{this.dropped.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,previousContainer:e.previousContainer.data,container:e.container.data,item:e.item.data,isPointerOverContainer:e.isPointerOverContainer,distance:e.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(e){const{lockAxis:t,draggingDisabled:n,sortingDisabled:i,listAutoScrollDisabled:a,listOrientation:s}=e;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=a&&a,this.orientation=s||"vertical",t&&(this.lockAxis=t)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq),i.Y36(ae),i.Y36(i.sBO),i.Y36(s.mF),i.Y36(y.Is,8),i.Y36(oe,12),i.Y36(re,8))},e.\u0275dir=i.lG2({type:e,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,t){2&e&&(i.uIk("id",t.id),i.ekj("cdk-drop-list-disabled",t.disabled)("cdk-drop-list-dragging",t._dropListRef.isDragging())("cdk-drop-list-receiving",t._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[i._Bn([{provide:oe,useValue:void 0},{provide:ce,useExisting:e}])]}),e._dropLists=[],e})();const ue=new i.OlP("CdkDragHandle");let pe=(()=>{class e{constructor(e,t){this.element=e,this._stateChanges=new p.xQ,this._disabled=!1,this._parentDrag=t}get disabled(){return this._disabled}set disabled(e){this._disabled=(0,r.Ig)(e),this._stateChanges.next(this)}ngOnDestroy(){this._stateChanges.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq),i.Y36(se,12))},e.\u0275dir=i.lG2({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[i._Bn([{provide:ue,useExisting:e}])]}),e})();const ge=new i.OlP("CdkDragPlaceholder"),he=new i.OlP("CdkDragPreview");let me=(()=>{class e{constructor(t,n,a,s,o,r,c,d,u,g,h){this.element=t,this.dropContainer=n,this._ngZone=s,this._viewContainerRef=o,this._dir=c,this._changeDetectorRef=u,this._selfHandle=g,this._parentDrag=h,this._destroyed=new p.xQ,this.started=new i.vpe,this.released=new i.vpe,this.ended=new i.vpe,this.entered=new i.vpe,this.exited=new i.vpe,this.dropped=new i.vpe,this.moved=new l.y(e=>{const t=this._dragRef.moved.pipe((0,b.U)(e=>({source:this,pointerPosition:e.pointerPosition,event:e.event,delta:e.delta,distance:e.distance}))).subscribe(e);return()=>{t.unsubscribe()}}),this._dragRef=d.createDrag(t,{dragStartThreshold:r&&null!=r.dragStartThreshold?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&null!=r.pointerDirectionChangeThreshold?r.pointerDirectionChangeThreshold:5,zIndex:null==r?void 0:r.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=(0,r.Ig)(e),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe((0,v.q)(1),(0,f.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe((0,_.O)(this._handles),(0,Z.b)(e=>{const t=e.filter(e=>e._parentDrag===this).map(e=>e.element);this._selfHandle&&this.rootElementSelector&&t.push(this.element),this._dragRef.withHandles(t)}),(0,x.w)(e=>(0,m.T)(...e.map(e=>e._stateChanges.pipe((0,_.O)(e))))),(0,f.R)(this._destroyed)).subscribe(e=>{const t=this._dragRef,n=e.element.nativeElement;e.disabled?t.disableHandle(n):t.enableHandle(n)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(e){const t=e.rootElementSelector,n=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const t=e._dragInstances.indexOf(this);t>-1&&e._dragInstances.splice(t,1),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const e=this.element.nativeElement,t=this.rootElementSelector?fe(e,this.rootElementSelector):e;this._dragRef.withRootElement(t||e)}_getBoundaryElement(){const e=this.boundaryElement;return e?"string"==typeof e?fe(this.element.nativeElement,e):(0,r.fI)(e):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const e=this._dir,n=this.dragStartDelay,i=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof n&&n?n:(0,r.su)(n),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(i).withPreviewTemplate(a),e&&t.withDirection(e.value)}}),t.beforeStarted.pipe((0,v.q)(1)).subscribe(()=>{var n,i;if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let a=this.element.nativeElement.parentElement;for(;a;){if(null===(n=a.classList)||void 0===n?void 0:n.contains("cdk-drag")){t.withParent((null===(i=e._dragInstances.find(e=>e.element.nativeElement===a))||void 0===i?void 0:i._dragRef)||null);break}a=a.parentElement}})}_handleEvents(e){e.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(()=>{this.released.emit({source:this})}),e.ended.subscribe(e=>{this.ended.emit({source:this,distance:e.distance}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(e=>{this.entered.emit({container:e.container.data,item:this,currentIndex:e.currentIndex})}),e.exited.subscribe(e=>{this.exited.emit({container:e.container.data,item:this})}),e.dropped.subscribe(e=>{this.dropped.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,previousContainer:e.previousContainer.data,container:e.container.data,isPointerOverContainer:e.isPointerOverContainer,item:this,distance:e.distance})})}_assignDefaults(e){const{lockAxis:t,dragStartDelay:n,constrainPosition:i,previewClass:a,boundaryElement:s,draggingDisabled:o,rootElementSelector:r}=e;this.disabled=null!=o&&o,this.dragStartDelay=n||0,t&&(this.lockAxis=t),i&&(this.constrainPosition=i),a&&(this.previewClass=a),s&&(this.boundaryElement=s),r&&(this.rootElementSelector=r)}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq),i.Y36(ce,12),i.Y36(a.K0),i.Y36(i.R0b),i.Y36(i.s_b),i.Y36(re,8),i.Y36(y.Is,8),i.Y36(ae),i.Y36(i.sBO),i.Y36(ue,10),i.Y36(se,12))},e.\u0275dir=i.lG2({type:e,selectors:[["","cdkDrag",""]],contentQueries:function(e,t,n){if(1&e&&(i.Suo(n,he,5),i.Suo(n,ge,5),i.Suo(n,ue,5)),2&e){let e;i.iGM(e=i.CRH())&&(t._previewTemplate=e.first),i.iGM(e=i.CRH())&&(t._placeholderTemplate=e.first),i.iGM(e=i.CRH())&&(t._handles=e)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,t){2&e&&i.ekj("cdk-drag-disabled",t.disabled)("cdk-drag-dragging",t._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[i._Bn([{provide:se,useExisting:e}]),i.TTD]}),e._dragInstances=[],e})();function fe(e,t){let n=e.parentElement;for(;n;){if(n.matches?n.matches(t):n.msMatchesSelector(t))return n;n=n.parentElement}return null}let _e=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e}),e.\u0275inj=i.cJS({providers:[ae],imports:[s.ZD]}),e})()},21554:function(e,t,n){"use strict";n.d(t,{XC:function(){return N},Bb:function(){return L},ZL:function(){return Y}});var i=n(19238),a=n(39490),s=n(80521),o=n(37716),r=n(72458),l=n(75319),c=n(79765),d=n(41439),u=n(66682),p=n(25917),g=n(22759),h=n(38583),m=n(90625),f=n(71386),_=n(36461),b=n(87636),v=n(3679),Z=n(98295),x=n(15257),y=n(43190),A=n(45435),w=n(88002),C=n(93342),T=n(71289),q=n(70946);const k=["panel"];function M(e,t){if(1&e&&(o.TgZ(0,"div",0,1),o.Hsn(2),o.qZA()),2&e){const e=t.id,n=o.oxw();o.Q6J("id",n.id)("ngClass",n._classList),o.uIk("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(e))}}const I=["*"];let U=0;class O{constructor(e,t){this.source=e,this.option=t}}class D{}const P=(0,r.Kr)(D),S=new o.OlP("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});let J=(()=>{class e extends P{constructor(e,t,n,i){super(),this._changeDetectorRef=e,this._elementRef=t,this._activeOptionChanges=l.w.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new o.vpe,this.opened=new o.vpe,this.closed=new o.vpe,this.optionActivated=new o.vpe,this._classList={},this.id="mat-autocomplete-"+U++,this.inertGroups=(null==i?void 0:i.SAFARI)||!1,this._autoActiveFirstOption=!!n.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=(0,a.Ig)(e)}set classList(e){this._classList=e&&e.length?(0,a.du)(e).reduce((e,t)=>(e[t]=!0,e),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new i.s1(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){const t=new O(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){return this.ariaLabel?null:this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(S),o.Y36(s.t4))},e.\u0275dir=o.lG2({type:e,viewQuery:function(e,t){if(1&e&&(o.Gf(o.Rgc,7),o.Gf(k,5)),2&e){let e;o.iGM(e=o.CRH())&&(t.template=e.first),o.iGM(e=o.CRH())&&(t.panel=e.first)}},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[o.qOj]}),e})(),N=(()=>{class e extends J{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=o.n5z(e)))(n||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(e,t,n){if(1&e&&(o.Suo(n,r.K7,5),o.Suo(n,r.ey,5)),2&e){let e;o.iGM(e=o.CRH())&&(t.optionGroups=e),o.iGM(e=o.CRH())&&(t.options=e)}},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[o._Bn([{provide:r.HF,useExisting:e}]),o.qOj],ngContentSelectors:I,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(e,t){1&e&&(o.F$t(),o.YNc(0,M,3,4,"ng-template"))},directives:[h.mk],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"],encapsulation:2,changeDetection:0}),e})();const R=new o.OlP("mat-autocomplete-scroll-strategy"),Q={provide:R,deps:[m.aV],useFactory:function(e){return()=>e.scrollStrategies.reposition()}},F={provide:v.JU,useExisting:(0,o.Gpc)(()=>Y),multi:!0};let E=(()=>{class e{constructor(e,t,n,i,a,s,o,r,p,g,h){this._element=e,this._overlay=t,this._viewContainerRef=n,this._zone=i,this._changeDetectorRef=a,this._dir=o,this._formField=r,this._document=p,this._viewportRuler=g,this._defaults=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=l.w.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new c.xQ,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=(0,d.P)(()=>this.autocomplete&&this.autocomplete.options?(0,u.T)(...this.autocomplete.options.map(e=>e.onSelectionChange)):this._zone.onStable.pipe((0,x.q)(1),(0,y.w)(()=>this.optionSelections))),this._scrollStrategy=s}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=(0,a.Ig)(e)}ngAfterViewInit(){const e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const e=this._getWindow();void 0!==e&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return(0,u.T)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe((0,A.h)(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe((0,A.h)(()=>this._overlayAttached)):(0,p.of)()).pipe((0,w.U)(e=>e instanceof r.rN?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return(0,u.T)((0,g.R)(this._document,"click"),(0,g.R)(this._document,"auxclick"),(0,g.R)(this._document,"touchend")).pipe((0,A.h)(e=>{const t=this._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,n=this._formField?this._formField._elementRef.nativeElement:null,i=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&t!==this._element.nativeElement&&(!n||!n.contains(t))&&(!i||!i.contains(t))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(t)}))}writeValue(e){Promise.resolve(null).then(()=>this._setTriggerValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){const t=e.keyCode;if(t!==_.hY||(0,_.Vb)(e)||e.preventDefault(),this.activeOption&&t===_.K5&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){const n=this.autocomplete._keyManager.activeItem,i=t===_.LH||t===_.JH;this.panelOpen||t===_.Mf?this.autocomplete._keyManager.onKeydown(e):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}_handleInput(e){let t=e.target,n=t.value;"number"===t.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const e=this._zone.onStable.pipe((0,x.q)(1)),t=this.autocomplete.options.changes.pipe((0,C.b)(()=>this._positionStrategy.reapplyLastPosition()),(0,T.g)(0));return(0,u.T)(e,t).pipe((0,y.w)(()=>{const e=this.panelOpen;return this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&(this._overlayRef.updatePosition(),e!==this.panelOpen&&this.autocomplete.opened.emit()),this.panelClosingActions}),(0,x.q)(1)).subscribe(e=>this._setValueAndClose(e))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(e){const t=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e,n=null!=t?t:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}_setValueAndClose(e){e&&e.source&&(this._clearPreviousSelectedOption(e.source),this._setTriggerValue(e.source.value),this._onChange(e.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(e.source)),this.closePanel()}_clearPreviousSelectedOption(e){this.autocomplete.options.forEach(t=>{t!==e&&t.selected&&t.deselect()})}_attachOverlay(){var e;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!(0,s.kV)(this._element.nativeElement));let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new b.UE(this.autocomplete.template,this._viewContainerRef,{id:null===(e=this._formField)||void 0===e?void 0:e.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,t.keydownEvents().subscribe(e=>{(e.keyCode===_.hY&&!(0,_.Vb)(e)||e.keyCode===_.LH&&(0,_.Vb)(e,"altKey"))&&(this._resetActiveItem(),this._closeKeyEventStream.next(),e.stopPropagation(),e.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})})),t&&!t.hasAttached()&&(t.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const n=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&n!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){var e;return new m.X_({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(e=this._defaults)||void 0===e?void 0:e.overlayPanelClass})}_getOverlayPosition(){const e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){const t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],n=this._aboveClass,i=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:n},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:n}];let a;a="above"===this.position?i:"below"===this.position?t:[...t,...i],e.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const e=this.autocomplete;e.autoActiveFirstOption?e._keyManager.setFirstItemActive():e._keyManager.setActiveItem(-1)}_canOpen(){const e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){var e;return(null===(e=this._document)||void 0===e?void 0:e.defaultView)||window}_scrollToOption(e){const t=this.autocomplete,n=(0,r.CB)(e,t.options,t.optionGroups);if(0===e&&1===n)t._setScrollTop(0);else if(t.panel){const n=t.options.toArray()[e];if(n){const e=n._getHostElement(),i=(0,r.jH)(e.offsetTop,e.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(i)}}}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(m.aV),o.Y36(o.s_b),o.Y36(o.R0b),o.Y36(o.sBO),o.Y36(R),o.Y36(q.Is,8),o.Y36(Z.G_,9),o.Y36(h.K0,8),o.Y36(f.rL),o.Y36(S,8))},e.\u0275dir=o.lG2({type:e,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[o.TTD]}),e})(),Y=(()=>{class e extends E{constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=o.n5z(e)))(n||e)}}(),e.\u0275dir=o.lG2({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(e,t){1&e&&o.NdJ("focusin",function(){return t._handleFocus()})("blur",function(){return t._onTouched()})("input",function(e){return t._handleInput(e)})("keydown",function(e){return t._handleKeydown(e)}),2&e&&o.uIk("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-owns",t.autocompleteDisabled||!t.panelOpen||null==t.autocomplete?null:t.autocomplete.id)("aria-haspopup",!t.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[o._Bn([F]),o.qOj]}),e})(),L=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[Q],imports:[[m.U8,r.Ng,r.BQ,h.ez],f.ZD,r.Ng,r.BQ]}),e})()},58341:function(e,t,n){"use strict";n.d(t,{HS:function(){return T},oH:function(){return S},qn:function(){return D},qH:function(){return q},Hi:function(){return N}});var i=n(36461),a=n(37716),s=n(72458),o=n(39490),r=n(38583),l=n(46237),c=n(79765),d=n(66682),u=n(15257),p=n(46782),g=n(39761),h=n(19238),m=n(38345),f=n(98295),_=n(80521),b=n(70946),v=n(3679);const Z=["*"],x=new a.OlP("MatChipRemove"),y=new a.OlP("MatChipAvatar"),A=new a.OlP("MatChipTrailingIcon");class w{constructor(e){this._elementRef=e}}const C=(0,s.sb)((0,s.pj)((0,s.Kr)(w),"primary"),-1);let T=(()=>{class e extends C{constructor(e,t,n,i,o,r,l,d){super(e),this._elementRef=e,this._ngZone=t,this._changeDetectorRef=o,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new c.xQ,this._onBlur=new c.xQ,this.selectionChange=new a.vpe,this.destroyed=new a.vpe,this.removed=new a.vpe,this._addHostClassName(),this._chipRippleTarget=r.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new s.IR(this,t,this._chipRippleTarget,n),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=i||{},this._animationsDisabled="NoopAnimations"===l,this.tabIndex=null!=d&&parseInt(d)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const t=(0,o.Ig)(e);t!==this._selected&&(this._selected=t,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=(0,o.Ig)(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=(0,o.Ig)(e)}get removable(){return this._removable}set removable(e){this._removable=(0,o.Ig)(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e=this._elementRef.nativeElement;e.hasAttribute("mat-basic-chip")||"mat-basic-chip"===e.tagName.toLowerCase()?e.classList.add("mat-basic-chip"):e.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled?e.preventDefault():e.stopPropagation()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case i.yY:case i.ZH:this.remove(),e.preventDefault();break;case i.L_:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,u.q)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return e.\u0275fac=function(t){return new(t||e)(a.Y36(a.SBq),a.Y36(a.R0b),a.Y36(_.t4),a.Y36(s.Y2,8),a.Y36(a.sBO),a.Y36(r.K0),a.Y36(l.Qb,8),a.$8M("tabindex"))},e.\u0275dir=a.lG2({type:e,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,t,n){if(1&e&&(a.Suo(n,y,5),a.Suo(n,A,5),a.Suo(n,x,5)),2&e){let e;a.iGM(e=a.CRH())&&(t.avatar=e.first),a.iGM(e=a.CRH())&&(t.trailingIcon=e.first),a.iGM(e=a.CRH())&&(t.removeIcon=e.first)}},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(e,t){1&e&&a.NdJ("click",function(e){return t._handleClick(e)})("keydown",function(e){return t._handleKeydown(e)})("focus",function(){return t.focus()})("blur",function(){return t._blur()}),2&e&&(a.uIk("tabindex",t.disabled?null:t.tabIndex)("disabled",t.disabled||null)("aria-disabled",t.disabled.toString())("aria-selected",t.ariaSelected),a.ekj("mat-chip-selected",t.selected)("mat-chip-with-avatar",t.avatar)("mat-chip-with-trailing-icon",t.trailingIcon||t.removeIcon)("mat-chip-disabled",t.disabled)("_mat-animation-noopable",t._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[a.qOj]}),e})(),q=(()=>{class e{constructor(e,t){this._parentChip=e,"BUTTON"===t.nativeElement.nodeName&&t.nativeElement.setAttribute("type","button")}_handleClick(e){const t=this._parentChip;t.removable&&!t.disabled&&t.remove(),e.stopPropagation()}}return e.\u0275fac=function(t){return new(t||e)(a.Y36(T),a.Y36(a.SBq))},e.\u0275dir=a.lG2({type:e,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(e,t){1&e&&a.NdJ("click",function(e){return t._handleClick(e)})},features:[a._Bn([{provide:x,useExisting:e}])]}),e})();const k=new a.OlP("mat-chips-default-options");class M{constructor(e,t,n,i){this._defaultErrorStateMatcher=e,this._parentForm=t,this._parentFormGroup=n,this.ngControl=i}}const I=(0,s.FD)(M);let U=0;class O{constructor(e,t){this.source=e,this.value=t}}let D=(()=>{class e extends I{constructor(e,t,n,i,s,o,r){super(o,i,s,r),this._elementRef=e,this._changeDetectorRef=t,this._dir=n,this.ngControl=r,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new c.xQ,this._uid="mat-chip-list-"+U++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(e,t)=>e===t,this._required=!1,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new a.vpe,this.valueChange=new a.vpe,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get role(){return this.empty?null:"listbox"}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,o.Ig)(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required}set required(e){this._required=(0,o.Ig)(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=(0,o.Ig)(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=(0,o.Ig)(e),this.chips&&this.chips.forEach(e=>e.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return(0,d.T)(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return(0,d.T)(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return(0,d.T)(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return(0,d.T)(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new h.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,p.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe((0,p.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,g.O)(null),(0,p.R)(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new m.Ov(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){this._ariaDescribedby=e.join(" ")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const t=e.target;e.keyCode===i.ZH&&this._isInputEmpty(t)?(this._keyManager.setLastItemActive(),e.preventDefault()):t&&t.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&e<this.chips.length}_isInputEmpty(e){return!(!e||"input"!==e.nodeName.toLowerCase()||e.value)}_setSelectionByValue(e,t=!0){if(this._clearSelection(),this.chips.forEach(e=>e.deselect()),Array.isArray(e))e.forEach(e=>this._selectValue(e,t)),this._sortValues();else{const n=this._selectValue(e,t);n&&t&&this._keyManager.setActiveItem(n)}}_selectValue(e,t=!0){const n=this.chips.find(t=>null!=t.value&&this._compareWith(t.value,e));return n&&(t?n.selectViaInteraction():n.select(),this._selectionModel.select(n)),n}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(t=>{t!==e&&t.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let t=null;t=Array.isArray(this.selected)?this.selected.map(e=>e.value):this.selected?this.selected.value:e,this._value=t,this.change.emit(new O(this,t)),this.valueChange.emit(t),this._onChange(t),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(e=>{!this._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let t=this.chips.toArray().indexOf(e.chip);this._isValidIndex(t)&&this._keyManager.updateActiveItem(t),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const t=e.chip,n=this.chips.toArray().indexOf(e.chip);this._isValidIndex(n)&&t._hasFocus&&(this._lastDestroyedChipIndex=n)})}_originatesFromChip(e){let t=e.target;for(;t&&t!==this._elementRef.nativeElement;){if(t.classList.contains("mat-chip"))return!0;t=t.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return e.\u0275fac=function(t){return new(t||e)(a.Y36(a.SBq),a.Y36(a.sBO),a.Y36(b.Is,8),a.Y36(v.F,8),a.Y36(v.sg,8),a.Y36(s.rD),a.Y36(v.a5,10))},e.\u0275cmp=a.Xpm({type:e,selectors:[["mat-chip-list"]],contentQueries:function(e,t,n){if(1&e&&a.Suo(n,T,5),2&e){let e;a.iGM(e=a.CRH())&&(t.chips=e)}},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(e,t){1&e&&a.NdJ("focus",function(){return t.focus()})("blur",function(){return t._blur()})("keydown",function(e){return t._keydown(e)}),2&e&&(a.Ikx("id",t._uid),a.uIk("tabindex",t.disabled?null:t._tabIndex)("aria-describedby",t._ariaDescribedby||null)("aria-required",t.role?t.required:null)("aria-disabled",t.disabled.toString())("aria-invalid",t.errorState)("aria-multiselectable",t.multiple)("role",t.role)("aria-orientation",t.ariaOrientation),a.ekj("mat-chip-list-disabled",t.disabled)("mat-chip-list-invalid",t.errorState)("mat-chip-list-required",t.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[a._Bn([{provide:f.Eo,useExisting:e}]),a.qOj],ngContentSelectors:Z,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,t){1&e&&(a.F$t(),a.TgZ(0,"div",0),a.Hsn(1),a.qZA())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),e})(),P=0,S=(()=>{class e{constructor(e,t){this._elementRef=e,this._defaultOptions=t,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new a.vpe,this.placeholder="",this.id="mat-chip-list-input-"+P++,this._disabled=!1,this._inputElement=this._elementRef.nativeElement}set chipList(e){e&&(this._chipList=e,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){this._addOnBlur=(0,o.Ig)(e)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(e){this._disabled=(0,o.Ig)(e)}get empty(){return!this._inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}_keydown(e){e&&e.keyCode===i.Mf&&!(0,i.Vb)(e,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(e)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._chipList.stateChanges.next()}_emitChipEnd(e){!this._inputElement.value&&e&&this._chipList._keydown(e),e&&!this._isSeparatorKey(e)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),e&&e.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(e){this._inputElement.focus(e)}_isSeparatorKey(e){return!(0,i.Vb)(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}}return e.\u0275fac=function(t){return new(t||e)(a.Y36(a.SBq),a.Y36(k))},e.\u0275dir=a.lG2({type:e,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(e,t){1&e&&a.NdJ("keydown",function(e){return t._keydown(e)})("blur",function(){return t._blur()})("focus",function(){return t._focus()})("input",function(){return t._onInput()}),2&e&&(a.Ikx("id",t.id),a.uIk("disabled",t.disabled||null)("placeholder",t.placeholder||null)("aria-invalid",t._chipList&&t._chipList.ngControl?t._chipList.ngControl.invalid:null)("aria-required",t._chipList&&t._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[a.TTD]}),e})();const J={separatorKeyCodes:[i.K5]};let N=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({providers:[s.rD,{provide:k,useValue:J}],imports:[[s.BQ]]}),e})()},90171:function(e,t,n){"use strict";n.d(t,{pp:function(){return L},To:function(){return $},ib:function(){return Q},VG:function(){return F},yz:function(){return E},yK:function(){return Y}});var i=n(37716),a=n(39490),s=n(79765),o=n(75319),r=n(38345);let l=0;const c=new i.OlP("CdkAccordion");let d=(()=>{class e{constructor(){this._stateChanges=new s.xQ,this._openCloseAllActions=new s.xQ,this.id="cdk-accordion-"+l++,this._multi=!1}get multi(){return this._multi}set multi(e){this._multi=(0,a.Ig)(e)}openAll(){this._multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.lG2({type:e,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[i._Bn([{provide:c,useExisting:e}]),i.TTD]}),e})(),u=0,p=(()=>{class e{constructor(e,t,n){this.accordion=e,this._changeDetectorRef=t,this._expansionDispatcher=n,this._openCloseAllSubscription=o.w.EMPTY,this.closed=new i.vpe,this.opened=new i.vpe,this.destroyed=new i.vpe,this.expandedChange=new i.vpe,this.id="cdk-accordion-child-"+u++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=n.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(e){e=(0,a.Ig)(e),this._expanded!==e&&(this._expanded=e,this.expandedChange.emit(e),e?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){this._disabled=(0,a.Ig)(e)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(c,12),i.Y36(i.sBO),i.Y36(r.A8))},e.\u0275dir=i.lG2({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[i._Bn([{provide:c,useValue:void 0}])]}),e})(),g=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e}),e.\u0275inj=i.cJS({}),e})();var h=n(87636),m=n(38583),f=n(72458),_=n(19238),b=n(87519),v=n(39761),Z=n(45435),x=n(15257),y=n(36461),A=n(46237),w=n(59193),C=n(66682),T=n(17238);const q=["body"];function k(e,t){}const M=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],I=["mat-expansion-panel-header","*","mat-action-row"];function U(e,t){if(1&e&&i._UZ(0,"span",2),2&e){const e=i.oxw();i.Q6J("@indicatorRotate",e._getExpandedState())}}const O=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],D=["mat-panel-title","mat-panel-description","*"],P=new i.OlP("MAT_ACCORDION"),S={indicatorRotate:(0,T.X$)("indicatorRotate",[(0,T.SB)("collapsed, void",(0,T.oB)({transform:"rotate(0deg)"})),(0,T.SB)("expanded",(0,T.oB)({transform:"rotate(180deg)"})),(0,T.eR)("expanded <=> collapsed, void => collapsed",(0,T.jt)("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:(0,T.X$)("bodyExpansion",[(0,T.SB)("collapsed, void",(0,T.oB)({height:"0px",visibility:"hidden"})),(0,T.SB)("expanded",(0,T.oB)({height:"*",visibility:"visible"})),(0,T.eR)("expanded <=> collapsed, void => collapsed",(0,T.jt)("225ms cubic-bezier(0.4,0.0,0.2,1)"))])};let J=(()=>{class e{constructor(e){this._template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.Rgc))},e.\u0275dir=i.lG2({type:e,selectors:[["ng-template","matExpansionPanelContent",""]]}),e})(),N=0;const R=new i.OlP("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let Q=(()=>{class e extends p{constructor(e,t,n,a,o,r,l){super(e,t,n),this._viewContainerRef=a,this._animationMode=r,this._hideToggle=!1,this.afterExpand=new i.vpe,this.afterCollapse=new i.vpe,this._inputChanges=new s.xQ,this._headerId="mat-expansion-panel-header-"+N++,this._bodyAnimationDone=new s.xQ,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe((0,b.x)((e,t)=>e.fromState===t.fromState&&e.toState===t.toState)).subscribe(e=>{"void"!==e.fromState&&("expanded"===e.toState?this.afterExpand.emit():"collapsed"===e.toState&&this.afterCollapse.emit())}),l&&(this.hideToggle=l.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=(0,a.Ig)(e)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this.opened.pipe((0,v.O)(null),(0,Z.h)(()=>this.expanded&&!this._portal),(0,x.q)(1)).subscribe(()=>{this._portal=new h.UE(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(P,12),i.Y36(i.sBO),i.Y36(r.A8),i.Y36(i.s_b),i.Y36(m.K0),i.Y36(A.Qb,8),i.Y36(R,8))},e.\u0275cmp=i.Xpm({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(e,t,n){if(1&e&&i.Suo(n,J,5),2&e){let e;i.iGM(e=i.CRH())&&(t._lazyContent=e.first)}},viewQuery:function(e,t){if(1&e&&i.Gf(q,5),2&e){let e;i.iGM(e=i.CRH())&&(t._body=e.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,t){2&e&&i.ekj("mat-expanded",t.expanded)("_mat-animation-noopable","NoopAnimations"===t._animationMode)("mat-expansion-panel-spacing",t._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[i._Bn([{provide:P,useValue:void 0}]),i.qOj,i.TTD],ngContentSelectors:I,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(e,t){1&e&&(i.F$t(M),i.Hsn(0),i.TgZ(1,"div",0,1),i.NdJ("@bodyExpansion.done",function(e){return t._bodyAnimationDone.next(e)}),i.TgZ(3,"div",2),i.Hsn(4,1),i.YNc(5,k,0,0,"ng-template",3),i.qZA(),i.Hsn(6,2),i.qZA()),2&e&&(i.xp6(1),i.Q6J("@bodyExpansion",t._getExpandedState())("id",t.id),i.uIk("aria-labelledby",t._headerId),i.xp6(4),i.Q6J("cdkPortalOutlet",t._portal))},directives:[h.Pl],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[S.bodyExpansion]},changeDetection:0}),e})(),F=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.lG2({type:e,selectors:[["mat-action-row"]],hostAttrs:[1,"mat-action-row"]}),e})(),E=(()=>{class e{constructor(e,t,n,i,a,s){this.panel=e,this._element=t,this._focusMonitor=n,this._changeDetectorRef=i,this._animationMode=s,this._parentChangeSubscription=o.w.EMPTY;const r=e.accordion?e.accordion._stateChanges.pipe((0,Z.h)(e=>!(!e.hideToggle&&!e.togglePosition))):w.E;this._parentChangeSubscription=(0,C.T)(e.opened,e.closed,r,e._inputChanges.pipe((0,Z.h)(e=>!!(e.hideToggle||e.disabled||e.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe((0,Z.h)(()=>e._containsFocus())).subscribe(()=>n.focusVia(t,"program")),a&&(this.expandedHeight=a.expandedHeight,this.collapsedHeight=a.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case y.L_:case y.K5:(0,y.Vb)(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(Q,1),i.Y36(i.SBq),i.Y36(_.tE),i.Y36(i.sBO),i.Y36(R,8),i.Y36(A.Qb,8))},e.\u0275cmp=i.Xpm({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(e,t){1&e&&i.NdJ("click",function(){return t._toggle()})("keydown",function(e){return t._keydown(e)}),2&e&&(i.uIk("id",t.panel._headerId)("tabindex",t.disabled?-1:0)("aria-controls",t._getPanelId())("aria-expanded",t._isExpanded())("aria-disabled",t.panel.disabled),i.Udp("height",t._getHeaderHeight()),i.ekj("mat-expanded",t._isExpanded())("mat-expansion-toggle-indicator-after","after"===t._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===t._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===t._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:D,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,t){1&e&&(i.F$t(O),i.TgZ(0,"span",0),i.Hsn(1),i.Hsn(2,1),i.Hsn(3,2),i.qZA(),i.YNc(4,U,1,1,"span",1)),2&e&&(i.xp6(4),i.Q6J("ngIf",t._showToggle()))},directives:[m.O5],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true])::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;border:3px solid;border-radius:4px;content:""}\n'],encapsulation:2,data:{animation:[S.indicatorRotate]},changeDetection:0}),e})(),Y=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.lG2({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),e})(),L=(()=>{class e extends d{constructor(){super(...arguments),this._ownHeaders=new i.n_E,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(e){this._hideToggle=(0,a.Ig)(e)}ngAfterContentInit(){this._headers.changes.pipe((0,v.O)(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(e=>e.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new _.Em(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._ownHeaders.destroy()}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=i.n5z(e)))(n||e)}}(),e.\u0275dir=i.lG2({type:e,selectors:[["mat-accordion"]],contentQueries:function(e,t,n){if(1&e&&i.Suo(n,E,5),2&e){let e;i.iGM(e=i.CRH())&&(t._headers=e)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(e,t){2&e&&i.ekj("mat-accordion-multi",t.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[i._Bn([{provide:P,useExisting:e}]),i.qOj]}),e})(),$=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e}),e.\u0275inj=i.cJS({imports:[[m.ez,f.BQ,g,h.eL]]}),e})()},98295:function(e,t,n){"use strict";n.d(t,{G_:function(){return l},Eo:function(){return r},lN:function(){return c}});var i=n(18553),a=n(38583),s=n(37716),o=n(72458);n(39490),n(79765),n(66682),n(22759),n(39761),n(46782),n(15257),n(17238),n(46237),n(70946),n(80521);let r=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=s.lG2({type:e}),e})();const l=new s.OlP("MatFormField");let c=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[a.ez,o.BQ,i.Q8],o.BQ]}),e})()},82613:function(e,t,n){"use strict";n.d(t,{U0:function(){return A},VQ:function(){return v},Fk:function(){return w}});var i=n(37716),a=n(72458),s=n(39490),o=n(3679),r=n(46237),l=n(19238),c=n(38345);const d=["input"],u=function(){return{enterDuration:150}},p=["*"],g=new i.OlP("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});let h=0;const m={provide:o.JU,useExisting:(0,i.Gpc)(()=>v),multi:!0};class f{constructor(e,t){this.source=e,this.value=t}}const _=new i.OlP("MatRadioGroup");let b=(()=>{class e{constructor(e){this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+h++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new i.vpe}get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition="before"===e?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=(0,s.Ig)(e),this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=(0,s.Ig)(e),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(e=>{e.checked=this.value===e.value,e.checked&&(this._selected=e)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new f(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.sBO))},e.\u0275dir=i.lG2({type:e,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),e})(),v=(()=>{class e extends b{}return e.\u0275fac=function(){let t;return function(n){return(t||(t=i.n5z(e)))(n||e)}}(),e.\u0275dir=i.lG2({type:e,selectors:[["mat-radio-group"]],contentQueries:function(e,t,n){if(1&e&&i.Suo(n,A,5),2&e){let e;i.iGM(e=i.CRH())&&(t._radios=e)}},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[i._Bn([m,{provide:_,useExisting:e}]),i.qOj]}),e})();class Z{constructor(e){this._elementRef=e}}const x=(0,a.Kr)((0,a.sb)(Z));let y=(()=>{class e extends x{constructor(e,t,n,a,o,r,l,c){super(t),this._changeDetector=n,this._focusMonitor=a,this._radioDispatcher=o,this._animationMode=r,this._providerOverride=l,this._uniqueId="mat-radio-"+ ++h,this.id=this._uniqueId,this.change=new i.vpe,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=e,c&&(this.tabIndex=(0,s.su)(c,0)),this._removeUniqueSelectionListener=o.listen((e,t)=>{e!==this.id&&t===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(e){const t=(0,s.Ig)(e);this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(e){this._setDisabled((0,s.Ig)(e))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=(0,s.Ig)(e)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}focus(e,t){t?this._focusMonitor.focusVia(this._inputElement,t,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new f(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputChange(e){e.stopPropagation();const t=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),t&&this.radioGroup._emitChangeEvent())}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(b),i.Y36(i.SBq),i.Y36(i.sBO),i.Y36(l.tE),i.Y36(c.A8),i.Y36(String),i.Y36(void 0),i.Y36(String))},e.\u0275dir=i.lG2({type:e,viewQuery:function(e,t){if(1&e&&i.Gf(d,5),2&e){let e;i.iGM(e=i.CRH())&&(t._inputElement=e.first)}},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[i.qOj]}),e})(),A=(()=>{class e extends y{constructor(e,t,n,i,a,s,o,r){super(e,t,n,i,a,s,o,r)}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(_,8),i.Y36(i.SBq),i.Y36(i.sBO),i.Y36(l.tE),i.Y36(c.A8),i.Y36(r.Qb,8),i.Y36(g,8),i.$8M("tabindex"))},e.\u0275cmp=i.Xpm({type:e,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(e,t){1&e&&i.NdJ("focus",function(){return t._inputElement.nativeElement.focus()}),2&e&&(i.uIk("tabindex",null)("id",t.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),i.ekj("mat-radio-checked",t.checked)("mat-radio-disabled",t.disabled)("_mat-animation-noopable","NoopAnimations"===t._animationMode)("mat-primary","primary"===t.color)("mat-accent","accent"===t.color)("mat-warn","warn"===t.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[i.qOj],ngContentSelectors:p,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(e,t){if(1&e&&(i.F$t(),i.TgZ(0,"label",0,1),i.TgZ(2,"span",2),i._UZ(3,"span",3),i._UZ(4,"span",4),i.TgZ(5,"input",5,6),i.NdJ("change",function(e){return t._onInputChange(e)})("click",function(e){return t._onInputClick(e)}),i.qZA(),i.TgZ(7,"span",7),i._UZ(8,"span",8),i.qZA(),i.qZA(),i.TgZ(9,"span",9),i.TgZ(10,"span",10),i._uU(11,"\xa0"),i.qZA(),i.Hsn(12),i.qZA(),i.qZA()),2&e){const e=i.MAs(1);i.uIk("for",t.inputId),i.xp6(5),i.Q6J("id",t.inputId)("checked",t.checked)("disabled",t.disabled)("tabIndex",t.tabIndex)("required",t.required),i.uIk("name",t.name)("value",t.value)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby),i.xp6(2),i.Q6J("matRippleTrigger",e)("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",i.DdM(18,u)),i.xp6(2),i.ekj("mat-radio-label-before","before"==t.labelPosition)}},directives:[a.wG],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),e})(),w=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e}),e.\u0275inj=i.cJS({imports:[[a.si,a.BQ],a.BQ]}),e})()},45396:function(e,t,n){"use strict";n.d(t,{Rr:function(){return x},rP:function(){return A}});var i=n(18553),a=n(37716),s=n(72458),o=n(39490),r=n(3679),l=n(46237),c=n(19238);const d=["thumbContainer"],u=["toggleBar"],p=["input"],g=function(){return{enterDuration:150}},h=["*"],m=new a.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let f=0;const _={provide:r.JU,useExisting:(0,a.Gpc)(()=>x),multi:!0};class b{constructor(e,t){this.source=e,this.checked=t}}class v{constructor(e){this._elementRef=e}}const Z=(0,s.sb)((0,s.pj)((0,s.Kr)((0,s.Id)(v)),"accent"));let x=(()=>{class e extends Z{constructor(e,t,n,i,s,o){super(e),this._focusMonitor=t,this._changeDetectorRef=n,this.defaults=s,this._animationMode=o,this._onChange=e=>{},this._onTouched=()=>{},this._uniqueId="mat-slide-toggle-"+ ++f,this._required=!1,this._checked=!1,this.name=null,this.id=this._uniqueId,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new a.vpe,this.toggleChange=new a.vpe,this.tabIndex=parseInt(i)||0}get required(){return this._required}set required(e){this._required=(0,o.Ig)(e)}get checked(){return this._checked}set checked(e){this._checked=(0,o.Ig)(e),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{"keyboard"===e||"program"===e?this._inputElement.nativeElement.focus():e||Promise.resolve().then(()=>this._onTouched())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onChangeEvent(e){e.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(e){e.stopPropagation()}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}focus(e,t){t?this._focusMonitor.focusVia(this._inputElement,t,e):this._inputElement.nativeElement.focus(e)}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(new b(this,this.checked))}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return e.\u0275fac=function(t){return new(t||e)(a.Y36(a.SBq),a.Y36(c.tE),a.Y36(a.sBO),a.$8M("tabindex"),a.Y36(m),a.Y36(l.Qb,8))},e.\u0275cmp=a.Xpm({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(e,t){if(1&e&&(a.Gf(d,5),a.Gf(u,5),a.Gf(p,5)),2&e){let e;a.iGM(e=a.CRH())&&(t._thumbEl=e.first),a.iGM(e=a.CRH())&&(t._thumbBarEl=e.first),a.iGM(e=a.CRH())&&(t._inputElement=e.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(e,t){2&e&&(a.Ikx("id",t.id),a.uIk("tabindex",t.disabled?null:-1)("aria-label",null)("aria-labelledby",null),a.ekj("mat-checked",t.checked)("mat-disabled",t.disabled)("mat-slide-toggle-label-before","before"==t.labelPosition)("_mat-animation-noopable","NoopAnimations"===t._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[a._Bn([_]),a.qOj],ngContentSelectors:h,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(e,t){if(1&e&&(a.F$t(),a.TgZ(0,"label",0,1),a.TgZ(2,"div",2,3),a.TgZ(4,"input",4,5),a.NdJ("change",function(e){return t._onChangeEvent(e)})("click",function(e){return t._onInputClick(e)}),a.qZA(),a.TgZ(6,"div",6,7),a._UZ(8,"div",8),a.TgZ(9,"div",9),a._UZ(10,"div",10),a.qZA(),a.qZA(),a.qZA(),a.TgZ(11,"span",11,12),a.NdJ("cdkObserveContent",function(){return t._onLabelTextChange()}),a.TgZ(13,"span",13),a._uU(14,"\xa0"),a.qZA(),a.Hsn(15),a.qZA(),a.qZA()),2&e){const e=a.MAs(1),n=a.MAs(12);a.uIk("for",t.inputId),a.xp6(2),a.ekj("mat-slide-toggle-bar-no-side-margin",!n.textContent||!n.textContent.trim()),a.xp6(2),a.Q6J("id",t.inputId)("required",t.required)("tabIndex",t.tabIndex)("checked",t.checked)("disabled",t.disabled),a.uIk("name",t.name)("aria-checked",t.checked.toString())("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby),a.xp6(5),a.Q6J("matRippleTrigger",e)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",a.DdM(17,g))}},directives:[s.wG,i.wD],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),e})(),y=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({}),e})(),A=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({imports:[[y,s.si,s.BQ,i.Q8],y,s.BQ]}),e})()},95439:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,a,s;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(a=i;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=i;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,s[a]))return!1;for(a=i;0!=a--;){var o=s[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},39426:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var i=n(77393),a=n(33637);const s={leading:!0,trailing:!1};function o(e,t=a.P,n=s){return i=>i.lift(new r(e,t,n.leading,n.trailing))}class r{constructor(e,t,n,i){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=i}call(e,t){return t.subscribe(new l(e,this.duration,this.scheduler,this.leading,this.trailing))}}class l extends i.L{constructor(e,t,n,i,a){super(e),this.duration=t,this.scheduler=n,this.leading=i,this.trailing=a,this._hasTrailingValue=!1,this._trailingValue=null}_next(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)}}function c(e){const{subscriber:t}=e;t.clearThrottle()}},98123:function(e,t,n){"use strict";n.r(t),n.d(t,{AppAdminModule:function(){return Yd}});var i=n(38583),a=n(3679),s=n(37716),o=n(90299),r=n(63423);let l=(()=>{class e{constructor(e,t){this.http=e,this.router=t}resolve(e){return this.http.get("settings").toPromise().then(e=>e,()=>(this.router.navigate(["/admin"]),!1))}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(o.r),s.LFG(r.F0))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var c=n(26215);let d=(()=>{class e{constructor(){this.loading$=new c.X(!1),this.errors$=new c.X({}),this.initial={server:{},client:{}},this.server={},this.client={}}getModified(){return{server:this.diffSettingObjects("server"),client:this.diffSettingObjects("client")}}diffSettingObjects(e){const t={};for(const n in this[e])this[e][n]!==this.initial[e][n]&&(t[n]=this[e][n]);return t}setAll(e){this.initial=e,this.client=Object.assign({},e.client),this.server=Object.assign({},e.server)}reset(){this.server=Object.assign({},this.initial.server),this.client=Object.assign({},this.initial.client)}updateInitial(e){this.initial={client:Object.assign(Object.assign({},this.initial.client),e.client),server:Object.assign(Object.assign({},this.initial.server),e.server)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var u=n(21554),p=n(51095),g=n(7539),h=n(58341),m=n(22238),f=n(80521),_=n(39490),b=(n(59193),n(79765));n(22759),n(80013),n(46782);let v=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[f.ud]]}),e})();var Z=n(72458),x=n(98295);const y=new s.OlP("MAT_INPUT_VALUE_ACCESSOR");let A=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({providers:[Z.rD],imports:[[v,x.lN,Z.BQ],v,x.lN]}),e})();var w=n(33935),C=n(12178),T=n(45396),q=n(77001),k=n(11436),M=n(49866);let I=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,a.UX,M.N]]}),e})();var U=n(87738),O=n(65939),D=n(82613),P=n(76627),S=n(98097);const J=new s.OlP("RECAPTCHA_ACTIONS");var N=n(6008);let R=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({providers:[l,d,{provide:J,multi:!0,useValue:[{name:"Registration Recaptcha",key:"recaptcha.enable_for_registration",description:"Enable recaptcha integration for registration page."},{name:"Contact Recaptcha",key:"recaptcha.enable_for_contact",description:'Enable recaptcha integration for "contact us" page.'}]}],imports:[[r.Bz,i.ez,a.u5,a.UX,I,U.G,M.N,S.X,N.b,p.ot,P.Ps,q.ZX,g.p9,k.AV,m.Is,w.Tx,T.rP,u.Bb,A,h.Hi,C.Cv,O.Nh,D.Fk],U.G]}),e})(),Q=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,a.u5,a.UX,M.N,p.ot,q.ZX,g.p9,k.AV,m.Is,w.Tx,P.Ps]]}),e})();var F=n(19238),E=n(90625),Y=n(87636),L=n(71386),$=n(75319),V=n(66682),H=n(25917),z=n(36461),B=n(15257),j=n(39761),G=n(45435),X=n(17238),W=n(70946);const K=["mat-calendar-body",""];function ee(e,t){if(1&e&&(s.TgZ(0,"tr",2),s.TgZ(1,"td",3),s._uU(2),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Udp("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),s.uIk("colspan",e.numCols),s.xp6(1),s.hij(" ",e.label," ")}}function te(e,t){if(1&e&&(s.TgZ(0,"td",7),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.Udp("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),s.uIk("colspan",e._firstRowOffset),s.xp6(1),s.hij(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function ne(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",8),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw(2)._cellClicked(n,t)}),s.TgZ(1,"div",9),s._uU(2),s.qZA(),s._UZ(3,"div",10),s.qZA()}if(2&e){const e=t.$implicit,n=t.index,i=s.oxw().index,a=s.oxw();s.Udp("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),s.ekj("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",a._isActiveCell(i,n))("mat-calendar-body-range-start",a._isRangeStart(e.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",a._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(e.compareValue,i,n))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(e.compareValue,i,n))("mat-calendar-body-comparison-start",a._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",a._isInPreview(e.compareValue)),s.Q6J("ngClass",e.cssClasses)("tabindex",a._isActiveCell(i,n)?0:-1),s.uIk("data-mat-row",i)("data-mat-col",n)("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-selected",a._isSelected(e.compareValue)),s.xp6(1),s.ekj("mat-calendar-body-selected",a._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",a.todayValue===e.compareValue),s.xp6(1),s.hij(" ",e.displayValue," ")}}function ie(e,t){if(1&e&&(s.TgZ(0,"tr",4),s.YNc(1,te,2,6,"td",5),s.YNc(2,ne,4,46,"td",6),s.qZA()),2&e){const e=t.$implicit,n=t.index,i=s.oxw();s.xp6(1),s.Q6J("ngIf",0===n&&i._firstRowOffset),s.xp6(1),s.Q6J("ngForOf",e)}}function ae(e,t){if(1&e&&(s.TgZ(0,"th",5),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.uIk("aria-label",e.long),s.xp6(1),s.Oqu(e.narrow)}}const se=["*"];function oe(e,t){}function re(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-month-view",5),s.NdJ("activeDateChange",function(t){return s.CHM(e),s.oxw().activeDate=t})("_userSelection",function(t){return s.CHM(e),s.oxw()._dateSelected(t)}),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("activeDate",e.activeDate)("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)}}function le(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-year-view",6),s.NdJ("activeDateChange",function(t){return s.CHM(e),s.oxw().activeDate=t})("monthSelected",function(t){return s.CHM(e),s.oxw()._monthSelectedInYearView(t)})("selectedChange",function(t){return s.CHM(e),s.oxw()._goToDateInView(t,"month")}),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("activeDate",e.activeDate)("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function ce(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-multi-year-view",7),s.NdJ("activeDateChange",function(t){return s.CHM(e),s.oxw().activeDate=t})("yearSelected",function(t){return s.CHM(e),s.oxw()._yearSelectedInMultiYearView(t)})("selectedChange",function(t){return s.CHM(e),s.oxw()._goToDateInView(t,"year")}),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("activeDate",e.activeDate)("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function de(e,t){}const ue=["button"];function pe(e,t){1&e&&(s.O4$(),s.TgZ(0,"svg",3),s._UZ(1,"path",4),s.qZA())}const ge=[[["","matDatepickerToggleIcon",""]]],he=["[matDatepickerToggleIcon]"];let me=(()=>{class e{constructor(){this.changes=new b.xQ,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(e,t){return`${e} \u2013 ${t}`}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=(0,s.Yz7)({factory:function(){return new e},token:e,providedIn:"root"}),e})();class fe{constructor(e,t,n,i,a={},s=e,o){this.value=e,this.displayValue=t,this.ariaLabel=n,this.enabled=i,this.cssClasses=a,this.compareValue=s,this.rawValue=o}}let _e=(()=>{class e{constructor(e,t){this._elementRef=e,this._ngZone=t,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new s.vpe,this.previewChange=new s.vpe,this._enterHandler=e=>{if(this._skipNextFocus&&"focus"===e.type)this._skipNextFocus=!1;else if(e.target&&this.isRange){const t=this._getCellFromElement(e.target);t&&this._ngZone.run(()=>this.previewChange.emit({value:t.enabled?t:null,event:e}))}},this._leaveHandler=e=>{null!==this.previewEnd&&this.isRange&&e.target&&be(e.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e}))},t.runOutsideAngular(()=>{const t=e.nativeElement;t.addEventListener("mouseenter",this._enterHandler,!0),t.addEventListener("focus",this._enterHandler,!0),t.addEventListener("mouseleave",this._leaveHandler,!0),t.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(e,t){e.enabled&&this.selectedValueChange.emit({value:e.value,event:t})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){const t=e.numCols,{rows:n,numCols:i}=this;(e.rows||t)&&(this._firstRowOffset=n&&n.length&&n[0].length?i-n[0].length:0),(e.cellAspectRatio||t||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/i+"%"),!t&&this._cellWidth||(this._cellWidth=100/i+"%")}ngOnDestroy(){const e=this._elementRef.nativeElement;e.removeEventListener("mouseenter",this._enterHandler,!0),e.removeEventListener("focus",this._enterHandler,!0),e.removeEventListener("mouseleave",this._leaveHandler,!0),e.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(e,t){let n=e*this.numCols+t;return e&&(n-=this._firstRowOffset),n==this.activeCell}_focusActiveCell(e=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,B.q)(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");t&&(e||(this._skipNextFocus=!0),t.focus())})})}_isRangeStart(e){return ve(e,this.startValue,this.endValue)}_isRangeEnd(e){return Ze(e,this.startValue,this.endValue)}_isInRange(e){return xe(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return ve(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,t,n){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let i=this.rows[t][n-1];if(!i){const e=this.rows[t-1];i=e&&e[e.length-1]}return i&&!this._isRangeEnd(i.compareValue)}_isComparisonBridgeEnd(e,t,n){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let i=this.rows[t][n+1];if(!i){const e=this.rows[t+1];i=e&&e[0]}return i&&!this._isRangeStart(i.compareValue)}_isComparisonEnd(e){return Ze(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return xe(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return ve(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return Ze(e,this.previewStart,this.previewEnd)}_isInPreview(e){return xe(e,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(e){let t;if(be(e)?t=e:be(e.parentNode)&&(t=e.parentNode),t){const e=t.getAttribute("data-mat-row"),n=t.getAttribute("data-mat-col");if(e&&n)return this.rows[parseInt(e)][parseInt(n)]}return null}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(s.R0b))},e.\u0275cmp=s.Xpm({type:e,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[s.TTD],attrs:K,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(e,t){1&e&&(s.YNc(0,ee,3,6,"tr",0),s.YNc(1,ie,3,2,"tr",1)),2&e&&(s.Q6J("ngIf",t._firstRowOffset<t.labelMinRequiredCells),s.xp6(1),s.Q6J("ngForOf",t.rows))},directives:[i.O5,i.sg,i.mk],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.mat-datepicker-dialog .mat-dialog-container{position:relative;overflow:visible}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),e})();function be(e){return"TD"===e.nodeName}function ve(e,t,n){return null!==n&&t!==n&&e<n&&e===t}function Ze(e,t,n){return null!==t&&t!==n&&e>=t&&e===n}function xe(e,t,n,i){return i&&null!==t&&null!==n&&t!==n&&e>=t&&e<=n}class ye{constructor(e,t){this.start=e,this.end=t}}let Ae=(()=>{class e{constructor(e,t){this.selection=e,this._adapter=t,this._selectionChanged=new b.xQ,this.selectionChanged=this._selectionChanged,this.selection=e}updateSelection(e,t){const n=this.selection;this.selection=e,this._selectionChanged.next({selection:e,source:t,oldValue:n})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)}clone(){return null}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(void 0),s.LFG(Z._A))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac}),e})(),we=(()=>{class e extends Ae{constructor(e){super(null,e)}add(e){super.updateSelection(e,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}clone(){const t=new e(this._adapter);return t.updateSelection(this.selection,this),t}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(Z._A))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac}),e})();const Ce={provide:Ae,deps:[[new s.FiY,new s.tp0,Ae],Z._A],useFactory:function(e,t){return e||new we(t)}},Te=new s.OlP("MAT_DATE_RANGE_SELECTION_STRATEGY");let qe=(()=>{class e{constructor(e,t,n,i,a){this._changeDetectorRef=e,this._dateFormats=t,this._dateAdapter=n,this._dir=i,this._rangeStrategy=a,this._rerenderSubscription=$.w.EMPTY,this.selectedChange=new s.vpe,this._userSelection=new s.vpe,this.activeDateChange=new s.vpe,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(e){const t=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(t,this._activeDate)||this._init()}get selected(){return this._selected}set selected(e){this._selected=e instanceof ye?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,j.O)(null)).subscribe(()=>this._init())}ngOnChanges(e){const t=e.comparisonStart||e.comparisonEnd;t&&!t.firstChange&&this._setRanges(this.selected)}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(e){const t=e.value,n=this._dateAdapter.getYear(this.activeDate),i=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(n,i,t);let s,o;this._selected instanceof ye?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===t&&o===t||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:e.event}),this._previewStart=this._previewEnd=null,this._changeDetectorRef.markForCheck()}_handleCalendarBodyKeydown(e){const t=this._activeDate,n=this._isRtl();switch(e.keyCode){case z.oh:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case z.SV:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case z.LH:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case z.JH:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case z.Sd:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case z.uR:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case z.Ku:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case z.VM:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case z.K5:case z.L_:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:e}),e.preventDefault()));case z.hY:return void(null==this._previewEnd||(0,z.Vb)(e)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:e}),e.preventDefault(),e.stopPropagation()));default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),e.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(e){this._matCalendarBody._focusActiveCell(e)}_previewChanged({event:e,value:t}){if(this._rangeStrategy){const n=this._rangeStrategy.createPreview(t?t.rawValue:null,this.selected,e);this._previewStart=this._getCellCompareValue(n.start),this._previewEnd=this._getCellCompareValue(n.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const e=this._dateAdapter.getFirstDayOfWeek(),t=this._dateAdapter.getDayOfWeekNames("narrow");let n=this._dateAdapter.getDayOfWeekNames("long").map((e,n)=>({long:e,narrow:t[n]}));this._weekdays=n.slice(e).concat(n.slice(0,e))}_createWeekCells(){const e=this._dateAdapter.getNumDaysInMonth(this.activeDate),t=this._dateAdapter.getDateNames();this._weeks=[[]];for(let n=0,i=this._firstWeekOffset;n<e;n++,i++){7==i&&(this._weeks.push([]),i=0);const e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),n+1),a=this._shouldEnableDate(e),s=this._dateAdapter.format(e,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(e,"month"):void 0;this._weeks[this._weeks.length-1].push(new fe(n+1,t[n],s,a,o,this._getCellCompareValue(e),e))}}_shouldEnableDate(e){return!!e&&(!this.minDate||this._dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(e))}_getDateInCurrentMonth(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null}_hasSameMonthAndYear(e,t){return!(!e||!t||this._dateAdapter.getMonth(e)!=this._dateAdapter.getMonth(t)||this._dateAdapter.getYear(e)!=this._dateAdapter.getYear(t))}_getCellCompareValue(e){if(e){const t=this._dateAdapter.getYear(e),n=this._dateAdapter.getMonth(e),i=this._dateAdapter.getDate(e);return new Date(t,n,i).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(e){e instanceof ye?(this._rangeStart=this._getCellCompareValue(e.start),this._rangeEnd=this._getCellCompareValue(e.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(e),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.sBO),s.Y36(Z.sG,8),s.Y36(Z._A,8),s.Y36(W.Is,8),s.Y36(Te,8))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-month-view"]],viewQuery:function(e,t){if(1&e&&s.Gf(_e,5),2&e){let e;s.iGM(e=s.CRH())&&(t._matCalendarBody=e.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[s.TTD],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(e,t){1&e&&(s.TgZ(0,"table",0),s.TgZ(1,"thead",1),s.TgZ(2,"tr"),s.YNc(3,ae,2,2,"th",2),s.qZA(),s.TgZ(4,"tr"),s._UZ(5,"th",3),s.qZA(),s.qZA(),s.TgZ(6,"tbody",4),s.NdJ("selectedValueChange",function(e){return t._dateSelected(e)})("previewChange",function(e){return t._previewChanged(e)})("keydown",function(e){return t._handleCalendarBodyKeydown(e)}),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngForOf",t._weekdays),s.xp6(3),s.Q6J("label",t._monthLabel)("rows",t._weeks)("todayValue",t._todayDate)("startValue",t._rangeStart)("endValue",t._rangeEnd)("comparisonStart",t._comparisonRangeStart)("comparisonEnd",t._comparisonRangeEnd)("previewStart",t._previewStart)("previewEnd",t._previewEnd)("isRange",t._isRange)("labelMinRequiredCells",3)("activeCell",t._dateAdapter.getDate(t.activeDate)-1))},directives:[i.sg,_e],encapsulation:2,changeDetection:0}),e})(),ke=(()=>{class e{constructor(e,t,n){this._changeDetectorRef=e,this._dateAdapter=t,this._dir=n,this._rerenderSubscription=$.w.EMPTY,this.selectedChange=new s.vpe,this.yearSelected=new s.vpe,this.activeDateChange=new s.vpe,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(e){let t=this._activeDate;const n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),Me(this._dateAdapter,t,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(e){this._selected=e instanceof ye?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedYear(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,j.O)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const e=this._dateAdapter.getYear(this._activeDate)-Ie(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let t=0,n=[];t<24;t++)n.push(e+t),4==n.length&&(this._years.push(n.map(e=>this._createCellForYear(e))),n=[]);this._changeDetectorRef.markForCheck()}_yearSelected(e){const t=e.value;this.yearSelected.emit(this._dateAdapter.createDate(t,0,1));let n=this._dateAdapter.getMonth(this.activeDate),i=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(t,n,1));this.selectedChange.emit(this._dateAdapter.createDate(t,n,Math.min(this._dateAdapter.getDate(this.activeDate),i)))}_handleCalendarBodyKeydown(e){const t=this._activeDate,n=this._isRtl();switch(e.keyCode){case z.oh:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?1:-1);break;case z.SV:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?-1:1);break;case z.LH:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case z.JH:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case z.Sd:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Ie(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case z.uR:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-Ie(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case z.Ku:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-240:-24);break;case z.VM:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?240:24);break;case z.K5:case z.L_:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:e});break;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),e.preventDefault()}_getActiveCell(){return Ie(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(e){const t=this._dateAdapter.createDate(e,0,1),n=this._dateAdapter.getYearName(t),i=this.dateClass?this.dateClass(t,"multi-year"):void 0;return new fe(e,n,n,this._shouldEnableYear(e),i)}_shouldEnableYear(e){if(null==e||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let t=this._dateAdapter.createDate(e,0,1);this._dateAdapter.getYear(t)==e;t=this._dateAdapter.addCalendarDays(t,1))if(this.dateFilter(t))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(e){if(this._selectedYear=null,e instanceof ye){const t=e.start||e.end;t&&(this._selectedYear=this._dateAdapter.getYear(t))}else e&&(this._selectedYear=this._dateAdapter.getYear(e))}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.sBO),s.Y36(Z._A,8),s.Y36(W.Is,8))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-multi-year-view"]],viewQuery:function(e,t){if(1&e&&s.Gf(_e,5),2&e){let e;s.iGM(e=s.CRH())&&(t._matCalendarBody=e.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(e,t){1&e&&(s.TgZ(0,"table",0),s.TgZ(1,"thead",1),s.TgZ(2,"tr"),s._UZ(3,"th",2),s.qZA(),s.qZA(),s.TgZ(4,"tbody",3),s.NdJ("selectedValueChange",function(e){return t._yearSelected(e)})("keydown",function(e){return t._handleCalendarBodyKeydown(e)}),s.qZA(),s.qZA()),2&e&&(s.xp6(4),s.Q6J("rows",t._years)("todayValue",t._todayYear)("startValue",t._selectedYear)("endValue",t._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",t._getActiveCell()))},directives:[_e],encapsulation:2,changeDetection:0}),e})();function Me(e,t,n,i,a){const s=e.getYear(t),o=e.getYear(n),r=Ue(e,i,a);return Math.floor((s-r)/24)===Math.floor((o-r)/24)}function Ie(e,t,n,i){return((e.getYear(t)-Ue(e,n,i))%24+24)%24}function Ue(e,t,n){let i=0;return n?i=e.getYear(n)-24+1:t&&(i=e.getYear(t)),i}let Oe=(()=>{class e{constructor(e,t,n,i){this._changeDetectorRef=e,this._dateFormats=t,this._dateAdapter=n,this._dir=i,this._rerenderSubscription=$.w.EMPTY,this.selectedChange=new s.vpe,this.monthSelected=new s.vpe,this.activeDateChange=new s.vpe,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(e){let t=this._activeDate;const n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._dateAdapter.getYear(t)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(e){this._selected=e instanceof ye?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedMonth(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe((0,j.O)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(e){const t=e.value,n=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1);this.monthSelected.emit(n);const i=this._dateAdapter.getNumDaysInMonth(n);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,Math.min(this._dateAdapter.getDate(this.activeDate),i)))}_handleCalendarBodyKeydown(e){const t=this._activeDate,n=this._isRtl();switch(e.keyCode){case z.oh:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,n?1:-1);break;case z.SV:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,n?-1:1);break;case z.LH:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case z.JH:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case z.Sd:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case z.uR:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case z.Ku:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case z.VM:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case z.K5:case z.L_:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:e});break;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),e.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(t=>t.map(t=>this._createCellForMonth(t,e[t]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null}_createCellForMonth(e,t){const n=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),i=this._dateAdapter.format(n,this._dateFormats.display.monthYearA11yLabel),a=this.dateClass?this.dateClass(n,"year"):void 0;return new fe(e,t.toLocaleUpperCase(),i,this._shouldEnableMonth(e),a)}_shouldEnableMonth(e){const t=this._dateAdapter.getYear(this.activeDate);if(null==e||this._isYearAndMonthAfterMaxDate(t,e)||this._isYearAndMonthBeforeMinDate(t,e))return!1;if(!this.dateFilter)return!0;for(let n=this._dateAdapter.createDate(t,e,1);this._dateAdapter.getMonth(n)==e;n=this._dateAdapter.addCalendarDays(n,1))if(this.dateFilter(n))return!0;return!1}_isYearAndMonthAfterMaxDate(e,t){if(this.maxDate){const n=this._dateAdapter.getYear(this.maxDate),i=this._dateAdapter.getMonth(this.maxDate);return e>n||e===n&&t>i}return!1}_isYearAndMonthBeforeMinDate(e,t){if(this.minDate){const n=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return e<n||e===n&&t<i}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(e){this._selectedMonth=e instanceof ye?this._getMonthInCurrentYear(e.start)||this._getMonthInCurrentYear(e.end):this._getMonthInCurrentYear(e)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.sBO),s.Y36(Z.sG,8),s.Y36(Z._A,8),s.Y36(W.Is,8))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-year-view"]],viewQuery:function(e,t){if(1&e&&s.Gf(_e,5),2&e){let e;s.iGM(e=s.CRH())&&(t._matCalendarBody=e.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(e,t){1&e&&(s.TgZ(0,"table",0),s.TgZ(1,"thead",1),s.TgZ(2,"tr"),s._UZ(3,"th",2),s.qZA(),s.qZA(),s.TgZ(4,"tbody",3),s.NdJ("selectedValueChange",function(e){return t._monthSelected(e)})("keydown",function(e){return t._handleCalendarBodyKeydown(e)}),s.qZA(),s.qZA()),2&e&&(s.xp6(4),s.Q6J("label",t._yearLabel)("rows",t._months)("todayValue",t._todayMonth)("startValue",t._selectedMonth)("endValue",t._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",t._dateAdapter.getMonth(t.activeDate)))},directives:[_e],encapsulation:2,changeDetection:0}),e})(),De=0,Pe=(()=>{class e{constructor(e,t,n,i,a){this._intl=e,this.calendar=t,this._dateAdapter=n,this._dateFormats=i,this._buttonDescriptionId="mat-calendar-button-"+De++,this.calendar.stateChanges.subscribe(()=>a.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const e=this._dateAdapter.getYear(this.calendar.activeDate)-Ie(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),t=e+24-1,n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1)),i=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return this._intl.formatYearRange(n,i)}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(e,t){return"month"==this.calendar.currentView?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(t):"year"==this.calendar.currentView?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t):Me(this._dateAdapter,e,t,this.calendar.minDate,this.calendar.maxDate)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(me),s.Y36((0,s.Gpc)(()=>Se)),s.Y36(Z._A,8),s.Y36(Z.sG,8),s.Y36(s.sBO))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:se,decls:10,vars:10,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(e,t){1&e&&(s.F$t(),s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"button",2),s.NdJ("click",function(){return t.currentPeriodClicked()}),s.TgZ(3,"span"),s._uU(4),s.qZA(),s._UZ(5,"div",3),s.qZA(),s._UZ(6,"div",4),s.Hsn(7),s.TgZ(8,"button",5),s.NdJ("click",function(){return t.previousClicked()}),s.qZA(),s.TgZ(9,"button",6),s.NdJ("click",function(){return t.nextClicked()}),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(2),s.uIk("aria-label",t.periodButtonLabel)("aria-describedby",t._buttonDescriptionId),s.xp6(1),s.uIk("id",t._buttonDescriptionId),s.xp6(1),s.Oqu(t.periodButtonText),s.xp6(1),s.ekj("mat-calendar-invert","month"!==t.calendar.currentView),s.xp6(3),s.Q6J("disabled",!t.previousEnabled()),s.uIk("aria-label",t.prevButtonLabel),s.xp6(1),s.Q6J("disabled",!t.nextEnabled()),s.uIk("aria-label",t.nextButtonLabel))},directives:[p.lW,F.Qr],encapsulation:2,changeDetection:0}),e})(),Se=(()=>{class e{constructor(e,t,n,i){this._dateAdapter=t,this._dateFormats=n,this._changeDetectorRef=i,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new s.vpe,this.yearSelected=new s.vpe,this.monthSelected=new s.vpe,this.viewChanged=new s.vpe(!0),this._userSelection=new s.vpe,this.stateChanges=new b.xQ,this._intlChanges=e.changes.subscribe(()=>{i.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get selected(){return this._selected}set selected(e){this._selected=e instanceof ye?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get activeDate(){return this._clampedActiveDate}set activeDate(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(e){const t=this._currentView!==e?e:null;this._currentView=e,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),t&&this.viewChanged.emit(t)}ngAfterContentInit(){this._calendarHeaderPortal=new Y.C5(this.headerComponent||Pe),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(e){const t=e.minDate||e.maxDate||e.dateFilter;if(t&&!t.firstChange){const e=this._getCurrentViewComponent();e&&(this._changeDetectorRef.detectChanges(),e._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){const e=this.currentView;let t;t="month"===e?this.monthView:"year"===e?this.yearView:this.multiYearView,t._init()}_dateSelected(e){const t=e.value;(this.selected instanceof ye||t&&!this._dateAdapter.sameDate(t,this.selected))&&this.selectedChange.emit(t),this._userSelection.emit(e)}_yearSelectedInMultiYearView(e){this.yearSelected.emit(e)}_monthSelectedInYearView(e){this.monthSelected.emit(e)}_goToDateInView(e,t){this.activeDate=e,this.currentView=t}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(me),s.Y36(Z._A,8),s.Y36(Z.sG,8),s.Y36(s.sBO))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-calendar"]],viewQuery:function(e,t){if(1&e&&(s.Gf(qe,5),s.Gf(Oe,5),s.Gf(ke,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.monthView=e.first),s.iGM(e=s.CRH())&&(t.yearView=e.first),s.iGM(e=s.CRH())&&(t.multiYearView=e.first)}},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection"},exportAs:["matCalendar"],features:[s._Bn([Ce]),s.TTD],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(e,t){1&e&&(s.YNc(0,oe,0,0,"ng-template",0),s.TgZ(1,"div",1),s.YNc(2,re,1,8,"mat-month-view",2),s.YNc(3,le,1,6,"mat-year-view",3),s.YNc(4,ce,1,6,"mat-multi-year-view",4),s.qZA()),2&e&&(s.Q6J("cdkPortalOutlet",t._calendarHeaderPortal),s.xp6(1),s.Q6J("ngSwitch",t.currentView),s.xp6(1),s.Q6J("ngSwitchCase","month"),s.xp6(1),s.Q6J("ngSwitchCase","year"),s.xp6(1),s.Q6J("ngSwitchCase","multi-year"))},directives:[Y.Pl,F.kH,i.RF,i.n9,qe,Oe,ke],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n'],encapsulation:2,changeDetection:0}),e})();const Je={transformPanel:(0,X.X$)("transformPanel",[(0,X.SB)("void",(0,X.oB)({opacity:0,transform:"scale(1, 0.8)"})),(0,X.eR)("void => enter",(0,X.jt)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,X.oB)({opacity:1,transform:"scale(1, 1)"}))),(0,X.eR)("* => void",(0,X.jt)("100ms linear",(0,X.oB)({opacity:0})))]),fadeInCalendar:(0,X.X$)("fadeInCalendar",[(0,X.SB)("void",(0,X.oB)({opacity:0})),(0,X.SB)("enter",(0,X.oB)({opacity:1})),(0,X.eR)("void => *",(0,X.jt)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let Ne=0;const Re=new s.OlP("mat-datepicker-scroll-strategy"),Qe={provide:Re,deps:[E.aV],useFactory:function(e){return()=>e.scrollStrategies.reposition()}};class Fe{constructor(e){this._elementRef=e}}const Ee=(0,Z.pj)(Fe);let Ye=(()=>{class e extends Ee{constructor(e,t,n,i,a,s){super(e),this._changeDetectorRef=t,this._globalModel=n,this._dateAdapter=i,this._rangeSelectionStrategy=a,this._subscriptions=new $.w,this._animationState="enter",this._animationDone=new b.xQ,this._actionsPortal=null,this._closeButtonText=(null==s?void 0:s.closeCalendarLabel)||"Close calendar"}ngOnInit(){this._model=this._actionsPortal?this._globalModel.clone():this._globalModel}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(e){const t=this._model.selection,n=e.value,i=t instanceof ye;if(i&&this._rangeSelectionStrategy){const i=this._rangeSelectionStrategy.selectionFinished(n,t,e.event);this._model.updateSelection(i,this)}else!n||!i&&this._dateAdapter.sameDate(n,t)||this._model.add(n);this._model&&!this._model.isComplete()||this._actionsPortal||this.datepicker.close()}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(s.sBO),s.Y36(Ae),s.Y36(Z._A),s.Y36(Te,8),s.Y36(me))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-datepicker-content"]],viewQuery:function(e,t){if(1&e&&s.Gf(Se,5),2&e){let e;s.iGM(e=s.CRH())&&(t._calendar=e.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(e,t){1&e&&s.WFA("@transformPanel.done",function(){return t._animationDone.next()}),2&e&&(s.d8E("@transformPanel",t._animationState),s.ekj("mat-datepicker-content-touch",t.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[s.qOj],decls:5,vars:20,consts:[["cdkTrapFocus","",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"mat-calendar",1),s.NdJ("yearSelected",function(e){return t.datepicker._selectYear(e)})("monthSelected",function(e){return t.datepicker._selectMonth(e)})("viewChanged",function(e){return t.datepicker._viewChanged(e)})("_userSelection",function(e){return t._handleUserSelection(e)}),s.qZA(),s.YNc(2,de,0,0,"ng-template",2),s.TgZ(3,"button",3),s.NdJ("focus",function(){return t._closeButtonFocused=!0})("blur",function(){return t._closeButtonFocused=!1})("click",function(){return t.datepicker.close()}),s._uU(4),s.qZA(),s.qZA()),2&e&&(s.ekj("mat-datepicker-content-container-with-actions",t._actionsPortal),s.xp6(1),s.Q6J("id",t.datepicker.id)("ngClass",t.datepicker.panelClass)("startAt",t.datepicker.startAt)("startView",t.datepicker.startView)("minDate",t.datepicker._getMinDate())("maxDate",t.datepicker._getMaxDate())("dateFilter",t.datepicker._getDateFilter())("headerComponent",t.datepicker.calendarHeaderComponent)("selected",t._getSelected())("dateClass",t.datepicker.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)("@fadeInCalendar","enter"),s.xp6(1),s.Q6J("cdkPortalOutlet",t._actionsPortal),s.xp6(1),s.ekj("cdk-visually-hidden",!t._closeButtonFocused),s.Q6J("color",t.color||"primary"),s.xp6(1),s.Oqu(t._closeButtonText))},directives:[F.mK,Se,i.mk,Y.Pl,p.lW],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"],encapsulation:2,data:{animation:[Je.transformPanel,Je.fadeInCalendar]},changeDetection:0}),e})(),Le=(()=>{class e{constructor(e,t,n,i,a,o,r,l,c){this._dialog=e,this._overlay=t,this._ngZone=n,this._viewContainerRef=i,this._dateAdapter=o,this._dir=r,this._document=l,this._model=c,this._inputStateChanges=$.w.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new s.vpe,this.monthSelected=new s.vpe,this.viewChanged=new s.vpe(!0),this.openedStream=new s.vpe,this.closedStream=new s.vpe,this._opened=!1,this.id="mat-datepicker-"+Ne++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new b.xQ,this._scrollStrategy=a}get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(e){this._color=e}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=(0,_.Ig)(e)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(e){const t=(0,_.Ig)(e);t!==this._disabled&&(this._disabled=t,this.stateChanges.next(void 0))}get restoreFocus(){return this._restoreFocus}set restoreFocus(e){this._restoreFocus=(0,_.Ig)(e)}get panelClass(){return this._panelClass}set panelClass(e){this._panelClass=(0,_.du)(e)}get opened(){return this._opened}set opened(e){(0,_.Ig)(e)?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}ngOnChanges(e){const t=e.xPosition||e.yPosition;t&&!t.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(e){this._model.add(e)}_selectYear(e){this.yearSelected.emit(e)}_selectMonth(e){this.monthSelected.emit(e)}_viewChanged(e){this.viewChanged.emit(e)}registerInput(e){return this._inputStateChanges.unsubscribe(),this.datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(e){this._actionsPortal=e}removeActions(e){e===this._actionsPortal&&(this._actionsPortal=null)}open(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened)return;if(this._popupComponentRef&&this._popupRef){const e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe((0,B.q)(1)).subscribe(()=>this._destroyPopup())}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);const e=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(e)):e()}_applyPendingSelection(){var e,t;const n=(null===(e=this._popupComponentRef)||void 0===e?void 0:e.instance)||(null===(t=this._dialogRef)||void 0===t?void 0:t.componentInstance);null==n||n._applyPendingSelection()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Ye,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!1,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._forwardContentValues(this._dialogRef.componentInstance)}_openAsPopup(){const e=new Y.C5(Ye,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe((0,B.q)(1)).subscribe(()=>{this._popupRef.updatePosition()})}_forwardContentValues(e){e.datepicker=this,e.color=this.color,e._actionsPortal=this._actionsPortal}_createPopup(){const e=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),t=new E.X_({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(t),this._popupRef.overlayElement.setAttribute("role","dialog"),(0,V.T)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe((0,G.h)(e=>e.keyCode===z.hY&&!(0,z.Vb)(e)||this.datepickerInput&&(0,z.Vb)(e,"altKey")&&e.keyCode===z.LH))).subscribe(e=>{e&&e.preventDefault(),this.close()})}_destroyPopup(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}_setConnectedPositions(e){const t="end"===this.xPosition?"end":"start",n="start"===t?"end":"start",i="above"===this.yPosition?"bottom":"top",a="top"===i?"bottom":"top";return e.withPositions([{originX:t,originY:a,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:a},{originX:n,originY:a,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:a}])}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.uw),s.Y36(E.aV),s.Y36(s.R0b),s.Y36(s.s_b),s.Y36(Re),s.Y36(Z._A,8),s.Y36(W.Is,8),s.Y36(i.K0,8),s.Y36(Ae))},e.\u0275dir=s.lG2({type:e,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",restoreFocus:"restoreFocus",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[s.TTD]}),e})(),$e=(()=>{class e extends Le{}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[s._Bn([Ce,{provide:Le,useExisting:e}]),s.qOj],decls:0,vars:0,template:function(e,t){},encapsulation:2,changeDetection:0}),e})();class Ve{constructor(e,t){this.target=e,this.targetElement=t,this.value=this.target.value}}let He=(()=>{class e{constructor(e,t,n){this._elementRef=e,this._dateAdapter=t,this._dateFormats=n,this.dateChange=new s.vpe,this.dateInput=new s.vpe,this.stateChanges=new b.xQ,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=$.w.EMPTY,this._localeSubscription=$.w.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=e=>{const t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value));return!t||this._matchesFilter(t)?null:{matDatepickerFilter:!0}},this._minValidator=e=>{const t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)),n=this._getMinDate();return!n||!t||this._dateAdapter.compareDate(n,t)<=0?null:{matDatepickerMin:{min:n,actual:t}}},this._maxValidator=e=>{const t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)),n=this._getMaxDate();return!n||!t||this._dateAdapter.compareDate(n,t)>=0?null:{matDatepickerMax:{max:n,actual:t}}},this._lastValueValid=!1,this._localeSubscription=t.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(e){this._assignValueProgrammatically(e)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(e){const t=(0,_.Ig)(e),n=this._elementRef.nativeElement;this._disabled!==t&&(this._disabled=t,this.stateChanges.next(void 0)),t&&this._isInitialized&&n.blur&&n.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(e){this._model=e,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(e=>{if(this._shouldHandleChangeEvent(e)){const t=this._getValueFromModel(e.selection);this._lastValueValid=this._isValidValue(t),this._cvaOnChange(t),this._onTouched(),this._formatValue(t),this.dateInput.emit(new Ve(this,this._elementRef.nativeElement)),this.dateChange.emit(new Ve(this,this._elementRef.nativeElement))}})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(e){(function(e,t){const n=Object.keys(e);for(let i of n){const{previousValue:n,currentValue:a}=e[i];if(!t.isDateInstance(n)||!t.isDateInstance(a))return!0;if(!t.sameDate(n,a))return!0}return!1})(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}writeValue(e){this._assignValueProgrammatically(e)}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onKeydown(e){e.altKey&&e.keyCode===z.JH&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),e.preventDefault())}_onInput(e){const t=this._lastValueValid;let n=this._dateAdapter.parse(e,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(n),n=this._dateAdapter.getValidDateOrNull(n),this._dateAdapter.sameDate(n,this.value)?(e&&!this.value&&this._cvaOnChange(n),t!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(n),this._cvaOnChange(n),this.dateInput.emit(new Ve(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Ve(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(e){this._elementRef.nativeElement.value=e?this._dateAdapter.format(e,this._dateFormats.display.dateInput):""}_assignValue(e){this._model?(this._assignValueToModel(e),this._pendingValue=null):this._pendingValue=e}_isValidValue(e){return!e||this._dateAdapter.isValid(e)}_parentDisabled(){return!1}_assignValueProgrammatically(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=this._isValidValue(e),e=this._dateAdapter.getValidDateOrNull(e),this._assignValue(e),this._formatValue(e)}_matchesFilter(e){const t=this._getDateFilter();return!t||t(e)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(Z._A,8),s.Y36(Z.sG,8))},e.\u0275dir=s.lG2({type:e,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[s.TTD]}),e})();const ze={provide:a.JU,useExisting:(0,s.Gpc)(()=>je),multi:!0},Be={provide:a.Cf,useExisting:(0,s.Gpc)(()=>je),multi:!0};let je=(()=>{class e extends He{constructor(e,t,n,i){super(e,t,n),this._formField=i,this._closedSubscription=$.w.EMPTY,this._validator=a.kI.compose(super._getValidators())}set matDatepicker(e){e&&(this._datepicker=e,this._closedSubscription=e.closedStream.subscribe(()=>this._onTouched()),this._registerModel(e.registerInput(this)))}get min(){return this._min}set min(e){const t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._validatorOnChange())}get max(){return this._max}set max(e){const t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(e){const t=this._matchesFilter(this.value);this._dateFilter=e,this._matchesFilter(this.value)!==t&&this._validatorOnChange()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(e){return e}_assignValueToModel(e){this._model&&this._model.updateSelection(e,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(e){return e.source!==this}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(Z._A,8),s.Y36(Z.sG,8),s.Y36(x.G_,8))},e.\u0275dir=s.lG2({type:e,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(e,t){1&e&&s.NdJ("input",function(e){return t._onInput(e.target.value)})("change",function(){return t._onChange()})("blur",function(){return t._onBlur()})("keydown",function(e){return t._onKeydown(e)}),2&e&&(s.Ikx("disabled",t.disabled),s.uIk("aria-haspopup",t._datepicker?"dialog":null)("aria-owns",(null==t._datepicker?null:t._datepicker.opened)&&t._datepicker.id||null)("min",t.min?t._dateAdapter.toIso8601(t.min):null)("max",t.max?t._dateAdapter.toIso8601(t.max):null)("data-mat-calendar",t._datepicker?t._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[s._Bn([ze,Be,{provide:y,useExisting:e}]),s.qOj]}),e})(),Ge=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=s.lG2({type:e,selectors:[["","matDatepickerToggleIcon",""]]}),e})(),Xe=(()=>{class e{constructor(e,t,n){this._intl=e,this._changeDetectorRef=t,this._stateChanges=$.w.EMPTY;const i=Number(n);this.tabIndex=i||0===i?i:null}get disabled(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(e){this._disabled=(0,_.Ig)(e)}ngOnChanges(e){e.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())}_watchStateChanges(){const e=this.datepicker?this.datepicker.stateChanges:(0,H.of)(),t=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:(0,H.of)(),n=this.datepicker?(0,V.T)(this.datepicker.openedStream,this.datepicker.closedStream):(0,H.of)();this._stateChanges.unsubscribe(),this._stateChanges=(0,V.T)(this._intl.changes,e,t,n).subscribe(()=>this._changeDetectorRef.markForCheck())}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(me),s.Y36(s.sBO),s.$8M("tabindex"))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-datepicker-toggle"]],contentQueries:function(e,t,n){if(1&e&&s.Suo(n,Ge,5),2&e){let e;s.iGM(e=s.CRH())&&(t._customIcon=e.first)}},viewQuery:function(e,t){if(1&e&&s.Gf(ue,5),2&e){let e;s.iGM(e=s.CRH())&&(t._button=e.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(e,t){1&e&&s.NdJ("click",function(e){return t._open(e)}),2&e&&(s.uIk("tabindex",null)("data-mat-calendar",t.datepicker?t.datepicker.id:null),s.ekj("mat-datepicker-toggle-active",t.datepicker&&t.datepicker.opened)("mat-accent",t.datepicker&&"accent"===t.datepicker.color)("mat-warn",t.datepicker&&"warn"===t.datepicker.color))},inputs:{tabIndex:"tabIndex",disabled:"disabled",datepicker:["for","datepicker"],ariaLabel:["aria-label","ariaLabel"],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[s.TTD],ngContentSelectors:he,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(e,t){1&e&&(s.F$t(ge),s.TgZ(0,"button",0,1),s.YNc(2,pe,2,0,"svg",2),s.Hsn(3),s.qZA()),2&e&&(s.Q6J("disabled",t.disabled)("disableRipple",t.disableRipple),s.uIk("aria-haspopup",t.datepicker?"dialog":null)("aria-label",t.ariaLabel||t._intl.openCalendarLabel)("tabindex",t.disabled?-1:t.tabIndex),s.xp6(2),s.Q6J("ngIf",!t._customIcon))},directives:[p.lW,i.O5],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}\n"],encapsulation:2,changeDetection:0}),e})(),We=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({providers:[me,Qe],imports:[[i.ez,p.ot,m.Is,E.U8,F.rt,Y.eL,Z.BQ],L.ZD]}),e})();var Ke=n(90171);const et={admin:{tagTypes:[{name:"custom"}],pages:[]}};var tt=n(27673);let nt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,p.ot,P.Ps]]}),e})();var it=n(83461),at=n(3543),st=n(34673),ot=n(70837),rt=n(14434),lt=n(63297);let ct=(()=>{class e{constructor(e){this.settings=e,this.menu=this.generateMenu()}ngOnInit(){this.menu=this.generateMenu()}getCustomSidebarItems(){return this.settings.get("vebto.admin.pages")}generateMenu(){const e=[{name:"analytics",icon:"pie-chart",permission:"reports.view",route:"analytics"},{name:"appearance",icon:"style",permission:"resources.defaults.permissions.update",route:"appearance"},{name:"settings",icon:"settings",permission:"settings.view",route:"settings"},{name:"plans",icon:"assignment",permission:"plans.view",route:"plans"},{name:"subscriptions",icon:"subscriptions",permission:"subscriptions.view",route:"subscriptions"},...this.getCustomSidebarItems(),{name:"users",icon:"person",permission:"users.view",route:"users"},{name:"roles",icon:"people",permission:"roles.view",route:"roles"},{name:"pages",icon:"page",permission:"pages.view",route:"custom-pages"},{name:"tags",icon:"local-offer",permission:"tags.view",route:"tags"},{name:"files",icon:"file",permission:"files.view",route:"files"},{name:"translations",icon:"translate",permission:"localizations.view",route:"translations"}];return this.settings.get("vebto.admin.ads")&&e.push({name:"ads",icon:"ads",permission:"settings.view",route:"ads"}),e.map(e=>(e.type="route",e.label=e.name,e.action="admin/"+e.route,e.activeExact=!1,e.condition=function(t,n){let i=!0;return"plans"!==e.name&&"subscriptions"!==e.name||(i=n.get("billing.enable")),i&&t.hasPermission(e.permission)},e))}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z))},e.\u0275cmp=s.Xpm({type:e,selectors:[["admin"]],viewQuery:function(e,t){if(1&e&&s.Gf(at._,7),2&e){let e;s.iGM(e=s.CRH())&&(t.sidenav=e.first)}},decls:11,vars:10,consts:[["menuPosition","admin-navbar","color","primary",3,"showToggleButton","toggleButtonClick"],[3,"position","vertical","compact"],[1,"version"],[1,"content-inner"]],template:function(e,t){1&e&&(s.TgZ(0,"material-navbar",0),s.NdJ("toggleButtonClick",function(){return t.sidenav.toggleSidebarMode()}),s.qZA(),s.TgZ(1,"sidenav"),s.TgZ(2,"nav"),s._UZ(3,"custom-menu",1),s.ALo(4,"async"),s.TgZ(5,"div",2),s._uU(6),s.ALo(7,"trans"),s.qZA(),s.qZA(),s.TgZ(8,"main"),s.TgZ(9,"div",3),s._UZ(10,"router-outlet"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.Q6J("showToggleButton",!0),s.xp6(3),s.Q6J("position",t.menu)("vertical",!0)("compact",s.lcZ(4,6,t.sidenav.isCompact$)),s.xp6(3),s.AsE("",s.lcZ(7,8,"Version:")," ",t.settings.get("version"),""))},directives:[ot.e,at._,rt.K,r.lC],pipes:[i.Ov,lt.R],styles:["[_nghost-%COMP%]{display:block}material-navbar[_ngcontent-%COMP%]{position:fixed;top:0;left:0}.nav-searchbar[_ngcontent-%COMP%]{display:block;flex:1 1 auto}.version[_ngcontent-%COMP%]{padding:5px 8px;font-size:1.3rem;margin-top:auto}.content-inner[_ngcontent-%COMP%]{padding:25px}@media only screen and (max-width:768px){.content-inner[_ngcontent-%COMP%]{padding:10px}}"],changeDetection:0}),e})();var dt=n(42690),ut=n(20765),pt=n(68939);function gt(e,t=""){let n=Object.keys(e)[0];if(n){t&&(n=`${t}-${n}`);const e=document.getElementById(n);e&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}}var ht=n(35718),mt=n(15381),ft=n(22470),_t=n(74388),bt=n(21270);let vt=(()=>{class e{constructor(e,t,n,i,a,s,o,r,l,c,d){this.settings=e,this.toast=t,this.http=n,this.modal=i,this.route=a,this.customHomepage=s,this.valueLists=o,this.cd=r,this.router=l,this.social=c,this.state=d}ngOnDestroy(){this.state.reset()}setJson(e,t){this.state.client[e]=JSON.stringify(t)}getJson(e){const t=this.state.client[e];return t?JSON.parse(t):[]}saveSettings(e){this.state.loading$.next(!0);const t=e||this.state.getModified();this.settings.save(t).pipe((0,pt.x)(()=>this.state.loading$.next(!1))).subscribe(()=>{this.toast.open("Settings saved."),this.clearErrors(),this.state.updateInitial(t)},e=>{this.state.errors$.next(e.errors),gt(this.state.errors$.value)})}clearErrors(){this.state.errors$.next({})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z),s.Y36(ht.F),s.Y36(o.r),s.Y36(mt.u),s.Y36(r.gz),s.Y36(ft.Y),s.Y36(_t.l),s.Y36(s.sBO),s.Y36(r.F0),s.Y36(bt.x),s.Y36(d))},e.\u0275dir=s.lG2({type:e}),e})();var Zt=n(15515);function xt(e,t){1&e&&s._UZ(0,"mat-progress-bar",15)}const yt=[{path:"drive",component:(()=>{class e extends vt{}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["drive-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:31,vars:9,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["ngNativeValidate","",1,"body","many-inputs",3,"ngSubmit"],[1,"input-container"],["for","drive.default_view","trans",""],["name","drive.default_view","id","drive.default_view",3,"ngModel","ngModelChange"],["value","grid"],["value","list"],["trans",""],[1,"setting-toggle-container"],["name","drive.send_share_notification","id","drive.send_share_notification","trans","",3,"ngModel","ngModelChange"],["name","share.suggest_emails","id","share.suggest_emails","trans","",3,"ngModel","ngModelChange"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Drive"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Configure how user drive should behave."),s.qZA(),s.qZA(),s.TgZ(5,"form",3),s.NdJ("ngSubmit",function(){return t.saveSettings()}),s.TgZ(6,"div",4),s.TgZ(7,"label",5),s._uU(8,"Default View Mode"),s.qZA(),s.TgZ(9,"select",6),s.NdJ("ngModelChange",function(e){return t.state.client["drive.default_view"]=e}),s.TgZ(10,"option",7),s._uU(11,"Grid"),s.qZA(),s.TgZ(12,"option",8),s._uU(13,"List"),s.qZA(),s.qZA(),s.TgZ(14,"p",9),s._uU(15,"Which view mode should user drive use by default."),s.qZA(),s.qZA(),s.TgZ(16,"div",10),s.TgZ(17,"mat-slide-toggle",11),s.NdJ("ngModelChange",function(e){return t.state.client["drive.send_share_notification"]=e}),s._uU(18,"Share Notification"),s.qZA(),s.TgZ(19,"p",9),s._uU(20,"Send a notification to user when a file or folder is shared with them."),s.qZA(),s.qZA(),s.TgZ(21,"div",10),s.TgZ(22,"mat-slide-toggle",12),s.NdJ("ngModelChange",function(e){return t.state.client["share.suggest_emails"]=e}),s._uU(23,"Suggest Emails"),s.qZA(),s.TgZ(24,"p",9),s._uU(25,"Suggest email address of existing users when sharing a file or folder."),s.qZA(),s.qZA(),s.TgZ(26,"button",13),s.ALo(27,"async"),s._uU(28," Update "),s.qZA(),s.YNc(29,xt,1,0,"mat-progress-bar",14),s.ALo(30,"async"),s.qZA()),2&e&&(s.xp6(9),s.Q6J("ngModel",t.state.client["drive.default_view"]),s.xp6(8),s.Q6J("ngModel",t.state.client["drive.send_share_notification"]),s.xp6(5),s.Q6J("ngModel",t.state.client["share.suggest_emails"]),s.xp6(4),s.Q6J("disabled",s.lcZ(27,5,t.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(30,7,t.state.loading$)))},directives:[Zt.P,a.JL,a.F,a.EJ,a.JJ,a.On,a.YN,a.Kr,T.Rr,p.lW,i.O5,C.pW],pipes:[i.Ov],encapsulation:2,changeDetection:0}),e})()}];var At=n(96605);function wt(e,t){if(1&e&&(s.TgZ(0,"a",19),s.TgZ(1,"div",5),s._uU(2),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.Q6J("routerLink",e.path),s.xp6(2),s.Oqu(e.path.replace("-"," "))}}function Ct(e,t){1&e&&(s.TgZ(0,"a",20),s.TgZ(1,"div",5),s._uU(2,"Billing"),s.qZA(),s.qZA())}const Tt=function(){return{panel:"menus"}},qt=function(){return{panel:"seo-settings"}},kt=function(){return{panel:"themes"}};function Mt(e,t){if(1&e&&(s.TgZ(0,"a",4),s.TgZ(1,"div",5),s._uU(2,"General"),s.qZA(),s.qZA(),s.YNc(3,wt,3,2,"a",6),s.YNc(4,Ct,3,0,"a",7),s.TgZ(5,"a",8),s.TgZ(6,"div",5),s._uU(7,"Localization"),s.qZA(),s.qZA(),s.TgZ(8,"a",9),s.TgZ(9,"div",5),s._uU(10,"Authentication"),s.qZA(),s.qZA(),s.TgZ(11,"a",10),s.TgZ(12,"div",5),s._uU(13,"Uploading"),s.qZA(),s.qZA(),s.TgZ(14,"a",11),s.TgZ(15,"div",5),s._uU(16,"Mail"),s.qZA(),s.qZA(),s.TgZ(17,"a",12),s.TgZ(18,"div",5),s._uU(19,"Cache"),s.qZA(),s.qZA(),s.TgZ(20,"a",13),s.TgZ(21,"div",5),s._uU(22,"Analytics"),s.qZA(),s.qZA(),s.TgZ(23,"a",14),s.TgZ(24,"div",5),s._uU(25,"Logging"),s.qZA(),s.qZA(),s.TgZ(26,"a",15),s.TgZ(27,"div",5),s._uU(28,"Queue"),s.qZA(),s.qZA(),s.TgZ(29,"a",16),s.TgZ(30,"div",5),s._uU(31,"Recaptcha"),s.qZA(),s.qZA(),s.TgZ(32,"a",17),s.TgZ(33,"div",5),s._uU(34,"GDPR"),s.qZA(),s.qZA(),s.TgZ(35,"a",18),s.TgZ(36,"div",5),s._uU(37,"Menus"),s.qZA(),s.qZA(),s.TgZ(38,"a",18),s.TgZ(39,"div",5),s._uU(40,"Seo"),s.qZA(),s.qZA(),s.TgZ(41,"a",18),s.TgZ(42,"div",5),s._uU(43,"Themes"),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngForOf",e.appRoutes()),s.xp6(1),s.Q6J("ngIf",e.settings.get("billing.integrated")),s.xp6(31),s.Q6J("queryParams",s.DdM(5,Tt)),s.xp6(3),s.Q6J("queryParams",s.DdM(6,qt)),s.xp6(3),s.Q6J("queryParams",s.DdM(7,kt))}}function It(e,t){1&e&&s.GkF(0)}function Ut(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"button",21),s.TgZ(2,"span",5),s._uU(3),s.ALo(4,"async"),s.qZA(),s._UZ(5,"mat-icon",22),s.qZA(),s.TgZ(6,"mat-menu",23,24),s.YNc(8,It,1,0,"ng-container",25),s.qZA(),s.BQk()),2&e){const e=s.MAs(7),t=s.oxw(),n=s.MAs(1);s.xp6(1),s.Q6J("matMenuTriggerFor",e),s.xp6(2),s.Oqu(s.lcZ(4,3,t.activePanel$)),s.xp6(5),s.Q6J("ngTemplateOutlet",n)}}function Ot(e,t){1&e&&s.GkF(0)}function Dt(e,t){if(1&e&&(s.TgZ(0,"aside",26),s.YNc(1,Ot,1,0,"ng-container",25),s.qZA()),2&e){s.oxw();const e=s.MAs(1);s.xp6(1),s.Q6J("ngTemplateOutlet",e)}}let Pt=(()=>{class e{constructor(e,t,n,i,a){this.settings=e,this.route=t,this.router=n,this.state=i,this.breakpoints=a,this.activePanel$=new c.X(this.route.firstChild.routeConfig.path)}ngOnInit(){this.route.data.subscribe(e=>{this.state.setAll(e.settings)}),this.router.events.pipe((0,G.h)(e=>e instanceof r.m2)).subscribe(()=>{this.activePanel$.next(this.route.firstChild.routeConfig.path)})}appRoutes(){return yt}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z),s.Y36(r.gz),s.Y36(r.F0),s.Y36(d),s.Y36(At.S))},e.\u0275cmp=s.Xpm({type:e,selectors:[["settings"]],decls:8,vars:4,consts:[["navItems",""],[4,"ngIf","ngIfElse"],["desktopNav",""],[1,"settings-panels-container"],["mat-menu-item","","routerLink","general","routerLinkActive","selected",1,"nav-item"],["trans","",1,"name"],["class","nav-item","mat-menu-item","","routerLinkActive","selected",3,"routerLink",4,"ngFor","ngForOf"],["class","nav-item","mat-menu-item","","routerLink","billing","routerLinkActive","selected",4,"ngIf"],["mat-menu-item","","routerLink","localization","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","authentication","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","uploading","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","mail","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","cache","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","analytics","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","logging","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","queue","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","recaptcha","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","gdpr","routerLinkActive","selected",1,"nav-item"],["mat-menu-item","","routerLink","/admin/appearance","routerLinkActive","selected",1,"nav-item",3,"queryParams"],["mat-menu-item","","routerLinkActive","selected",1,"nav-item",3,"routerLink"],["mat-menu-item","","routerLink","billing","routerLinkActive","selected",1,"nav-item"],[1,"no-style","admin-pill-nav-mobile-selector",3,"matMenuTriggerFor"],["svgIcon","keyboard-arrow-down"],[1,"admin-pill-nav-menu"],["navMenu","matMenu"],[4,"ngTemplateOutlet"],[1,"admin-pill-nav","rounded"]],template:function(e,t){if(1&e&&(s.YNc(0,Mt,44,8,"ng-template",null,0,s.W1O),s.YNc(2,Ut,9,5,"ng-container",1),s.ALo(3,"async"),s.YNc(4,Dt,2,1,"ng-template",null,2,s.W1O),s.TgZ(6,"div",3),s._UZ(7,"router-outlet"),s.qZA()),2&e){const e=s.MAs(5);s.xp6(2),s.Q6J("ngIf",s.lcZ(3,2,t.breakpoints.isMobile$))("ngIfElse",e)}},directives:[i.O5,r.lC,r.yS,w.OP,r.Od,Zt.P,i.sg,w.p6,P.Hw,w.VK,i.tP],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:flex}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:block}}.settings-panels-container[_ngcontent-%COMP%]{flex:1 1 auto}.admin-pill-nav-mobile-selector[_ngcontent-%COMP%]{margin-bottom:20px}"],changeDetection:0}),e})();const St=function(e,t){return{baseUrl:e,currentUrl:t}};function Jt(e,t){if(1&e&&(s.TgZ(0,"p",33),s.TgZ(1,"span",34),s._uU(2,'Base site url is set as ":baseUrl" in configuration, but current url is ":currentUrl". It\'s recommended to set the primary url you want to use in configuration file and then redirect all other url versions to this primary version via cpanel or .htaccess file.'),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("transValues",s.WLB(1,St,e.state.server.app_url,e.state.server.newAppUrl))}}function Nt(e,t){1&e&&(s.TgZ(0,"a",35),s._uU(1,"Learn more. "),s.qZA())}function Rt(e,t){if(1&e&&(s.TgZ(0,"option",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.name),s.xp6(1),s.hij(" ",e.name," ")}}function Qt(e,t){if(1&e&&(s.TgZ(0,"option",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.model_id),s.xp6(1),s.hij(" ",e.label," ")}}function Ft(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",4),s.TgZ(1,"label",37),s._uU(2),s.qZA(),s.TgZ(3,"select",38),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["homepage.value"]=t}),s.YNc(4,Qt,2,2,"option",17),s.qZA(),s.qZA()}if(2&e){const e=s.oxw().$implicit,t=s.oxw();s.xp6(1),s.Q6J("for",e.name),s.xp6(1),s.Oqu(e.name),s.xp6(1),s.Q6J("id",e.name)("name",e.name)("ngModel",t.state.client["homepage.value"]),s.xp6(1),s.Q6J("ngForOf",e.items)}}function Et(e,t){if(1&e&&(s.ynx(0),s.YNc(1,Ft,5,6,"div",20),s.BQk()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngIf",n.state.client["homepage.type"]===e.name)}}function Yt(e,t){if(1&e&&(s.TgZ(0,"option",42),s._uU(1),s.qZA()),2&e){const e=t.$implicit,n=s.oxw(2);s.Q6J("ngValue",e.name),s.xp6(1),s.hij(" ",n.getDisplayName(e)," ")}}function Lt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",4),s.TgZ(1,"label",39),s._uU(2,"Application Page"),s.qZA(),s.TgZ(3,"select",40),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["homepage.value"]=t}),s.YNc(4,Yt,2,2,"option",41),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngModel",e.state.client["homepage.value"]),s.xp6(1),s.Q6J("ngForOf",e.getHomepageComponents())}}function $t(e,t){1&e&&s._UZ(0,"mat-progress-bar",43)}let Vt=(()=>{class e extends vt{constructor(){super(...arguments),this.menuItemCategories$=new c.X([]),this.cssThemes=[]}ngOnInit(){this.valueLists.get(["menuItemCategories","themes"]).subscribe(e=>{this.menuItemCategories$.next(e.menuItemCategories),this.cssThemes=e.themes})}getHomepageComponents(){return this.customHomepage.getComponents()}getDisplayName(e){var t;return(null===(t=e.routeConfig)||void 0===t?void 0:t.data)&&e.routeConfig.data.name||e.name.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase())}urlsDontMatch(){return this.state.server.newAppUrl&&this.state.server.newAppUrl!==this.state.server.app_url}createSitemap(){return this.state.loading$.next(!0),this.http.post("sitemap/generate").pipe((0,pt.x)(()=>this.state.loading$.next(!1))).subscribe(()=>{this.toast.open("Sitemap generated.")})}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["homepage-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:61,vars:26,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["ngNativeValidate","",1,"body","many-inputs",3,"ngSubmit"],[1,"input-container"],["for","app_url","trans",""],["type","text","id","app_url","name","app_url","readonly","readonly","required","",3,"ngModel","ngModelChange"],["class","error",4,"ngIf"],[1,"docs-link"],["svgIcon","link"],["href","https://support.vebto.com/help-center/articles/35/primary-site-url","target","_blank",4,"ngIf"],[1,"error-group","many-inputs"],[1,"inline-inputs-container"],["for","homepage.type","trans",""],["name","homepage.type","id","homepage.type",3,"ngModel","ngModelChange"],["value","default"],["value","component"],[3,"value",4,"ngFor","ngForOf"],["trans",""],[4,"ngFor","ngForOf"],["class","input-container",4,"ngIf"],["for","themes.default_mode","trans",""],["id","themes.default_mode","name","themes.default_mode",3,"ngModel","ngModelChange"],["value","light","trans",""],["value","dark","trans",""],[1,"setting-toggle-container"],["name","themes.user_change","id","themes.user_change","trans","",3,"ngModel","ngModelChange"],[1,"settings-separator"],["type","button","mat-flat-button","","color","accent","trans","",3,"disabled","click"],[1,"sitemap-description"],["target","_blank",3,"href"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"error"],["trans","",3,"transValues"],["href","https://support.vebto.com/help-center/articles/35/primary-site-url","target","_blank"],[3,"value"],["trans","",1,"visually-hidden",3,"for"],[3,"id","name","ngModel","ngModelChange"],["for","homepage.value","trans","",1,"visually-hidden"],["name","homepage.value","id","homepage.value",3,"ngModel","ngModelChange"],["trans","",3,"ngValue",4,"ngFor","ngForOf"],["trans","",3,"ngValue"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"General"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Configure general site settings."),s.qZA(),s.qZA(),s.TgZ(5,"form",3),s.NdJ("ngSubmit",function(){return t.saveSettings()}),s.TgZ(6,"div",4),s.TgZ(7,"label",5),s._uU(8,"Primary Site Url"),s.qZA(),s.TgZ(9,"input",6),s.NdJ("ngModelChange",function(e){return t.state.server.app_url=e}),s.qZA(),s.YNc(10,Jt,3,4,"p",7),s.TgZ(11,"p"),s.TgZ(12,"span",8),s._UZ(13,"mat-icon",9),s.YNc(14,Nt,2,0,"a",10),s.qZA(),s.qZA(),s.qZA(),s.TgZ(15,"div",11),s.TgZ(16,"div",12),s.TgZ(17,"div",4),s.TgZ(18,"label",13),s._uU(19,"Site Homepage"),s.qZA(),s.TgZ(20,"select",14),s.NdJ("ngModelChange",function(e){return t.state.client["homepage.type"]=e}),s.TgZ(21,"option",15),s._uU(22,"Default"),s.qZA(),s.TgZ(23,"option",16),s._uU(24,"Application Page"),s.qZA(),s.YNc(25,Rt,2,2,"option",17),s.ALo(26,"async"),s.qZA(),s.TgZ(27,"p",18),s._uU(28,"Type of the homepage."),s.qZA(),s.qZA(),s.YNc(29,Et,2,1,"ng-container",19),s.ALo(30,"async"),s.YNc(31,Lt,5,2,"div",20),s.qZA(),s.qZA(),s.TgZ(32,"div",4),s.TgZ(33,"label",21),s._uU(34,"Default Site Theme"),s.qZA(),s.TgZ(35,"select",22),s.NdJ("ngModelChange",function(e){return t.state.client["themes.default_mode"]=e}),s.TgZ(36,"option",23),s._uU(37,"Light"),s.qZA(),s.TgZ(38,"option",24),s._uU(39,"Dark"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(40,"div",25),s.TgZ(41,"mat-slide-toggle",26),s.NdJ("ngModelChange",function(e){return t.state.client["themes.user_change"]=e}),s._uU(42,"Allow Theme Change"),s.qZA(),s.TgZ(43,"p",18),s._uU(44,"Allow user to switch from dark to light mode and vice versa."),s.qZA(),s.qZA(),s._UZ(45,"div",27),s.TgZ(46,"button",28),s.NdJ("click",function(){return t.createSitemap()}),s.ALo(47,"async"),s._uU(48," Generate Sitemap "),s.qZA(),s.TgZ(49,"p",29),s.TgZ(50,"span",18),s._uU(51,"Once generated, sitemap index url will be"),s.qZA(),s._uU(52,": "),s.TgZ(53,"a",30),s._uU(54),s.qZA(),s.qZA(),s._UZ(55,"div",27),s.TgZ(56,"button",31),s.ALo(57,"async"),s._uU(58," Update "),s.qZA(),s.YNc(59,$t,1,0,"mat-progress-bar",32),s.ALo(60,"async"),s.qZA()),2&e&&(s.xp6(6),s.ekj("has-error",t.urlsDontMatch()),s.xp6(3),s.Q6J("ngModel",t.state.server.app_url),s.xp6(1),s.Q6J("ngIf",t.urlsDontMatch()),s.xp6(4),s.Q6J("ngIf",!t.settings.get("site.hide_docs_buttons")),s.xp6(6),s.Q6J("ngModel",t.state.client["homepage.type"]),s.xp6(5),s.Q6J("ngForOf",s.lcZ(26,16,t.menuItemCategories$)),s.xp6(4),s.Q6J("ngForOf",s.lcZ(30,18,t.menuItemCategories$)),s.xp6(2),s.Q6J("ngIf","component"===t.state.client["homepage.type"]),s.xp6(4),s.Q6J("ngModel",t.state.client["themes.default_mode"]),s.xp6(6),s.Q6J("ngModel",t.state.client["themes.user_change"]),s.xp6(5),s.Q6J("disabled",s.lcZ(47,20,t.state.loading$)),s.xp6(7),s.Q6J("href",t.settings.getBaseUrl()+"/storage/sitemaps/sitemap-index.xml",s.LSH),s.xp6(1),s.hij("",t.settings.getBaseUrl(),"/storage/sitemaps/sitemap-index.xml"),s.xp6(2),s.Q6J("disabled",s.lcZ(57,22,t.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(60,24,t.state.loading$)))},directives:[Zt.P,a.JL,a.F,a.Fj,a.Q7,a.JJ,a.On,i.O5,P.Hw,a.EJ,a.YN,a.Kr,i.sg,T.Rr,p.lW,C.pW],pipes:[i.Ov],styles:[".sitemap-description[_ngcontent-%COMP%]{color:var(--be-secondary-text)}"],changeDetection:0}),e})();function Ht(e,t){1&e&&(s.ynx(0),s.TgZ(1,"span",7),s._uU(2,"Outgoing mail method needs to be setup before enabling this setting."),s.qZA(),s._uU(3," "),s.TgZ(4,"a",23),s._uU(5,"Fix now."),s.qZA(),s.BQk())}function zt(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",26),s.TgZ(2,"label",27),s._uU(3,"Envato ID"),s.qZA(),s.TgZ(4,"input",28),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.envato_id=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",26),s.TgZ(6,"label",29),s._uU(7,"Envato Secret"),s.qZA(),s.TgZ(8,"input",30),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.envato_secret=t}),s.qZA(),s.qZA(),s.TgZ(9,"div",26),s.TgZ(10,"label",31),s._uU(11,"Envato Personal Token"),s.qZA(),s.TgZ(12,"input",32),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.envato_personal_token=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(3);s.xp6(4),s.Q6J("ngModel",e.state.server.envato_id),s.xp6(4),s.Q6J("ngModel",e.state.server.envato_secret),s.xp6(4),s.Q6J("ngModel",e.state.server.envato_personal_token)}}function Bt(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",24),s.TgZ(2,"mat-slide-toggle",25),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["social.envato.enable"]=t}),s._uU(3,"Envato Login"),s.qZA(),s.TgZ(4,"p",7),s._uU(5,"Enable logging into the site via envato."),s.qZA(),s.qZA(),s.YNc(6,zt,13,3,"ng-container",8),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(2),s.Q6J("ngModel",e.state.client["social.envato.enable"]),s.xp6(4),s.Q6J("ngIf",e.state.client["social.envato.enable"])}}function jt(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",26),s.TgZ(2,"label",33),s._uU(3,"Google Client ID"),s.qZA(),s.TgZ(4,"input",34),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.google_id=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",26),s.TgZ(6,"label",35),s._uU(7,"Google Client Secret"),s.qZA(),s.TgZ(8,"input",36),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.google_secret=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.google_id),s.xp6(4),s.Q6J("ngModel",e.state.server.google_secret)}}function Gt(e,t){if(1&e&&s._UZ(0,"p",37),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.google_group,s.oJD)}}function Xt(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",26),s.TgZ(2,"label",38),s._uU(3,"Facebook App ID"),s.qZA(),s.TgZ(4,"input",39),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.facebook_id=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",26),s.TgZ(6,"label",40),s._uU(7,"Facebook App Secret"),s.qZA(),s.TgZ(8,"input",41),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.facebook_secret=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.facebook_id),s.xp6(4),s.Q6J("ngModel",e.state.server.facebook_secret)}}function Wt(e,t){if(1&e&&s._UZ(0,"p",37),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.facebook_group,s.oJD)}}function Kt(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",26),s.TgZ(2,"label",42),s._uU(3,"Twitter ID"),s.qZA(),s.TgZ(4,"input",43),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.twitter_id=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",26),s.TgZ(6,"label",44),s._uU(7,"Twitter Secret"),s.qZA(),s.TgZ(8,"input",45),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.twitter_secret=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.twitter_id),s.xp6(4),s.Q6J("ngModel",e.state.server.twitter_secret)}}function en(e,t){if(1&e&&s._UZ(0,"p",37),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.twitter_group,s.oJD)}}function tn(e,t){1&e&&s._UZ(0,"mat-progress-bar",46)}function nn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"div",5),s.TgZ(2,"mat-slide-toggle",6),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client.require_email_confirmation=t}),s._uU(3,"Require Email Confirmation"),s.qZA(),s.TgZ(4,"p"),s.TgZ(5,"span",7),s._uU(6,"Require new users to validate their email address before being able to login."),s.qZA(),s._UZ(7,"br"),s.YNc(8,Ht,6,0,"ng-container",8),s.qZA(),s.qZA(),s.TgZ(9,"div",5),s.TgZ(10,"mat-slide-toggle",9),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["registration.disable"]=t}),s._uU(11,"Disable Registration"),s.qZA(),s.TgZ(12,"p",7),s._uU(13,"All registration (including social login) will be disabled."),s.qZA(),s.qZA(),s.TgZ(14,"div",5),s.TgZ(15,"mat-slide-toggle",10),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client.single_device_login=t}),s._uU(16,"Single Device Login"),s.qZA(),s.TgZ(17,"p",7),s._uU(18,"Only allow one device to be logged into user account at the same time."),s.qZA(),s.qZA(),s.YNc(19,Bt,7,2,"ng-container",8),s.TgZ(20,"div",11),s.TgZ(21,"div",12),s.TgZ(22,"mat-slide-toggle",13),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["social.google.enable"]=t}),s._uU(23,"Google Login"),s.qZA(),s.TgZ(24,"p",7),s._uU(25,"Enable logging into the site via google."),s.qZA(),s.qZA(),s.YNc(26,jt,9,2,"ng-container",8),s.YNc(27,Gt,1,1,"p",14),s.qZA(),s.TgZ(28,"div",15),s.TgZ(29,"div",16),s.TgZ(30,"mat-slide-toggle",17),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["social.facebook.enable"]=t}),s._uU(31,"Facebook Login"),s.qZA(),s.TgZ(32,"p",7),s._uU(33,"Enable logging into the site via facebook."),s.qZA(),s.qZA(),s.YNc(34,Xt,9,2,"ng-container",8),s.YNc(35,Wt,1,1,"p",14),s.qZA(),s.TgZ(36,"div",18),s.TgZ(37,"div",19),s.TgZ(38,"mat-slide-toggle",20),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["social.twitter.enable"]=t}),s._uU(39,"Twitter Login"),s.qZA(),s.TgZ(40,"p",7),s._uU(41,"Enable logging into the site via twitter."),s.qZA(),s.qZA(),s.YNc(42,Kt,9,2,"ng-container",8),s.YNc(43,en,1,1,"p",14),s.qZA(),s.TgZ(44,"button",21),s.ALo(45,"async"),s._uU(46," Update "),s.qZA(),s.YNc(47,tn,1,0,"mat-progress-bar",22),s.ALo(48,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(2),s.Q6J("disabled",!n.state.client.require_email_confirmation&&!n.state.server.mail_setup)("ngModel",n.state.client.require_email_confirmation),s.xp6(6),s.Q6J("ngIf",!n.state.server.mail_setup),s.xp6(2),s.Q6J("ngModel",n.state.client["registration.disable"]),s.xp6(5),s.Q6J("ngModel",n.state.client.single_device_login),s.xp6(4),s.Q6J("ngIf",n.settings.get("envato.enable")),s.xp6(1),s.ekj("has-error",e.google_group),s.xp6(2),s.Q6J("ngModel",n.state.client["social.google.enable"]),s.xp6(4),s.Q6J("ngIf",n.state.client["social.google.enable"]),s.xp6(1),s.Q6J("ngIf",e.google_group),s.xp6(1),s.ekj("has-error",e.facebook_group),s.xp6(2),s.Q6J("ngModel",n.state.client["social.facebook.enable"]),s.xp6(4),s.Q6J("ngIf",n.state.client["social.facebook.enable"]),s.xp6(1),s.Q6J("ngIf",e.facebook_group),s.xp6(1),s.ekj("has-error",e.twitter_group),s.xp6(2),s.Q6J("ngModel",n.state.client["social.twitter.enable"]),s.xp6(4),s.Q6J("ngIf",n.state.client["social.twitter.enable"]),s.xp6(1),s.Q6J("ngIf",e.twitter_group),s.xp6(1),s.Q6J("disabled",s.lcZ(45,23,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(48,25,n.state.loading$))}}let an=(()=>{class e extends vt{}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["authentication-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs social-login-container","ngNativeValidate","",3,"ngSubmit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs","social-login-container",3,"ngSubmit"],[1,"setting-toggle-container"],["name","require_email_confirmation","id","require_email_confirmation","trans","",3,"disabled","ngModel","ngModelChange"],["trans",""],[4,"ngIf"],["name","registration.disable","id","registration.disable","trans","",3,"ngModel","ngModelChange"],["name","single_device_login","id","single_device_login","trans","",3,"ngModel","ngModelChange"],["id","google_group",1,"error-group","many-inputs","no-bottom-border"],[1,"setting-toggle-container","google"],["name","social.google.enable","id","social.google.enable","trans","",3,"ngModel","ngModelChange"],["class","error",3,"innerHTML",4,"ngIf"],[1,"error-group","many-inputs","no-bottom-border"],[1,"setting-toggle-container","facebook"],["name","social.facebook.enable","id","social.facebook.enable","trans","",3,"ngModel","ngModelChange"],[1,"error-group","many-inputs"],[1,"setting-toggle-container","twitter"],["name","social.twitter.enable","id","social.twitter.enable","trans","",3,"ngModel","ngModelChange"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["routerLink","/admin/settings/mail","trans",""],[1,"setting-toggle-container","envato"],["name","social.envato.enable","id","social.envato.enable","trans","",3,"ngModel","ngModelChange"],[1,"input-container"],["for","social.envato.id","trans",""],["name","social.envato.id","id","social.envato.id",3,"ngModel","ngModelChange"],["for","social.envato.secret","trans",""],["name","social.envato.secret","id","social.envato.secret",3,"ngModel","ngModelChange"],["for","social.envato.personal_token","trans",""],["name","social.envato.personal_token","id","social.envato.personal_token",3,"ngModel","ngModelChange"],["for","social.google.id","trans",""],["name","social.google.id","id","social.google.id",3,"ngModel","ngModelChange"],["for","social.google.secret","trans",""],["name","social.google.secret","id","social.google.secret",3,"ngModel","ngModelChange"],[1,"error",3,"innerHTML"],["for","social.facebook.id","trans",""],["name","social.facebook.id","id","social.facebook.id",3,"ngModel","ngModelChange"],["for","social.facebook.secret","trans",""],["name","social.facebook.secret","id","social.facebook.secret",3,"ngModel","ngModelChange"],["for","social.twitter.id","trans",""],["name","social.twitter.id","id","social.twitter.id",3,"ngModel","ngModelChange"],["for","social.twitter.secret","trans",""],["name","social.twitter.secret","id","social.twitter.secret",3,"ngModel","ngModelChange"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Authentication"),s.qZA(),s.TgZ(3,"div",2),s._uU(4," Configure registration, social login and related 3rd party integrations. "),s.qZA(),s.qZA(),s.YNc(5,nn,49,27,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,T.Rr,a.JJ,a.On,p.lW,r.yS,a.Fj,C.pW],pipes:[i.Ov],styles:["authentication-settings .twitter .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background:#4db5f5}authentication-settings .twitter .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background:#1da1f2}authentication-settings .facebook .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background:#4c70ba}authentication-settings .facebook .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb,authentication-settings .facebook .pretty-checkbox:checked+label:before{background:#3b5998}authentication-settings .google .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background:#dc6e60}authentication-settings .google .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background:#d34836}authentication-settings .envato .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background:#9bc762}authentication-settings .envato .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background:#82b541}"],encapsulation:2,changeDetection:0}),e})();function sn(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",6),s.TgZ(2,"label",21),s._uU(3,"Memcached Host"),s.qZA(),s.TgZ(4,"input",22),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.memcached_host=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",6),s.TgZ(6,"label",23),s._uU(7,"Memcached Port"),s.qZA(),s.TgZ(8,"input",24),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.memcached_port=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.memcached_host),s.xp6(4),s.Q6J("ngModel",e.state.server.memcached_port)}}function on(e,t){if(1&e&&s._UZ(0,"p",25),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.cache_group,s.oJD)}}function rn(e,t){1&e&&s._UZ(0,"mat-progress-bar",26)}function ln(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"label",7),s._uU(4,"Cache Method"),s.qZA(),s.TgZ(5,"select",8),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.cache_driver=t})("ngModelChange",function(){return s.CHM(e),s.oxw().clearErrors()}),s.TgZ(6,"option",9),s._uU(7,"File (Default)"),s.qZA(),s.TgZ(8,"option",10),s._uU(9,"None"),s.qZA(),s.TgZ(10,"option",11),s._uU(11,"APC"),s.qZA(),s.TgZ(12,"option",12),s._uU(13,"Memcached"),s.qZA(),s.TgZ(14,"option",13),s._uU(15,"Redis"),s.qZA(),s.qZA(),s.TgZ(16,"p",14),s._uU(17,"Which method should be used for storing and retrieving cached items."),s.qZA(),s.qZA(),s.YNc(18,sn,9,2,"ng-container",15),s.YNc(19,on,1,1,"p",16),s.qZA(),s.TgZ(20,"button",17),s.NdJ("click",function(){return s.CHM(e),s.oxw().clearCache()}),s._uU(21," Clear Cache "),s.qZA(),s.TgZ(22,"div",18),s.TgZ(23,"div",1),s._uU(24,"Important!"),s.qZA(),s.TgZ(25,"p",14),s._uU(26,' "File" is the best option for most cases and should not be changed, unless you are familiar with another cache method and have it set up on the server already. '),s.qZA(),s.qZA(),s.TgZ(27,"button",19),s.ALo(28,"async"),s._uU(29," Update "),s.qZA(),s.YNc(30,rn,1,0,"mat-progress-bar",20),s.ALo(31,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(1),s.ekj("has-error",e.cache_group),s.xp6(4),s.Q6J("ngModel",n.state.server.cache_driver),s.xp6(13),s.Q6J("ngIf","memcached"===n.state.server.cache_driver),s.xp6(1),s.Q6J("ngIf",e.cache_group),s.xp6(8),s.Q6J("disabled",s.lcZ(28,7,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(31,9,n.state.loading$))}}let cn=(()=>{class e extends vt{clearCache(){this.state.loading$.next(!0),this.http.post("cache/flush").pipe((0,pt.x)(()=>this.state.loading$.next(!1))).subscribe(()=>{this.toast.open("Cache cleared.")})}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["cache-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],["id","cache_group",1,"error-group","many-inputs","no-border-top"],[1,"input-container"],["for","cache.driver","trans",""],["name","cache.driver","id","cache.driver",3,"ngModel","ngModelChange"],["value","file"],["value","array"],["value","apc"],["value","memcached"],["value","redis"],["trans",""],[4,"ngIf"],["class","error",3,"innerHTML",4,"ngIf"],["mat-stroked-button","","color","accent","type","button","trans","",1,"button","flat",3,"click"],[1,"widget","widget-info","widget-important"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["for","cache.memcached_host","trans",""],["name","cache.memcached_host","id","cache.memcached_host","required","",3,"ngModel","ngModelChange"],["for","cache.memcached_port","trans",""],["type","number","name","cache.memcached_port","id","cache.memcached_port","required","",3,"ngModel","ngModelChange"],[1,"error",3,"innerHTML"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Cache"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Configure cache time, method and related 3rd party integrations."),s.qZA(),s.qZA(),s.YNc(5,ln,32,11,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,a.EJ,a.JJ,a.On,a.YN,a.Kr,p.lW,a.Fj,a.Q7,a.wV,C.pW],pipes:[i.Ov],encapsulation:2,changeDetection:0}),e})();function dn(e,t){if(1&e&&(s.TgZ(0,"p",19),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.certificate)}}function un(e,t){if(1&e&&s._UZ(0,"p",20),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.analytics_group,s.oJD)}}function pn(e,t){1&e&&s._UZ(0,"mat-progress-bar",21)}function gn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"label",7),s._uU(4,"Google Service Account Key File (.json)"),s.qZA(),s.TgZ(5,"input",8,9),s.NdJ("change",function(){s.CHM(e);const t=s.MAs(6);return s.oxw().setCertificateFile(t.files)}),s.qZA(),s.YNc(7,dn,2,1,"p",10),s.qZA(),s.TgZ(8,"div",6),s.TgZ(9,"label",11),s._uU(10,"Google Analytics View ID"),s.qZA(),s.TgZ(11,"input",12),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.analytics_view_id=t}),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s.TgZ(13,"label",13),s._uU(14,"Google Analytics Tracking Code"),s.qZA(),s.TgZ(15,"input",14),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["analytics.tracking_code"]=t}),s.qZA(),s.TgZ(16,"p",15),s._uU(17,"Google analytics tracking code only, not the whole javascript code snippet."),s.qZA(),s.qZA(),s.YNc(18,un,1,1,"p",16),s.qZA(),s.TgZ(19,"button",17),s.ALo(20,"async"),s._uU(21," Update "),s.qZA(),s.YNc(22,pn,1,0,"mat-progress-bar",18),s.ALo(23,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(1),s.ekj("has-error",e.analytics_group),s.xp6(1),s.ekj("has-error",e.certificate),s.xp6(5),s.Q6J("ngIf",e.certificate),s.xp6(4),s.Q6J("ngModel",n.state.server.analytics_view_id),s.xp6(4),s.Q6J("ngModel",n.state.client["analytics.tracking_code"]),s.xp6(3),s.Q6J("ngIf",e.analytics_group),s.xp6(1),s.Q6J("disabled",s.lcZ(20,10,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(23,12,n.state.loading$))}}let hn=(()=>{class e extends vt{saveSettings(e){const t=this.getPayload(e||this.state.getModified());super.saveSettings(t)}getPayload(e){return this.certificateFile&&(e.files={certificate:this.certificateFile}),e}setCertificateFile(e){this.certificateFile=e.item(0)}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["analytics-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],[1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],["id","analytics_group",1,"error-group","many-inputs","no-spacing"],[1,"input-container"],["for","certificate","trans",""],["type","file","id","certificate","name","certificate","accept",".json",3,"change"],["fileInput",""],["class","error",4,"ngIf"],["for","analytics.view_id","trans",""],["type","number","name","analytics.view_id","id","analytics.view_id",3,"ngModel","ngModelChange"],["for","analytics.tracking_code","trans",""],["name","analytics.tracking_code","id","analytics.tracking_code","min","1","max","20","placeholder","UA-******-2",3,"ngModel","ngModelChange"],["trans",""],["class","error",3,"innerHTML",4,"ngIf"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"error"],[1,"error",3,"innerHTML"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Analytics"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Configure google analytics integration and credentials."),s.qZA(),s.qZA(),s.YNc(5,gn,24,14,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,a.wV,a.Fj,a.JJ,a.On,p.lW,C.pW],pipes:[i.Ov],encapsulation:2,changeDetection:0}),e})();var mn=n(18256);function fn(e,t){if(1&e&&(s.TgZ(0,"option",22),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.value),s.xp6(1),s.hij(" ",e.text," ")}}function _n(e,t){if(1&e&&(s.TgZ(0,"optgroup",21),s.YNc(1,fn,2,2,"option",11),s.qZA()),2&e){const e=t.$implicit;s.Q6J("label",e.key),s.xp6(1),s.Q6J("ngForOf",e.value)}}function bn(e,t){if(1&e&&(s.TgZ(0,"option",22),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.language),s.xp6(1),s.hij(" ",e.name," ")}}function vn(e,t){if(1&e&&(s.TgZ(0,"option",22),s._uU(1),s.ALo(2,"formattedDate"),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.Q6J("value",e),s.xp6(1),s.AsE(" ",s.xi3(2,3,n.getCurrentDate(),e)," (",e,") ")}}function Zn(e,t){1&e&&s._UZ(0,"mat-progress-bar",23)}let xn=(()=>{class e extends vt{constructor(){super(...arguments),this.selects={timezones:{},localizations:[]},this.defaultDateFormats=["MMMM d, y","yyyy-MM-dd","M/d/y","d/M/y"]}ngOnInit(){const e=this.state.client["dates.format"];this.initialDateFormat=this.defaultDateFormats.includes(e)?e:"custom",this.valueLists.get(["timezones","localizations"]).subscribe(e=>{this.selects=e,this.cd.markForCheck()})}getCurrentDate(){return new Date}updateDateFormat(e){e&&"custom"!==e&&(this.state.client["dates.format"]=e)}selectedDateFormat(){return this.state.client["dates.format"]}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["localization-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:51,vars:28,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],[1,"body","many-inputs",3,"submit"],[1,"input-container"],["for","app.timezone","trans",""],["name","app.timezone","id","app.timezone",3,"ngModel","ngModelChange"],[3,"label",4,"ngFor","ngForOf"],["trans",""],["for","app.locale","trans",""],["name","app.locale","id","app.locale",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["for","dates.format","trans",""],["name","dates.format","id","dates.format","required","",1,"no-capitalize",3,"ngModel","ngModelChange"],["value","custom","trans",""],["for","dates.custom-format","trans",""],["type","text","id","dates.custom-format","name","dates.custom-format","required","",3,"ngModel","ngModelChange"],[1,"setting-toggle-container"],["name","translations","trans","",3,"ngModel","ngModelChange"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[3,"label"],[3,"value"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Localization"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Manage localization settings for the site."),s.qZA(),s.qZA(),s.TgZ(5,"form",3),s.NdJ("submit",function(){return t.saveSettings()}),s.TgZ(6,"div",4),s.TgZ(7,"label",5),s._uU(8,"Timezone"),s.qZA(),s.TgZ(9,"select",6),s.NdJ("ngModelChange",function(e){return t.state.server.app_timezone=e}),s.YNc(10,_n,2,2,"optgroup",7),s.ALo(11,"keyvalue"),s.qZA(),s.TgZ(12,"p",8),s._uU(13,"Choose either a city in the same timezone as you or a UTC timezone offset."),s.qZA(),s.qZA(),s.TgZ(14,"div",4),s.TgZ(15,"label",9),s._uU(16,"Site Language"),s.qZA(),s.TgZ(17,"select",10),s.NdJ("ngModelChange",function(e){return t.state.server.app_locale=e}),s.YNc(18,bn,2,2,"option",11),s.qZA(),s.TgZ(19,"p",8),s._uU(20,"Which translation should be selected by default for new users."),s.qZA(),s.qZA(),s.TgZ(21,"div",4),s.TgZ(22,"label",12),s._uU(23,"Date Format"),s.qZA(),s.TgZ(24,"select",13),s.NdJ("ngModelChange",function(e){return t.initialDateFormat=e})("ngModelChange",function(e){return t.updateDateFormat(e)}),s.YNc(25,vn,3,6,"option",11),s.TgZ(26,"option",14),s._uU(27,"Custom"),s.qZA(),s.qZA(),s.TgZ(28,"p"),s._uU(29),s.ALo(30,"trans"),s._UZ(31,"br"),s._uU(32),s.ALo(33,"trans"),s.TgZ(34,"strong"),s._uU(35),s.ALo(36,"formattedDate"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(37,"div",4),s.TgZ(38,"label",15),s._uU(39,"Custom Date Format"),s.qZA(),s.TgZ(40,"input",16),s.NdJ("ngModelChange",function(e){return t.state.client["dates.format"]=e}),s.qZA(),s.qZA(),s.TgZ(41,"div",17),s.TgZ(42,"mat-slide-toggle",18),s.NdJ("ngModelChange",function(e){return t.state.client["i18n.enable"]=e}),s._uU(43,"Translations"),s.qZA(),s.TgZ(44,"p",8),s._uU(45,"Enable translations functionality for the site."),s.qZA(),s.qZA(),s.TgZ(46,"button",19),s.ALo(47,"async"),s._uU(48," Update "),s.qZA(),s.YNc(49,Zn,1,0,"mat-progress-bar",20),s.ALo(50,"async"),s.qZA()),2&e&&(s.xp6(9),s.Q6J("ngModel",t.state.server.app_timezone),s.xp6(1),s.Q6J("ngForOf",s.lcZ(11,15,t.selects.timezones)),s.xp6(7),s.Q6J("ngModel",t.state.server.app_locale),s.xp6(1),s.Q6J("ngForOf",t.selects.localizations),s.xp6(6),s.Q6J("ngModel",t.initialDateFormat),s.xp6(1),s.Q6J("ngForOf",t.defaultDateFormats),s.xp6(4),s.hij(" ",s.lcZ(30,17,"Default format for dates on the site.")," "),s.xp6(3),s.hij(" ",s.lcZ(33,19,"Preview:")," "),s.xp6(3),s.Oqu(s.xi3(36,21,t.getCurrentDate(),t.selectedDateFormat())),s.xp6(2),s.ekj("hidden","custom"!==t.initialDateFormat),s.xp6(3),s.Q6J("ngModel",t.state.client["dates.format"]),s.xp6(2),s.Q6J("ngModel",t.state.client["i18n.enable"]),s.xp6(4),s.Q6J("disabled",s.lcZ(47,24,t.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(50,26,t.state.loading$)))},directives:[Zt.P,a._Y,a.JL,a.F,a.EJ,a.JJ,a.On,i.sg,a.Q7,a.YN,a.Kr,a.Fj,T.Rr,p.lW,i.O5,C.pW],pipes:[i.Nd,lt.R,mn.l,i.Ov],encapsulation:2,changeDetection:0}),e})();function yn(e,t){1&e&&(s.TgZ(0,"a",42),s._uU(1,"Learn more. "),s.qZA())}function An(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",34),s.TgZ(2,"div",5),s.TgZ(3,"label",35),s._uU(4,"Incoming Mail Method"),s.qZA(),s.TgZ(5,"select",36),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["mail.handler"]=t}),s.TgZ(6,"option",37),s._uU(7,"Mailgun"),s.qZA(),s.TgZ(8,"option",38),s._uU(9,"Gmail API"),s.qZA(),s.TgZ(10,"option",39),s._uU(11,"Rest API (Send emails via http API)"),s.qZA(),s.TgZ(12,"option",40),s._uU(13,"Pipe (Pipe emails directly)"),s.qZA(),s.qZA(),s.TgZ(14,"p"),s.TgZ(15,"span",8),s._uU(16,"Which method should be used to handle incoming application emails."),s.qZA(),s.TgZ(17,"span",26),s._UZ(18,"mat-icon",27),s.YNc(19,yn,2,0,"a",41),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(5),s.Q6J("ngModel",e.state.client["mail.handler"]),s.xp6(14),s.Q6J("ngIf",!e.settings.get("site.hide_docs_buttons"))}}function wn(e,t){1&e&&(s.TgZ(0,"a",43),s._uU(1,"Learn more. "),s.qZA())}function Cn(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",5),s.TgZ(2,"label",44),s._uU(3,"SMTP Host"),s.qZA(),s.TgZ(4,"input",45),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mail_host=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.TgZ(6,"label",46),s._uU(7,"SMTP Username"),s.qZA(),s.TgZ(8,"input",47),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mail_username=t}),s.qZA(),s.qZA(),s.TgZ(9,"div",5),s.TgZ(10,"label",48),s._uU(11,"SMTP Password"),s.qZA(),s.TgZ(12,"input",49),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mail_password=t}),s.qZA(),s.qZA(),s.TgZ(13,"div",5),s.TgZ(14,"label",50),s._uU(15,"SMTP Port"),s.qZA(),s.TgZ(16,"input",51),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mail_port=t}),s.qZA(),s.qZA(),s.TgZ(17,"div",5),s.TgZ(18,"label",52),s._uU(19,"SMTP Encryption"),s.qZA(),s.TgZ(20,"input",53),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mail_encryption=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.mail_host),s.xp6(4),s.Q6J("ngModel",e.state.server.mail_username),s.xp6(4),s.Q6J("ngModel",e.state.server.mail_password),s.xp6(4),s.Q6J("ngModel",e.state.server.mail_port),s.xp6(4),s.Q6J("ngModel",e.state.server.mail_encryption)}}function Tn(e,t){if(1&e&&(s.TgZ(0,"div",59),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.mailgun_domain)}}function qn(e,t){if(1&e&&(s.TgZ(0,"div",59),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.mailgun_secret)}}function kn(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",5),s.TgZ(2,"label",54),s._uU(3,"Mailgun Domain"),s.qZA(),s.TgZ(4,"input",55),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mailgun_domain=t}),s.qZA(),s.YNc(5,Tn,2,1,"div",56),s.TgZ(6,"p",8),s._uU(7,"Usually the domain of your site (site.com)"),s.qZA(),s.qZA(),s.TgZ(8,"div",5),s.TgZ(9,"label",57),s._uU(10,"Mailgun API Key"),s.qZA(),s.TgZ(11,"input",58),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.mailgun_secret=t}),s.qZA(),s.YNc(12,qn,2,1,"div",56),s.TgZ(13,"p",8),s._uU(14,'Should start with "key-"'),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw().ngIf,t=s.oxw();s.xp6(1),s.ekj("has-error",e.mailgun_domain),s.xp6(3),s.Q6J("ngModel",t.state.server.mailgun_domain),s.xp6(1),s.Q6J("ngIf",e.mailgun_domain),s.xp6(3),s.ekj("has-error",e.mailgun_secret),s.xp6(3),s.Q6J("ngModel",t.state.server.mailgun_secret),s.xp6(1),s.Q6J("ngIf",e.mailgun_secret)}}function Mn(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",5),s.TgZ(2,"label",60),s._uU(3,"SES Key"),s.qZA(),s.TgZ(4,"input",61),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.ses_key=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.TgZ(6,"label",62),s._uU(7,"SES Secret"),s.qZA(),s.TgZ(8,"input",63),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.ses_secret=t}),s.qZA(),s.qZA(),s.TgZ(9,"div",5),s.TgZ(10,"label",64),s._uU(11,"SES Region"),s.qZA(),s.TgZ(12,"input",65),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.ses_region=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.ses_key),s.xp6(4),s.Q6J("ngModel",e.state.server.ses_secret),s.xp6(4),s.Q6J("ngModel",e.state.server.ses_region)}}function In(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",5),s.TgZ(1,"label",66),s._uU(2,"Sparkpost Secret"),s.qZA(),s.TgZ(3,"input",67),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.sparkpost_secret=t}),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(3),s.Q6J("ngModel",e.state.server.sparkpost_secret)}}function Un(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",5),s.TgZ(1,"label",73),s._uU(2,"Gmail Topic Name"),s.qZA(),s.TgZ(3,"input",74),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.client["gmail.incoming.topicName"]=t}),s.qZA(),s.TgZ(4,"p",8),s._uU(5,"Google cloud Pub/Sub topic name."),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(3);s.xp6(3),s.Q6J("ngModel",e.state.client["gmail.incoming.topicName"])}}function On(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",75),s._UZ(1,"img",76),s.TgZ(2,"span",77),s._uU(3),s.qZA(),s.TgZ(4,"button",78),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).connectGmailAccount()}),s._uU(5," Reconnect "),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(3);s.xp6(3),s.hij("Gmail ",e.state.server.connectedGmailAccount,"")}}function Dn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",79),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).connectGmailAccount()}),s._UZ(1,"img",76),s.TgZ(2,"span",80),s._uU(3,"Connect gmail account"),s.qZA(),s.qZA()}}function Pn(e,t){if(1&e&&(s.TgZ(0,"p",59),s._uU(1),s.qZA()),2&e){const e=t.ngIf;s.xp6(1),s.Oqu(e)}}function Sn(e,t){if(1&e&&(s.TgZ(0,"div",68),s.YNc(1,Un,6,1,"div",29),s.TgZ(2,"div",69),s.TgZ(3,"div",70),s._uU(4,"Gmail account:"),s.qZA(),s.YNc(5,On,6,1,"div",71),s.YNc(6,Dn,4,0,"button",72),s.YNc(7,Pn,2,1,"p",56),s.ALo(8,"async"),s.qZA(),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf","gmailApi"===e.state.client["mail.handler"]),s.xp6(4),s.Q6J("ngIf",e.state.server.connectedGmailAccount),s.xp6(1),s.Q6J("ngIf",!e.state.server.connectedGmailAccount),s.xp6(1),s.Q6J("ngIf",s.lcZ(8,4,e.state.errors$).gmail_group)}}function Jn(e,t){if(1&e&&s._UZ(0,"p",81),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.mail_group,s.oJD)}}function Nn(e,t){1&e&&s._UZ(0,"mat-progress-bar",82)}const Rn=function(e){return{url:e}};function Qn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"div",5),s.TgZ(2,"label",6),s._uU(3,"From Address"),s.qZA(),s.TgZ(4,"input",7),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.mail_from_address=t}),s.qZA(),s.TgZ(5,"p",8),s._uU(6,"All outgoing application emails will be sent from this email address."),s.qZA(),s.qZA(),s.TgZ(7,"div",5),s.TgZ(8,"label",9),s._uU(9,"Contact Page Address"),s.qZA(),s.TgZ(10,"input",10),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["mail.contact_page_address"]=t}),s.qZA(),s.TgZ(11,"p",11),s._uU(12," Where emails from :url page should be sent to. "),s.qZA(),s.qZA(),s.TgZ(13,"div",5),s.TgZ(14,"label",12),s._uU(15,"From Name"),s.qZA(),s.TgZ(16,"input",13),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.mail_from_name=t}),s.qZA(),s.TgZ(17,"p",8),s._uU(18,"All outgoing application emails will be sent using this name."),s.qZA(),s.qZA(),s.TgZ(19,"div",14),s.TgZ(20,"div",1),s._uU(21,"Important!"),s.qZA(),s.TgZ(22,"p",8),s._uU(23," Your selected mail method must be authorized to send emails using this address and name. "),s.qZA(),s.qZA(),s.YNc(24,An,20,2,"ng-container",15),s.TgZ(25,"div",16),s.TgZ(26,"div",5),s.TgZ(27,"label",17),s._uU(28,"Outgoing Mail Method"),s.qZA(),s.TgZ(29,"select",18),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.mail_driver=t})("ngModelChange",function(){return s.CHM(e),s.oxw().clearErrors()}),s.TgZ(30,"option",19),s._uU(31,"Mailgun"),s.qZA(),s.TgZ(32,"option",20),s._uU(33,"Gmail Api"),s.qZA(),s.TgZ(34,"option",21),s._uU(35,"SMTP"),s.qZA(),s.TgZ(36,"option",22),s._uU(37,"SparkPost"),s.qZA(),s.TgZ(38,"option",23),s._uU(39,"Ses (Amazon Simple Email Service)"),s.qZA(),s.TgZ(40,"option",24),s._uU(41,"SendMail"),s.qZA(),s.TgZ(42,"option",25),s._uU(43,"Log (Email will be saved to error log)"),s.qZA(),s.qZA(),s.TgZ(44,"p"),s.TgZ(45,"span",8),s._uU(46,"Which method should be used for sending outgoing application emails."),s.qZA(),s.TgZ(47,"span",26),s._UZ(48,"mat-icon",27),s.YNc(49,wn,2,0,"a",28),s.qZA(),s.qZA(),s.qZA(),s.YNc(50,Cn,21,5,"ng-container",15),s.YNc(51,kn,15,8,"ng-container",15),s.YNc(52,Mn,13,3,"ng-container",15),s.YNc(53,In,4,1,"div",29),s.YNc(54,Sn,9,6,"div",30),s.YNc(55,Jn,1,1,"p",31),s.qZA(),s.TgZ(56,"button",32),s.ALo(57,"async"),s._uU(58," Update "),s.qZA(),s.YNc(59,Nn,1,0,"mat-progress-bar",33),s.ALo(60,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(4),s.Q6J("ngModel",n.state.server.mail_from_address),s.xp6(6),s.Q6J("ngModel",n.state.client["mail.contact_page_address"]),s.xp6(1),s.Q6J("transValues",s.VKq(21,Rn,n.settings.getBaseUrl()+"/contact")),s.xp6(5),s.Q6J("ngModel",n.state.server.mail_from_name),s.xp6(8),s.Q6J("ngIf",n.settings.get("vebto.admin.showIncomingMailMethod")),s.xp6(1),s.ekj("has-error",e.mail_group),s.xp6(4),s.Q6J("ngModel",n.state.server.mail_driver),s.xp6(20),s.Q6J("ngIf",!n.settings.get("site.hide_docs_buttons")),s.xp6(1),s.Q6J("ngIf","smtp"===n.state.server.mail_driver),s.xp6(1),s.Q6J("ngIf","mailgun"===n.state.server.mail_driver),s.xp6(1),s.Q6J("ngIf","ses"===n.state.server.mail_driver),s.xp6(1),s.Q6J("ngIf","sparkpost"===n.state.server.mail_driver),s.xp6(1),s.Q6J("ngIf","gmailApi"===n.state.client["mail.handler"]||"gmailApi"===n.state.server.mail_driver),s.xp6(1),s.Q6J("ngIf",e.mail_group),s.xp6(1),s.Q6J("disabled",s.lcZ(57,17,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(60,19,n.state.loading$))}}let Fn=(()=>{class e extends vt{connectGmailAccount(){this.social.openNewSocialAuthWindow("secure/settings/mail/gmail/connect").then(e=>{this.state.server.connectedGmailAccount=e.email,this.state.errors$.next({}),this.toast.open(`Connected gmail account: ${e.email}`)})}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["mail-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],[1,"input-container"],["for","env.mail_from_address","trans",""],["type","email","name","env.mail_from_address","id","env.mail_from_address","required","",3,"ngModel","ngModelChange"],["trans",""],["for","mail.contact_page_address","trans",""],["type","email","name","mail.contact_page_address","id","mail.contact_page_address","required","",3,"ngModel","ngModelChange"],["trans","",3,"transValues"],["for","env.mail_from_name","trans",""],["name","env.mail_from_name","id","env.mail_from_name","required","",3,"ngModel","ngModelChange"],[1,"widget","widget-info","widget-important"],[4,"ngIf"],["id","mail_group",1,"error-group","many-inputs"],["for","mail.driver","trans",""],["name","mail.driver","id","mail.driver",3,"ngModel","ngModelChange"],["value","mailgun"],["value","gmailApi"],["value","smtp"],["value","sparkpost"],["value","ses"],["value","sendmail"],["value","log"],[1,"docs-link"],["svgIcon","link"],["href","https://support.vebto.com/help-center/articles/42/44/155/incoming-emails","target","_blank",4,"ngIf"],["class","input-container",4,"ngIf"],["id","gmail_group",4,"ngIf"],["class","error group-error",3,"innerHTML",4,"ngIf"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"error-group","no-bottom-border"],["for","mail.handler","trans",""],["name","mail.handler","id","mail.handler",3,"ngModel","ngModelChange"],["value","mailgun","trans",""],["value","gmailApi","trans",""],["value","null","trans",""],["value","mime","trans",""],["href","https://support.vebto.com/help-center/articles/76/configuring-email-provider","target","_blank",4,"ngIf"],["href","https://support.vebto.com/help-center/articles/76/configuring-email-provider","target","_blank"],["href","https://support.vebto.com/help-center/articles/42/44/155/incoming-emails","target","_blank"],["for","env.mail_host","trans",""],["name","env.mail_host","id","env.mail_host",3,"ngModel","ngModelChange"],["for","env.mail_username","trans",""],["name","env.mail_username","id","env.mail_username",3,"ngModel","ngModelChange"],["for","env.mail_password","trans",""],["type","password","name","env.mail_password","id","env.mail_password",3,"ngModel","ngModelChange"],["for","env.mail_port","trans",""],["name","env.mail_port","id","env.mail_port",3,"ngModel","ngModelChange"],["for","env.mail_encryption","trans",""],["name","env.mail_encryption","id","env.mail_encryption",3,"ngModel","ngModelChange"],["for","mailgun_domain","trans",""],["name","mailgun_domain","id","mailgun_domain",3,"ngModel","ngModelChange"],["class","error",4,"ngIf"],["for","mailgun_secret","trans",""],["name","mailgun_secret","id","mailgun_secret",3,"ngModel","ngModelChange"],[1,"error"],["for","env.ses_key","trans",""],["name","env.ses_key","id","env.ses_key",3,"ngModel","ngModelChange"],["for","env.ses_secret","trans",""],["name","env.ses_secret","id","env.ses_secret",3,"ngModel","ngModelChange"],["for","env.ses_region","trans",""],["name","env.ses_region","id","env.ses_region","placeholder","us-east-1",3,"ngModel","ngModelChange"],["for","env.sparkpost_secret","trans",""],["name","env.sparkpost_secret","id","env.sparkpost_secret",3,"ngModel","ngModelChange"],["id","gmail_group"],[1,"gmail-input-container"],[1,"gmail-label"],["class","authorized-gmail-account",4,"ngIf"],["type","button","mat-flat-button","","color","accent","class","connect-gmail-button",3,"click",4,"ngIf"],["for","gmail.incoming.topicName"],["type","text","id","gmail.incoming.topicName","name","webhook_secret_key","required","","minlength","10",3,"ngModel","ngModelChange"],[1,"authorized-gmail-account"],["src","client/assets/images/gmail.png","alt","",1,"gmail-img"],[1,"text"],["type","button","mat-button","","color","accent","trans","",3,"click"],["type","button","mat-flat-button","","color","accent",1,"connect-gmail-button",3,"click"],["trans","",1,"text"],[1,"error","group-error",3,"innerHTML"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Mail"),s.qZA(),s.TgZ(3,"div",2),s._uU(4," Change incoming and outgoing email handlers, email credentials and more. "),s.qZA(),s.qZA(),s.YNc(5,Qn,61,23,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,a.Fj,a.Q7,a.JJ,a.On,a.EJ,a.YN,a.Kr,P.Hw,p.lW,a.wO,C.pW],pipes:[i.Ov],styles:[".gmail-input-container[_ngcontent-%COMP%]{margin-bottom:20px}.authorized-gmail-account[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:var(--be-background-alternative);padding:10px;border-radius:4px;border:1px solid var(--be-divider-default)}.authorized-gmail-account[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-left:auto}.connect-gmail-button[_ngcontent-%COMP%]{line-height:58px;width:100%;position:relative}.connect-gmail-button[_ngcontent-%COMP%]   .gmail-img[_ngcontent-%COMP%]{position:absolute;top:15px;left:12px}.gmail-img[_ngcontent-%COMP%]{display:inline-block;width:30px;height:30px;flex-shrink:0;margin-right:10px}.gmail-label[_ngcontent-%COMP%]{color:var(--be-label);padding-bottom:5px}"],changeDetection:0}),e})();function En(e,t){if(1&e&&s._UZ(0,"p",14),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.logging_group,s.oJD)}}function Yn(e,t){1&e&&s._UZ(0,"mat-progress-bar",15)}function Ln(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"label",7),s._uU(4,"Sentry DSN"),s.qZA(),s.TgZ(5,"input",8),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.sentry_dsn=t}),s.qZA(),s.qZA(),s.YNc(6,En,1,1,"p",9),s.qZA(),s.TgZ(7,"div",10),s.TgZ(8,"div",1),s._uU(9,"Information"),s.qZA(),s.TgZ(10,"p"),s.TgZ(11,"a",11),s._uU(12,"Sentry"),s.qZA(),s.TgZ(13,"span"),s._uU(14),s.ALo(15,"trans"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(16,"button",12),s.ALo(17,"async"),s._uU(18," Update "),s.qZA(),s.YNc(19,Yn,1,0,"mat-progress-bar",13),s.ALo(20,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(1),s.ekj("has-error",e.logging_group),s.xp6(4),s.Q6J("ngModel",n.state.server.sentry_dsn),s.xp6(1),s.Q6J("ngIf",e.logging_group),s.xp6(8),s.hij(" ",s.lcZ(15,7,"integration provides real-time error tracking and helps identify and fix issues when site is in production."),""),s.xp6(2),s.Q6J("disabled",s.lcZ(17,9,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(20,11,n.state.loading$))}}let $n=(()=>{class e extends vt{}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["logging-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],["id","logging-group",1,"error-group","many-inputs","no-spacing"],[1,"input-container"],["for","logging.sentry_dsn","trans",""],["type","url","name","logging.sentry_dsn","id","logging.sentry_dsn","minlength","30",3,"ngModel","ngModelChange"],["class","error",3,"innerHTML",4,"ngIf"],[1,"widget","widget-info"],["href","https://sentry.io","target","_blank"],["type","submit","mat-raised-button","","color","accent","trans","",1,"update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"error",3,"innerHTML"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Logging"),s.qZA(),s.TgZ(3,"div",2),s._uU(4," Configure site error and access logging and related 3rd party integrations. "),s.qZA(),s.qZA(),s.YNc(5,Ln,21,13,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,a.Fj,a.wO,a.JJ,a.On,p.lW,C.pW],pipes:[i.Ov,lt.R],encapsulation:2,changeDetection:0}),e})();function Vn(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",9),s.TgZ(2,"label",21),s._uU(3,"SQS Queue Key"),s.qZA(),s.TgZ(4,"input",22),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.sqs_queue_key=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",9),s.TgZ(6,"label",23),s._uU(7,"SQS Queue Secret"),s.qZA(),s.TgZ(8,"input",24),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.sqs_queue_secret=t}),s.qZA(),s.qZA(),s.TgZ(9,"div",9),s.TgZ(10,"label",25),s._uU(11,"SQS Queue Prefix"),s.qZA(),s.TgZ(12,"input",26),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.sqs_queue_prefix=t}),s.qZA(),s.qZA(),s.TgZ(13,"div",9),s.TgZ(14,"label",27),s._uU(15,"SQS Queue Name"),s.qZA(),s.TgZ(16,"input",28),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.sqs_queue_name=t}),s.qZA(),s.qZA(),s.TgZ(17,"div",9),s.TgZ(18,"label",29),s._uU(19,"SQS Queue Region"),s.qZA(),s.TgZ(20,"input",30),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.sqs_queue_region=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngModel",e.state.server.sqs_queue_key),s.xp6(4),s.Q6J("ngModel",e.state.server.sqs_queue_secret),s.xp6(4),s.Q6J("ngModel",e.state.server.sqs_queue_prefix),s.xp6(4),s.Q6J("ngModel",e.state.server.sqs_queue_name),s.xp6(4),s.Q6J("ngModel",e.state.server.sqs_queue_region)}}function Hn(e,t){if(1&e&&s._UZ(0,"p",31),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.queue_group,s.oJD)}}function zn(e,t){1&e&&s._UZ(0,"mat-progress-bar",32)}function Bn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"div",5),s.TgZ(2,"div",1),s._uU(3,"Information"),s.qZA(),s.TgZ(4,"p",6),s._uU(5," Queues allow to defer time consuming tasks, such as sending an email, until a later time. Deferring these tasks can speed up web requests to the application. "),s.qZA(),s.qZA(),s.TgZ(6,"div",7),s.TgZ(7,"div",1),s._uU(8,"Important"),s.qZA(),s.TgZ(9,"p",6),s._uU(10," All methods except sync require additional setup, which should be performed before changing the queue method. Consult documentation for more information. "),s.qZA(),s.qZA(),s.TgZ(11,"div",8),s.TgZ(12,"div",9),s.TgZ(13,"label",10),s._uU(14,"Queue Method"),s.qZA(),s.TgZ(15,"select",11),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.queue_driver=t})("ngModelChange",function(){return s.CHM(e),s.oxw().clearErrors()}),s.TgZ(16,"option",12),s._uU(17,"Sync (Default)"),s.qZA(),s.TgZ(18,"option",13),s._uU(19,"Beanstalkd"),s.qZA(),s.TgZ(20,"option",14),s._uU(21,"Database"),s.qZA(),s.TgZ(22,"option",15),s._uU(23,"SQS (Amazon simple queue service)"),s.qZA(),s.TgZ(24,"option",16),s._uU(25,"Redis"),s.qZA(),s.qZA(),s.qZA(),s.YNc(26,Vn,21,5,"ng-container",17),s.YNc(27,Hn,1,1,"p",18),s.qZA(),s.TgZ(28,"button",19),s.ALo(29,"async"),s._uU(30," Update "),s.qZA(),s.YNc(31,zn,1,0,"mat-progress-bar",20),s.ALo(32,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(11),s.ekj("has-error",e.queue_group),s.xp6(4),s.Q6J("ngModel",n.state.server.queue_driver),s.xp6(11),s.Q6J("ngIf","sqs"===n.state.server.queue_driver),s.xp6(1),s.Q6J("ngIf",e.queue_group),s.xp6(1),s.Q6J("disabled",s.lcZ(29,7,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(32,9,n.state.loading$))}}let jn=(()=>{class e extends vt{saveSettings(){const e=this.state.getModified();e.client["realtime.pusher_key"]&&(e.server.pusher_key=e.client["realtime.pusher_key"]),super.saveSettings(e)}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["queue-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],[1,"widget","widget-info"],["trans",""],[1,"widget","widget-info","widget-important"],["id","queue-group",1,"error-group","many-inputs","no-spacing"],[1,"input-container"],["for","queue.driver","trans",""],["name","queue.driver","id","queue.driver",3,"ngModel","ngModelChange"],["value","sync","trans",""],["value","beanstalkd"],["value","database"],["value","sqs","trans",""],["value","redis"],[4,"ngIf"],["class","error",3,"innerHTML",4,"ngIf"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["for","sqs_queue_key","trans",""],["name","sqs_queue_key","id","sqs_queue_key","required","",3,"ngModel","ngModelChange"],["for","sqs_queue_secret","trans",""],["name","sqs_queue_secret","id","sqs_queue_secret","required","",3,"ngModel","ngModelChange"],["for","sqs_queue_prefix","trans",""],["name","sqs_queue_prefix","id","sqs_queue_prefix",3,"ngModel","ngModelChange"],["for","sqs_queue_name","trans",""],["name","sqs_queue_name","id","sqs_queue_name","required","",3,"ngModel","ngModelChange"],["for","sqs_queue_region","trans",""],["name","sqs_queue_region","id","sqs_queue_region","required","",3,"ngModel","ngModelChange"],[1,"error",3,"innerHTML"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Queue"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Select active queue method and enter related 3rd party API keys."),s.qZA(),s.qZA(),s.YNc(5,Bn,33,11,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,a.EJ,a.JJ,a.On,a.YN,a.Kr,p.lW,a.Fj,a.Q7,C.pW],pipes:[i.Ov],encapsulation:2,changeDetection:0}),e})();var Gn=n(44666);function Xn(e,t){1&e&&(s.TgZ(0,"a",29),s._uU(1,"Learn more. "),s.qZA())}function Wn(e,t){if(1&e&&s._UZ(0,"p",39),2&e){const e=s.oxw(3).ngIf;s.Q6J("innerHTML",e.paypal_group,s.oJD)}}function Kn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",30),s.TgZ(1,"div",12),s.TgZ(2,"label",31),s._uU(3,"Paypal Client ID"),s.qZA(),s.TgZ(4,"input",32),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.paypal_client_id=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",12),s.TgZ(6,"label",33),s._uU(7,"Paypal Secret"),s.qZA(),s.TgZ(8,"input",34),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.paypal_secret=t}),s.qZA(),s.qZA(),s.TgZ(9,"div",12),s.TgZ(10,"label",35),s._uU(11,"Paypal Webhook ID"),s.qZA(),s.TgZ(12,"input",36),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.paypal_webhook_id=t}),s.qZA(),s.qZA(),s.TgZ(13,"div",8),s.TgZ(14,"mat-slide-toggle",37),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.client["billing.paypal_test_mode"]=t}),s._uU(15,"Paypal Test Mode"),s.qZA(),s.TgZ(16,"p",10),s._uU(17,"Allows testing PayPal payments with sandbox accounts."),s.qZA(),s.qZA(),s.YNc(18,Wn,1,1,"p",38),s.qZA()}if(2&e){const e=s.oxw(2).ngIf,t=s.oxw();s.ekj("has-error",e.paypal_group),s.xp6(4),s.Q6J("ngModel",t.state.server.paypal_client_id),s.xp6(4),s.Q6J("ngModel",t.state.server.paypal_secret),s.xp6(4),s.Q6J("ngModel",t.state.server.paypal_webhook_id),s.xp6(2),s.Q6J("ngModel",t.state.client["billing.paypal_test_mode"]),s.xp6(4),s.Q6J("ngIf",e.paypal_group)}}function ei(e,t){1&e&&(s.TgZ(0,"a",40),s._uU(1,"Learn more. "),s.qZA())}function ti(e,t){if(1&e&&(s.TgZ(0,"div",47),s._uU(1),s.qZA()),2&e){const e=s.oxw(3).ngIf;s.xp6(1),s.Oqu(e.stripe_secret)}}function ni(e,t){if(1&e&&s._UZ(0,"p",39),2&e){const e=s.oxw(3).ngIf;s.Q6J("innerHTML",e.stripe_group,s.oJD)}}function ii(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",41),s.TgZ(1,"div",12),s.TgZ(2,"label",42),s._uU(3,"Stripe Client ID"),s.qZA(),s.TgZ(4,"input",43),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.stripe_key=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",12),s.TgZ(6,"label",44),s._uU(7,"Stripe Secret"),s.qZA(),s.TgZ(8,"input",45),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(3).state.server.stripe_secret=t}),s.qZA(),s.YNc(9,ti,2,1,"div",46),s.qZA(),s.YNc(10,ni,1,1,"p",38),s.qZA()}if(2&e){const e=s.oxw(2).ngIf,t=s.oxw();s.ekj("has-error",e.stripe_group),s.xp6(4),s.Q6J("ngModel",t.state.server.stripe_key),s.xp6(1),s.ekj("has-error",e.stripe_secret),s.xp6(3),s.Q6J("ngModel",t.state.server.stripe_secret),s.xp6(1),s.Q6J("ngIf",e.stripe_secret),s.xp6(1),s.Q6J("ngIf",e.stripe_group)}}function ai(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",8),s.TgZ(2,"mat-slide-toggle",19),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["billing.paypal.enable"]=t}),s._uU(3,"Paypal Gateway"),s.qZA(),s.TgZ(4,"p"),s.TgZ(5,"span",10),s._uU(6,"Enable PayPal payment gateway."),s.qZA(),s.TgZ(7,"span",20),s._UZ(8,"mat-icon",21),s.YNc(9,Xn,2,0,"a",22),s.qZA(),s.qZA(),s.qZA(),s.YNc(10,Kn,19,7,"div",23),s.TgZ(11,"div",8),s.TgZ(12,"mat-slide-toggle",24),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["billing.stripe.enable"]=t}),s._uU(13,"Stripe Gateway"),s.qZA(),s.TgZ(14,"p"),s.TgZ(15,"span",10),s._uU(16,"Enable Stripe payment gateway."),s.qZA(),s.TgZ(17,"span",20),s._UZ(18,"mat-icon",21),s.YNc(19,ei,2,0,"a",25),s.qZA(),s.qZA(),s.qZA(),s.YNc(20,ii,11,8,"div",26),s.TgZ(21,"div",12),s.TgZ(22,"label",27),s._uU(23,"Accepted Cards"),s.qZA(),s.TgZ(24,"chip-input",28),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).acceptedCards=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(2),s.Q6J("ngModel",e.state.client["billing.paypal.enable"]),s.xp6(7),s.Q6J("ngIf",!e.settings.get("site.hide_docs_buttons")),s.xp6(1),s.Q6J("ngIf",e.state.client["billing.paypal.enable"]),s.xp6(2),s.Q6J("ngModel",e.state.client["billing.stripe.enable"]),s.xp6(7),s.Q6J("ngIf",!e.settings.get("site.hide_docs_buttons")),s.xp6(1),s.Q6J("ngIf",e.state.client["billing.stripe.enable"]),s.xp6(4),s.Q6J("ngModel",e.acceptedCards)}}function si(e,t){1&e&&s._UZ(0,"mat-progress-bar",48)}function oi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.TgZ(1,"mat-tab-group",5),s.TgZ(2,"mat-tab",6),s.ALo(3,"trans"),s.TgZ(4,"div",7),s.TgZ(5,"div",8),s.TgZ(6,"mat-slide-toggle",9),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["billing.enable"]=t}),s._uU(7,"Enable Billing"),s.qZA(),s.TgZ(8,"p",10),s._uU(9,"Enable or disable all billing functionality across the site."),s.qZA(),s.qZA(),s.YNc(10,ai,25,7,"ng-container",11),s.qZA(),s.qZA(),s.TgZ(11,"mat-tab",6),s.ALo(12,"trans"),s.TgZ(13,"div",7),s.TgZ(14,"div",12),s.TgZ(15,"label",13),s._uU(16,"Invoice Address"),s.qZA(),s.TgZ(17,"textarea",14),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["billing.invoice.address"]=t}),s.qZA(),s.TgZ(18,"p",10),s._uU(19,' Address to show under "from" section of user invoice. Supports HTML. Optional. '),s.qZA(),s.qZA(),s.TgZ(20,"div",12),s.TgZ(21,"label",15),s._uU(22,"Invoice Note"),s.qZA(),s.TgZ(23,"textarea",16),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["billing.invoice.notes"]=t}),s.qZA(),s.TgZ(24,"p",10),s._uU(25,'Default notes to show under "notes" section of user invoice. Optional.'),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(26,"button",17),s.ALo(27,"async"),s._uU(28," Update "),s.qZA(),s.YNc(29,si,1,0,"mat-progress-bar",18),s.ALo(30,"async"),s.qZA()}if(2&e){const e=s.oxw();s.xp6(2),s.Q6J("label",s.lcZ(3,8,"General")),s.xp6(4),s.Q6J("ngModel",e.state.client["billing.enable"]),s.xp6(4),s.Q6J("ngIf",e.state.client["billing.enable"]),s.xp6(1),s.Q6J("label",s.lcZ(12,10,"Invoices")),s.xp6(6),s.Q6J("ngModel",e.state.client["billing.invoice.address"]),s.xp6(6),s.Q6J("ngModel",e.state.client["billing.invoice.notes"]),s.xp6(3),s.Q6J("disabled",s.lcZ(27,12,e.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(30,14,e.state.loading$))}}let ri=(()=>{class e extends vt{constructor(){super(...arguments),this.acceptedCards=[]}ngOnInit(){this.acceptedCards=this.settings.getJson("billing.accepted_cards",[])}saveSettings(){const e=this.state.getModified();e.client["billing.accepted_cards"]=JSON.stringify(this.acceptedCards),super.saveSettings(e)}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["billing-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],["color","accent","animationDuration","0"],[3,"label"],[1,"many-inputs","tab-content"],[1,"setting-toggle-container"],["name","billing.enable","id","billing.enable","trans","",3,"ngModel","ngModelChange"],["trans",""],[4,"ngIf"],[1,"input-container"],["for","billing.invoice.address","trans",""],["name","billing.invoice.address","id","billing.invoice.address","rows","5",3,"ngModel","ngModelChange"],["for","billing.invoice.notes","trans",""],["name","billing.invoice.notes","id","billing.invoice.notes","rows","5",3,"ngModel","ngModelChange"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["name","billing.paypal.enable","id","billing.paypal.enable","trans","",3,"ngModel","ngModelChange"],[1,"docs-link"],["svgIcon","link"],["href","https://support.vebto.com/help-center/articles/147/configuring-paypal","target","_blank",4,"ngIf"],["class","error-group many-inputs","id","paypal_group",3,"has-error",4,"ngIf"],["name","billing.enable.stripe","id","billing.enable.stripe","trans","",3,"ngModel","ngModelChange"],["href","https://support.vebto.com/help-center/articles/148/configuring-stripe","target","_blank",4,"ngIf"],["class","error-group many-inputs","id","stripe_group",3,"has-error",4,"ngIf"],["for","accepted-cards","trans",""],["id","accepted-cards","name","accepted-cards","placeholder","+New Card...","trans-placeholder","",3,"ngModel","ngModelChange"],["href","https://support.vebto.com/help-center/articles/147/configuring-paypal","target","_blank"],["id","paypal_group",1,"error-group","many-inputs"],["for","billing.paypal.id","trans",""],["name","billing.paypal.id","id","billing.paypal.id","required","",3,"ngModel","ngModelChange"],["for","billing.paypal.secret","trans",""],["name","billing.paypal.secret","id","billing.paypal.secret","required","",3,"ngModel","ngModelChange"],["for","billing.paypal.webhook_id","trans",""],["name","billing.paypal.webhook_id","id","billing.paypal.webhook_id","required","",3,"ngModel","ngModelChange"],["name","billing.paypal.test_mode","id","billing.paypal.test_mode","trans","",3,"ngModel","ngModelChange"],["class","error",3,"innerHTML",4,"ngIf"],[1,"error",3,"innerHTML"],["href","https://support.vebto.com/help-center/articles/148/configuring-stripe","target","_blank"],["id","stripe_group",1,"error-group","many-inputs"],["for","stripe_key","trans",""],["name","billing.stripe.id","id","stripe_key","required","",3,"ngModel","ngModelChange"],["for","stripe_secret","trans",""],["name","billing.stripe.secret","id","stripe_secret","required","",3,"ngModel","ngModelChange"],["class","error",4,"ngIf"],[1,"error"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Billing"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Configure billing and subscription settings."),s.qZA(),s.qZA(),s.YNc(5,oi,31,16,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,O.SP,O.uX,T.Rr,a.JJ,a.On,a.Fj,p.lW,P.Hw,Gn.S,a.Q7,C.pW],pipes:[i.Ov,lt.R],styles:[".settings-panels-container[_nghost-%COMP%]   .header[_ngcontent-%COMP%], .settings-panels-container   [_nghost-%COMP%]   .header[_ngcontent-%COMP%]{margin-bottom:25px}.tab-content[_ngcontent-%COMP%]{padding-top:25px}"],changeDetection:0}),e})();var li=n(58480),ci=n(80568),di=n(88002),ui=n(16850),pi=n(1796);function gi(e,t){if(1&e&&(s.TgZ(0,"label",5),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.MGl("for","space-input-",e.id,""),s.xp6(1),s.Oqu(e.label)}}function hi(e,t){if(1&e&&(s.TgZ(0,"option",6),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("ngValue",e),s.xp6(1),s.Oqu(e)}}const mi=[[["",8,"description"]],[["",8,"error"]]],fi=[".description",".error"];let _i=(()=>{class e{constructor(){this.inputContainer=!0,this.id=(0,li.O)(),this.spaceUnits=ci.L,this.form=new a.cw({unit:new a.NI("MB"),amount:new a.NI(null)})}ngOnInit(){this.form.valueChanges.pipe((0,di.U)(e=>(0,ui.F)(e.amount,e.unit))).subscribe(e=>this.propagateChange(e))}writeValue(e){this.form.setValue(this.fromBytes(e),{emitEvent:!1})}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}fromBytes(e){const t=(0,pi.H)(e);return t?{amount:t.split(" ")[0],unit:t.split(" ")[1]}:{amount:null,unit:"MB"}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Xpm({type:e,selectors:[["space-input"]],hostVars:2,hostBindings:function(e,t){2&e&&s.ekj("input-container",t.inputContainer)},inputs:{label:"label",name:"name"},features:[s._Bn([{provide:a.JU,useExisting:e,multi:!0}])],ngContentSelectors:fi,decls:7,vars:5,consts:[["trans","",3,"for",4,"ngIf"],[1,"wrapper"],["type","number","min","0","placeholder","Optional...","trans-placeholder","",3,"id","formControl"],[3,"formControl"],["trans","",3,"ngValue",4,"ngFor","ngForOf"],["trans","",3,"for"],["trans","",3,"ngValue"]],template:function(e,t){1&e&&(s.F$t(mi),s.YNc(0,gi,2,2,"label",0),s.TgZ(1,"div",1),s._UZ(2,"input",2),s.TgZ(3,"select",3),s.YNc(4,hi,2,2,"option",4),s.qZA(),s.qZA(),s.Hsn(5),s.Hsn(6,1)),2&e&&(s.Q6J("ngIf",t.label),s.xp6(2),s.MGl("id","space-input-",t.id,""),s.Q6J("formControl",t.form.get("amount")),s.xp6(1),s.Q6J("formControl",t.form.get("unit")),s.xp6(1),s.Q6J("ngForOf",t.spaceUnits))},directives:[i.O5,a.qQ,a.wV,a.Fj,Zt.P,a.JJ,a.oH,a.EJ,i.sg,a.YN,a.Kr],styles:["[_nghost-%COMP%]{display:block}.input-container[_nghost-%COMP%]   input[_ngcontent-%COMP%]{flex:1 1 auto;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}.input-container[_nghost-%COMP%]   select[_ngcontent-%COMP%]{width:80px;flex:0 0 80px;border-top-left-radius:0;border-bottom-left-radius:0}.wrapper[_ngcontent-%COMP%]{display:flex}"],changeDetection:0}),e})(),bi=(()=>{class e{constructor(e){this.state=e}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(d))},e.\u0275cmp=s.Xpm({type:e,selectors:[["ftp-form"]],decls:26,vars:7,consts:[[1,"input-container"],["for","storage_ftp_host","trans",""],["type","text","id","storage_ftp_host","name","storage_ftp_host","required","",3,"ngModel","ngModelChange"],["for","storage_ftp_username","trans",""],["type","text","id","storage_ftp_username","name","storage_ftp_username","required","",3,"ngModel","ngModelChange"],["for","storage_ftp_password","trans",""],["type","password","id","storage_ftp_password","name","storage_ftp_password","required","",3,"ngModel","ngModelChange"],["for","storage_ftp_root","trans",""],["type","text","id","storage_ftp_root","name","storage_ftp_root","placeholder","/",3,"ngModel","ngModelChange"],["for","storage_ftp_port","trans",""],["type","number","id","storage_ftp_port","name","storage_ftp_port","min","0","placeholder","21",3,"ngModel","ngModelChange"],[1,"setting-toggle-container"],["name","storage_ftp_passive","id","storage_ftp_passive","trans","",3,"ngModel","ngModelChange"],["name","storage_ftp_ssl","id","storage_ftp_ssl","trans","",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"label",1),s._uU(2,"FTP Hostname"),s.qZA(),s.TgZ(3,"input",2),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_host=e}),s.qZA(),s.qZA(),s.TgZ(4,"div",0),s.TgZ(5,"label",3),s._uU(6,"FTP Username"),s.qZA(),s.TgZ(7,"input",4),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_username=e}),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s.TgZ(9,"label",5),s._uU(10,"FTP Password"),s.qZA(),s.TgZ(11,"input",6),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_password=e}),s.qZA(),s.qZA(),s.TgZ(12,"div",0),s.TgZ(13,"label",7),s._uU(14,"FTP Directory"),s.qZA(),s.TgZ(15,"input",8),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_root=e}),s.qZA(),s.qZA(),s.TgZ(16,"div",0),s.TgZ(17,"label",9),s._uU(18,"FTP Port"),s.qZA(),s.TgZ(19,"input",10),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_port=e}),s.qZA(),s.qZA(),s.TgZ(20,"div",11),s.TgZ(21,"mat-slide-toggle",12),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_passive=e}),s._uU(22,"Passive"),s.qZA(),s.qZA(),s.TgZ(23,"div",11),s.TgZ(24,"mat-slide-toggle",13),s.NdJ("ngModelChange",function(e){return t.state.server.storage_ftp_ssl=e}),s._uU(25,"SSL"),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.state.server.storage_ftp_host),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_ftp_username),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_ftp_password),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_ftp_root),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_ftp_port),s.xp6(2),s.Q6J("ngModel",t.state.server.storage_ftp_passive),s.xp6(3),s.Q6J("ngModel",t.state.server.storage_ftp_ssl))},directives:[Zt.P,a.Fj,a.Q7,a.JJ,a.On,a.qQ,a.wV,T.Rr],encapsulation:2,changeDetection:0}),e})(),vi=(()=>{class e{constructor(e){this.state=e}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(d))},e.\u0275cmp=s.Xpm({type:e,selectors:[["dropbox-form"]],decls:8,vars:2,consts:[[1,"input-container"],["for","storage_dropbox_access_token","trans",""],["type","text","id","storage_dropbox_access_token","name","storage_dropbox_access_token","required","",3,"ngModel","ngModelChange"],["for","storage_dropbox_root","trans",""],["type","text","id","storage_dropbox_root","name","storage_dropbox_root","placeholder","/",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"label",1),s._uU(2,"Access Token"),s.qZA(),s.TgZ(3,"input",2),s.NdJ("ngModelChange",function(e){return t.state.server.storage_dropbox_access_token=e}),s.qZA(),s.qZA(),s.TgZ(4,"div",0),s.TgZ(5,"label",3),s._uU(6,"Root Directory"),s.qZA(),s.TgZ(7,"input",4),s.NdJ("ngModelChange",function(e){return t.state.server.storage_dropbox_root=e}),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.state.server.storage_dropbox_access_token),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_dropbox_root))},directives:[Zt.P,a.Fj,a.Q7,a.JJ,a.On],encapsulation:2,changeDetection:0}),e})(),Zi=(()=>{class e{constructor(e){this.state=e}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(d))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rackspace-form"]],decls:16,vars:4,consts:[[1,"input-container"],["for","storage_rackspace_username","trans",""],["type","text","id","storage_rackspace_username","name","storage_rackspace_username","required","",3,"ngModel","ngModelChange"],["for","storage_rackspace_key","trans",""],["type","text","id","storage_rackspace_key","name","storage_rackspace_key","required","",3,"ngModel","ngModelChange"],["for","storage_rackspace_region","trans",""],["type","text","id","storage_rackspace_region","name","storage_rackspace_region","required","",3,"ngModel","ngModelChange"],["for","storage_rackspace_container","trans",""],["type","text","id","storage_rackspace_container","name","storage_rackspace_container","required","",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"label",1),s._uU(2,"Rackspace Username"),s.qZA(),s.TgZ(3,"input",2),s.NdJ("ngModelChange",function(e){return t.state.server.storage_rackspace_username=e}),s.qZA(),s.qZA(),s.TgZ(4,"div",0),s.TgZ(5,"label",3),s._uU(6,"Rackspace Key"),s.qZA(),s.TgZ(7,"input",4),s.NdJ("ngModelChange",function(e){return t.state.server.storage_rackspace_key=e}),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s.TgZ(9,"label",5),s._uU(10,"Rackspace Region"),s.qZA(),s.TgZ(11,"input",6),s.NdJ("ngModelChange",function(e){return t.state.server.storage_rackspace_region=e}),s.qZA(),s.qZA(),s.TgZ(12,"div",0),s.TgZ(13,"label",7),s._uU(14,"Rackspace Container"),s.qZA(),s.TgZ(15,"input",8),s.NdJ("ngModelChange",function(e){return t.state.server.storage_rackspace_container=e}),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.state.server.storage_rackspace_username),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_rackspace_key),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_rackspace_region),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_rackspace_container))},directives:[Zt.P,a.Fj,a.Q7,a.JJ,a.On],encapsulation:2,changeDetection:0}),e})(),xi=(()=>{class e{constructor(e){this.state=e}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(d))},e.\u0275cmp=s.Xpm({type:e,selectors:[["s3-form"]],decls:23,vars:8,consts:[[1,"input-container"],["for","storage_s3_key","trans",""],["type","text","id","storage_s3_key","name","storage_s3_key","required","",3,"ngModel","ngModelChange"],["for","storage_s3_secret","trans",""],["type","text","id","storage_s3_secret","name","storage_s3_secret","required","",3,"ngModel","ngModelChange"],["for","storage_s3_region","trans",""],["type","text","id","storage_s3_region","pattern","[a-z1-9\\-]+","placeholder","us-east-1","name","storage_s3_region","required","",3,"ngModel","ngModelChange"],["for","storage_s3_bucket","trans",""],["type","text","id","storage_s3_bucket","name","storage_s3_bucket","required","",3,"ngModel","ngModelChange"],["for","storage_s3_endpoint","trans",""],["type","url","id","storage_s3_endpoint","name","storage_s3_endpoint",3,"placeholder","ngModel","ngModelChange"],["trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"label",1),s._uU(2,"Amazon S3 Key"),s.qZA(),s.TgZ(3,"input",2),s.NdJ("ngModelChange",function(e){return t.state.server.storage_s3_key=e}),s.qZA(),s.qZA(),s.TgZ(4,"div",0),s.TgZ(5,"label",3),s._uU(6,"Amazon S3 Secret"),s.qZA(),s.TgZ(7,"input",4),s.NdJ("ngModelChange",function(e){return t.state.server.storage_s3_secret=e}),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s.TgZ(9,"label",5),s._uU(10,"Amazon S3 Region"),s.qZA(),s.TgZ(11,"input",6),s.NdJ("ngModelChange",function(e){return t.state.server.storage_s3_region=e}),s.qZA(),s.qZA(),s.TgZ(12,"div",0),s.TgZ(13,"label",7),s._uU(14,"Amazon S3 Bucket"),s.qZA(),s.TgZ(15,"input",8),s.NdJ("ngModelChange",function(e){return t.state.server.storage_s3_bucket=e}),s.qZA(),s.qZA(),s.TgZ(16,"div",0),s.TgZ(17,"label",9),s._uU(18,"Amazon S3 Endpoint"),s.qZA(),s.TgZ(19,"input",10),s.NdJ("ngModelChange",function(e){return t.state.server.storage_s3_endpoint=e}),s.ALo(20,"trans"),s.qZA(),s.TgZ(21,"p",11),s._uU(22,"Only change endpoint if you are using another S3 compatible storage service."),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.state.server.storage_s3_key),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_s3_secret),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_s3_region),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_s3_bucket),s.xp6(4),s.Q6J("placeholder",s.lcZ(20,6,"Optional"))("ngModel",t.state.server.storage_s3_endpoint))},directives:[Zt.P,a.Fj,a.Q7,a.JJ,a.On,a.c5],pipes:[lt.R],encapsulation:2,changeDetection:0}),e})(),yi=(()=>{class e{constructor(e){this.state=e}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(d))},e.\u0275cmp=s.Xpm({type:e,selectors:[["digitalocean-form"]],decls:16,vars:4,consts:[[1,"input-container"],["for","storage_digitalocean_key","trans",""],["type","text","id","storage_digitalocean_key","name","storage_digitalocean_key","required","",3,"ngModel","ngModelChange"],["for","storage_digitalocean_secret","trans",""],["type","text","id","storage_digitalocean_secret","name","storage_digitalocean_secret","required","",3,"ngModel","ngModelChange"],["for","storage_digitalocean_region","trans",""],["type","text","id","storage_digitalocean_region","name","storage_digitalocean_region","required","","pattern","[a-z0-9]+","maxlength","5",3,"ngModel","ngModelChange"],["for","storage_digitalocean_bucket","trans",""],["type","text","id","storage_digitalocean_bucket","name","storage_digitalocean_bucket","required","",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"label",1),s._uU(2,"DigitalOcean Key"),s.qZA(),s.TgZ(3,"input",2),s.NdJ("ngModelChange",function(e){return t.state.server.storage_digitalocean_key=e}),s.qZA(),s.qZA(),s.TgZ(4,"div",0),s.TgZ(5,"label",3),s._uU(6,"DigitalOcean Secret"),s.qZA(),s.TgZ(7,"input",4),s.NdJ("ngModelChange",function(e){return t.state.server.storage_digitalocean_secret=e}),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s.TgZ(9,"label",5),s._uU(10,"DigitalOcean Region"),s.qZA(),s.TgZ(11,"input",6),s.NdJ("ngModelChange",function(e){return t.state.server.storage_digitalocean_region=e}),s.qZA(),s.qZA(),s.TgZ(12,"div",0),s.TgZ(13,"label",7),s._uU(14,"DigitalOcean Bucket"),s.qZA(),s.TgZ(15,"input",8),s.NdJ("ngModelChange",function(e){return t.state.server.storage_digitalocean_bucket=e}),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.state.server.storage_digitalocean_key),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_digitalocean_secret),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_digitalocean_region),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_digitalocean_bucket))},directives:[Zt.P,a.Fj,a.Q7,a.JJ,a.On,a.c5,a.nD],encapsulation:2,changeDetection:0}),e})(),Ai=(()=>{class e{constructor(e){this.state=e}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(d))},e.\u0275cmp=s.Xpm({type:e,selectors:[["backblaze-form"]],decls:16,vars:4,consts:[[1,"input-container"],["for","storage_backblaze_key_id","trans",""],["type","text","id","storage_backblaze_key_id","name","storage_backblaze_key_id","required","",3,"ngModel","ngModelChange"],["for","storage_backblaze_application_key","trans",""],["type","text","id","storage_backblaze_application_key","name","storage_backblaze_application_key","required","",3,"ngModel","ngModelChange"],["for","storage_backblaze_bucket","trans",""],["type","text","id","storage_backblaze_bucket","name","storage_backblaze_bucket","required","",3,"ngModel","ngModelChange"],["for","storage_backblaze_region","trans",""],["type","text","id","storage_backblaze_region","pattern","[a-z0-9\\-]+","placeholder","us-west-002","name","storage_backblaze_region","required","",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"label",1),s._uU(2,"Backblaze KeyID"),s.qZA(),s.TgZ(3,"input",2),s.NdJ("ngModelChange",function(e){return t.state.server.storage_backblaze_key_id=e}),s.qZA(),s.qZA(),s.TgZ(4,"div",0),s.TgZ(5,"label",3),s._uU(6,"Backblaze applicationKey"),s.qZA(),s.TgZ(7,"input",4),s.NdJ("ngModelChange",function(e){return t.state.server.storage_backblaze_application_key=e}),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s.TgZ(9,"label",5),s._uU(10,"Backblaze Bucket Name"),s.qZA(),s.TgZ(11,"input",6),s.NdJ("ngModelChange",function(e){return t.state.server.storage_backblaze_bucket=e}),s.qZA(),s.qZA(),s.TgZ(12,"div",0),s.TgZ(13,"label",7),s._uU(14,"Backblaze Region"),s.qZA(),s.TgZ(15,"input",8),s.NdJ("ngModelChange",function(e){return t.state.server.storage_backblaze_region=e}),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.state.server.storage_backblaze_key_id),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_backblaze_application_key),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_backblaze_bucket),s.xp6(4),s.Q6J("ngModel",t.state.server.storage_backblaze_region))},directives:[Zt.P,a.Fj,a.Q7,a.JJ,a.On,a.c5],encapsulation:2,changeDetection:0}),e})();function wi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",16),s.TgZ(1,"label",27),s._uU(2,"User Uploads Storage Method"),s.qZA(),s.TgZ(3,"select",28),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.uploads_disk_driver=t})("ngModelChange",function(){return s.CHM(e),s.oxw(2).clearErrors()}),s.TgZ(4,"option",29),s._uU(5,"Local Disk (Default)"),s.qZA(),s.TgZ(6,"option",30),s._uU(7,"Amazon S3"),s.qZA(),s.TgZ(8,"option",31),s._uU(9,"FTP"),s.qZA(),s.TgZ(10,"option",32),s._uU(11,"DigitalOcean Spaces"),s.qZA(),s.TgZ(12,"option",33),s._uU(13,"Backblaze"),s.qZA(),s.TgZ(14,"option",34),s._uU(15,"Dropbox"),s.qZA(),s.TgZ(16,"option",35),s._uU(17,"Rackspace"),s.qZA(),s.qZA(),s.TgZ(18,"p",13),s._uU(19),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(3),s.Q6J("ngModel",e.state.server.uploads_disk_driver),s.xp6(16),s.Oqu(e.settings.get("vebto.translations.uploads_disk_driver_description"))}}function Ci(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",16),s.TgZ(1,"label",36),s._uU(2,"Public Uploads Storage Method"),s.qZA(),s.TgZ(3,"select",37),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.public_disk_driver=t})("ngModelChange",function(){return s.CHM(e),s.oxw(2).clearErrors()}),s.TgZ(4,"option",29),s._uU(5,"Local Disk (Default)"),s.qZA(),s.TgZ(6,"option",30),s._uU(7,"Amazon S3"),s.qZA(),s.TgZ(8,"option",32),s._uU(9,"DigitalOcean"),s.qZA(),s.TgZ(10,"option",33),s._uU(11,"Backblaze"),s.qZA(),s.qZA(),s.TgZ(12,"p",13),s._uU(13),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(3),s.Q6J("ngModel",e.state.server.public_disk_driver),s.xp6(10),s.Oqu(e.settings.get("vebto.translations.public_disk_driver_description"))}}function Ti(e,t){1&e&&s._UZ(0,"ftp-form",38)}function qi(e,t){1&e&&s._UZ(0,"dropbox-form",38)}function ki(e,t){1&e&&s._UZ(0,"rackspace-form",38)}function Mi(e,t){1&e&&s._UZ(0,"s3-form",38)}function Ii(e,t){1&e&&s._UZ(0,"digitalocean-form",38)}function Ui(e,t){1&e&&s._UZ(0,"backblaze-form",38)}function Oi(e,t){if(1&e&&s._UZ(0,"p",39),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.storage_group,s.oJD)}}function Di(e,t){if(1&e&&s._UZ(0,"p",39),2&e){const e=s.oxw(2).ngIf;s.Q6J("innerHTML",e.static_delivery_group,s.oJD)}}function Pi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",16),s.TgZ(1,"label",40),s._uU(2,"File Delivery Optimization"),s.qZA(),s.TgZ(3,"select",41),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.server.static_file_delivery=t}),s.TgZ(4,"option",42),s._uU(5,"None"),s.qZA(),s.TgZ(6,"option",43),s._uU(7,"X-Sendfile (Apache)"),s.qZA(),s.TgZ(8,"option",44),s._uU(9,"X-Accel (Nginx)"),s.qZA(),s.qZA(),s.TgZ(10,"p",13),s._uU(11," Both X-Sendfile and X-Accel need to be enabled on the server first. When enabled it will reduce server memory and CPU usage when previewing or downloading files, especially for large files. "),s.qZA(),s.YNc(12,Di,1,1,"p",8),s.qZA()}if(2&e){const e=s.oxw().ngIf,t=s.oxw();s.xp6(3),s.Q6J("ngModel",t.state.server.static_file_delivery),s.xp6(1),s.Q6J("ngValue",null),s.xp6(8),s.Q6J("ngIf",e.static_delivery_group)}}function Si(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",16),s.TgZ(1,"label",45),s._uU(2,"Chunk Size"),s.qZA(),s.TgZ(3,"space-input",46),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["uploads.chunk_size"]=t}),s.qZA(),s.TgZ(4,"p",13),s._uU(5," Size for each file chunk. Recommended size is 5MB. It should generally only be changed if maximum upload size on your server is lower then 5MB. Increasing or decreasing chunk size will not affect upload speed. "),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(3),s.Q6J("ngModel",e.state.client["uploads.chunk_size"])}}function Ji(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",11),s.TgZ(1,"mat-slide-toggle",47),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["uploads.resume"]=t}),s._uU(2,"Resumable Uploads"),s.qZA(),s.TgZ(3,"p",13),s._uU(4,"Allow users to resume partial or failed uploads."),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngModel",e.state.client["uploads.resume"])}}function Ni(e,t){1&e&&s._UZ(0,"mat-progress-bar",48)}function Ri(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.YNc(1,wi,20,2,"div",5),s.YNc(2,Ci,14,2,"div",5),s.TgZ(3,"div",6),s.YNc(4,Ti,1,0,"ftp-form",7),s.YNc(5,qi,1,0,"dropbox-form",7),s.YNc(6,ki,1,0,"rackspace-form",7),s.YNc(7,Mi,1,0,"s3-form",7),s.YNc(8,Ii,1,0,"digitalocean-form",7),s.YNc(9,Ui,1,0,"backblaze-form",7),s.YNc(10,Oi,1,1,"p",8),s.qZA(),s.TgZ(11,"div",9),s.YNc(12,Pi,13,3,"div",5),s.qZA(),s.TgZ(13,"div",10),s.TgZ(14,"div",11),s.TgZ(15,"mat-slide-toggle",12),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["uploads.chunk"]=t}),s._uU(16,"Chunked Uploads"),s.qZA(),s.TgZ(17,"p",13),s._uU(18," When enabled larger files will be uploaded in smaller chunks to improve upload reliability and avoid server max upload size limits. "),s.qZA(),s.qZA(),s.YNc(19,Si,6,1,"div",5),s.TgZ(20,"div",14),s.TgZ(21,"div",1),s._uU(22,"Important"),s.qZA(),s.TgZ(23,"p"),s._uU(24),s.ALo(25,"trans"),s.TgZ(26,"strong"),s._uU(27),s.ALo(28,"async"),s.qZA(),s._uU(29,". "),s.qZA(),s.qZA(),s.YNc(30,Ji,5,1,"div",15),s.qZA(),s.TgZ(31,"div",16),s.TgZ(32,"label",17),s._uU(33,"Maximum file size"),s.qZA(),s.TgZ(34,"space-input",18),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["uploads.max_size"]=t}),s.qZA(),s.TgZ(35,"p",13),s._uU(36,"Maximum size for a single file user can upload."),s.qZA(),s.qZA(),s.TgZ(37,"div",16),s.TgZ(38,"label",19),s._uU(39,"Available Space"),s.qZA(),s.TgZ(40,"space-input",20),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["uploads.available_space"]=t}),s.qZA(),s.TgZ(41,"p",13),s._uU(42," Disk space each user uploads are allowed to take up. This can be overridden per user. "),s.qZA(),s.qZA(),s.TgZ(43,"div",16),s.TgZ(44,"label",21),s._uU(45,"Allowed file types"),s.qZA(),s.TgZ(46,"chip-input",22),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().allowedExtensions=t}),s.qZA(),s.TgZ(47,"p",13),s._uU(48," List of allowed file types (jpg, mp3, pdf etc.). Leave empty to allow all file types. "),s.qZA(),s.qZA(),s.TgZ(49,"div",16),s.TgZ(50,"label",23),s._uU(51,"Blocked file types"),s.qZA(),s.TgZ(52,"chip-input",24),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().blockedExtensions=t}),s.qZA(),s.TgZ(53,"p",13),s._uU(54,"Prevent uploading of these file types, even if they are allowed above."),s.qZA(),s.qZA(),s.TgZ(55,"button",25),s.ALo(56,"async"),s._uU(57," Update "),s.qZA(),s.YNc(58,Ni,1,0,"mat-progress-bar",26),s.ALo(59,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(1),s.Q6J("ngIf",n.state.server.uploads_disk_driver),s.xp6(1),s.Q6J("ngIf",n.state.server.public_disk_driver),s.xp6(1),s.ekj("hidden",n.allSelectedDriversAreLocal())("has-error",e.storage_group),s.xp6(1),s.Q6J("ngIf",n.driverSelected("ftp")),s.xp6(1),s.Q6J("ngIf",n.driverSelected("dropbox")),s.xp6(1),s.Q6J("ngIf",n.driverSelected("rackspace")),s.xp6(1),s.Q6J("ngIf",n.driverSelected("s3")),s.xp6(1),s.Q6J("ngIf",n.driverSelected("digitalocean")),s.xp6(1),s.Q6J("ngIf",n.driverSelected("backblaze")),s.xp6(1),s.Q6J("ngIf",e.storage_group),s.xp6(2),s.Q6J("ngIf",n.driverSelected("local")),s.xp6(3),s.Q6J("ngModel",n.state.client["uploads.chunk"]),s.xp6(4),s.Q6J("ngIf",n.state.client["uploads.chunk"]),s.xp6(5),s.hij(" ",s.lcZ(25,25,"Maximum upload size on your server currently is set to")," "),s.xp6(3),s.Oqu(s.lcZ(28,27,n.serverMaxUploadSize$)),s.xp6(3),s.Q6J("ngIf",n.state.client["uploads.chunk"]),s.xp6(4),s.Q6J("ngModel",n.state.client["uploads.max_size"]),s.xp6(6),s.Q6J("ngModel",n.state.client["uploads.available_space"]),s.xp6(6),s.Q6J("ngModel",n.allowedExtensions),s.xp6(6),s.Q6J("ngModel",n.blockedExtensions),s.xp6(3),s.Q6J("disabled",s.lcZ(56,29,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(59,31,n.state.loading$))}}let Qi=(()=>{class e extends vt{constructor(){super(...arguments),this.allowedExtensions=[],this.blockedExtensions=[],this.serverMaxUploadSize$=new b.xQ}ngOnInit(){this.allowedExtensions=this.settings.getJson("uploads.allowed_extensions",[]),this.blockedExtensions=this.settings.getJson("uploads.blocked_extensions",[]),this.getServerMaxUploadSize()}saveSettings(){this.setJson("uploads.allowed_extensions",Fi(this.allowedExtensions)),this.setJson("uploads.blocked_extensions",Fi(this.blockedExtensions)),super.saveSettings()}driverSelected(e){return[this.state.server.uploads_disk_driver,this.state.server.public_disk_driver].includes(e)}allSelectedDriversAreLocal(){return[this.state.server.uploads_disk_driver,this.state.server.public_disk_driver].every(e=>!e||"local"===e)}getServerMaxUploadSize(){this.http.get("uploads/server-max-file-size").subscribe(e=>{this.serverMaxUploadSize$.next(e.maxSize)})}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["uploading-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"ngSubmit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"ngSubmit"],["class","input-container",4,"ngIf"],["id","storage_group",1,"error-group","storage-credentials-group"],["class","many-inputs credentials-form",4,"ngIf"],["class","error",3,"innerHTML",4,"ngIf"],["id","static_delivery_group",1,"error-group","no-bottom-border"],[1,"error-group"],[1,"setting-toggle-container"],["name","uploads.chunk","id","uploads.chunk","trans","",3,"ngModel","ngModelChange"],["trans",""],[1,"widget","widget-important"],["class","setting-toggle-container",4,"ngIf"],[1,"input-container"],["for","uploads.max_size","trans",""],["name","uploads.max_size","id","uploads.max_size",3,"ngModel","ngModelChange"],["for","uploads.available_space","trans",""],["name","uploads.available_space","id","uploads.available_space",3,"ngModel","ngModelChange"],["for","allowed_extensions","trans",""],["id","allowed_extensions","name","allowed_extensions","placeholder","Enter file type...",3,"ngModel","ngModelChange"],["for","blocked_extensions","trans",""],["id","blocked_extensions","name","blocked_extensions","placeholder","Enter file type...",3,"ngModel","ngModelChange"],["mat-raised-button","","color","accent","type","submit","trans","",1,"update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["for","uploads_disk_driver","trans",""],["name","uploads_disk_driver","id","uploads_disk_driver",3,"ngModel","ngModelChange"],["value","local","trans",""],["value","s3"],["value","ftp"],["value","digitalocean"],["value","backblaze"],["value","dropbox"],["value","rackspace"],["for","public_disk_driver","trans",""],["name","public_disk_driver","id","public_disk_driver",3,"ngModel","ngModelChange"],[1,"many-inputs","credentials-form"],[1,"error",3,"innerHTML"],["for","static_file_delivery","trans",""],["name","static_file_delivery","id","static_file_delivery",3,"ngModel","ngModelChange"],["trans","",3,"ngValue"],["value","xsendfile"],["value","xaccel"],["for","uploads.chunk_size","trans",""],["name","uploads.chunk_size","id","uploads.chunk_size",3,"ngModel","ngModelChange"],["name","uploads.resume","id","uploads.resume","trans","",3,"ngModel","ngModelChange"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"User Uploads"),s.qZA(),s.TgZ(3,"div",2),s._uU(4," Configure size and type of files that users are able to upload. This will affect all uploads across the site. "),s.qZA(),s.qZA(),s.YNc(5,Ri,60,33,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,T.Rr,a.JJ,a.On,_i,Gn.S,p.lW,a.EJ,a.YN,a.Kr,bi,vi,Zi,xi,yi,Ai,C.pW],pipes:[i.Ov,lt.R],styles:[".storage-credentials-group[_ngcontent-%COMP%]{border-bottom:none}.credentials-form[_ngcontent-%COMP%]{display:block}.credentials-form[_ngcontent-%COMP%]:not(:last-child){margin-bottom:20px;border-bottom:1px solid var(--be-divider-default)}"],changeDetection:0}),e})();function Fi(e){return e.map(e=>e.replace(/^\./,""))}function Ei(e){return[].concat.apply([],e)}function Yi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",16),s.TgZ(1,"mat-slide-toggle",17),s.NdJ("ngModelChange",function(t){const n=s.CHM(e).$implicit;return s.oxw(2).state.client[n.key]=t}),s._uU(2),s.ALo(3,"trans"),s.qZA(),s.TgZ(4,"p"),s._uU(5),s.ALo(6,"trans"),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("name",e.key)("id",e.key)("ngModel",n.state.client[e.key]),s.xp6(1),s.Oqu(s.lcZ(3,5,e.name)),s.xp6(3),s.Oqu(s.lcZ(6,7,e.description))}}function Li(e,t){if(1&e&&(s.TgZ(0,"p",18),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e["recaptcha.site_key"])}}function $i(e,t){if(1&e&&(s.TgZ(0,"p",18),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.hij(" ",e["recaptcha.secret_key"]," ")}}function Vi(e,t){if(1&e&&s._UZ(0,"p",19),2&e){const e=s.oxw().ngIf;s.Q6J("innerHTML",e.recaptcha_group,s.oJD)}}function Hi(e,t){1&e&&s._UZ(0,"mat-progress-bar",20)}function zi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4),s.NdJ("submit",function(){return s.CHM(e),s.oxw().saveSettings()}),s.YNc(1,Yi,7,9,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"div",7),s.TgZ(4,"label",8),s._uU(5,"Recaptcha V3 Site Key"),s.qZA(),s.TgZ(6,"input",9),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["recaptcha.site_key"]=t}),s.qZA(),s.YNc(7,Li,2,1,"p",10),s.qZA(),s.TgZ(8,"div",7),s.TgZ(9,"label",11),s._uU(10,"Recaptcha V3 Secret Key"),s.qZA(),s.TgZ(11,"input",12),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["recaptcha.secret_key"]=t}),s.qZA(),s.YNc(12,$i,2,1,"p",10),s.qZA(),s.YNc(13,Vi,1,1,"p",13),s.qZA(),s.TgZ(14,"button",14),s.ALo(15,"async"),s._uU(16," Update "),s.qZA(),s.YNc(17,Hi,1,0,"mat-progress-bar",15),s.ALo(18,"async"),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(1),s.Q6J("ngForOf",n.actions),s.xp6(1),s.ekj("has-error",e.recaptcha_group),s.xp6(1),s.ekj("has-error",e["recaptcha.site_key"]),s.xp6(3),s.Q6J("ngModel",n.state.client["recaptcha.site_key"]),s.xp6(1),s.Q6J("ngIf",e["recaptcha.site_key"]),s.xp6(1),s.ekj("has-error",e["recaptcha.secret_key"]),s.xp6(3),s.Q6J("ngModel",n.state.client["recaptcha.secret_key"]),s.xp6(1),s.Q6J("ngIf",e["recaptcha.secret_key"]),s.xp6(1),s.Q6J("ngIf",e.recaptcha_group),s.xp6(1),s.Q6J("disabled",s.lcZ(15,14,n.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(18,16,n.state.loading$))}}let Bi=(()=>{class e extends vt{constructor(e,t,n,i,a,s,o,r,l,c,d,u){super(e,t,n,i,a,s,o,r,l,c,d),this.settings=e,this.toast=t,this.http=n,this.modal=i,this.route=a,this.customHomepage=s,this.valueLists=o,this.cd=r,this.router=l,this.social=c,this.state=d,this.recaptchaActions=u,this.actions=Ei(this.recaptchaActions).reverse()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z),s.Y36(ht.F),s.Y36(o.r),s.Y36(mt.u),s.Y36(r.gz),s.Y36(ft.Y),s.Y36(_t.l),s.Y36(s.sBO),s.Y36(r.F0),s.Y36(bt.x),s.Y36(d),s.Y36(J))},e.\u0275cmp=s.Xpm({type:e,selectors:[["recaptcha-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:7,vars:3,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["class","body many-inputs","ngNativeValidate","",3,"submit",4,"ngIf"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],["class","setting-toggle-container",4,"ngFor","ngForOf"],["id","recaptcha-group",1,"error-group","many-inputs","no-spacing"],[1,"input-container"],["for","recaptcha.site_key","trans",""],["name","recaptcha.site_key","id","recaptcha.site_key",3,"ngModel","ngModelChange"],["class","error",4,"ngIf"],["for","recaptcha.secret_key","trans",""],["name","recaptcha.secret_key","id","recaptcha.secret_key",3,"ngModel","ngModelChange"],["class","error",3,"innerHTML",4,"ngIf"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"setting-toggle-container"],[3,"name","id","ngModel","ngModelChange"],[1,"error"],[1,"error",3,"innerHTML"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Recaptcha"),s.qZA(),s.TgZ(3,"div",2),s._uU(4,"Configure google recaptcha integration and credentials."),s.qZA(),s.qZA(),s.YNc(5,zi,19,18,"form",3),s.ALo(6,"async")),2&e&&(s.xp6(5),s.Q6J("ngIf",s.lcZ(6,1,t.state.errors$)))},directives:[Zt.P,i.O5,a.JL,a.F,i.sg,a.Fj,a.JJ,a.On,p.lW,T.Rr,C.pW],pipes:[i.Ov,lt.R],encapsulation:2,changeDetection:0}),e})();var ji=n(48976),Gi=n(81769),Xi=n(73429),Wi=n(24688),Ki=n(8805),ea=n(81378),ta=n(56456),na=n(53534),ia=n(41880),aa=n(64563),sa=n(97312),oa=n(61927),ra=n(39426);let la=(()=>{class e{constructor(e,t,n){this.el=e,this.uploadQueue=t,this.cd=n,this.hidden=!0,this.subscription=this.uploadQueue.totalProgress().pipe((0,ra.p)(260,oa.Z,{leading:!0,trailing:!0})).subscribe(e=>{this.progress=e,this.hidden=100===e||0===this.uploadQueue.count$.value.pending,this.cd.markForCheck()})}ngOnDestroy(){this.subscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(ta.A),s.Y36(s.sBO))},e.\u0275cmp=s.Xpm({type:e,selectors:[["upload-progress-bar"]],hostVars:2,hostBindings:function(e,t){2&e&&s.ekj("hidden",t.hidden)},decls:1,vars:1,consts:[["mode","determinate","color","accent",3,"value"]],template:function(e,t){1&e&&s._UZ(0,"mat-progress-bar",0),2&e&&s.Q6J("value",t.progress)},directives:[C.pW],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),e})();var ca=n(66452),da=n(52781);function ua(e,t){1&e&&s._UZ(0,"image-or-icon",4),2&e&&s.Q6J("src",t.ngIf)}function pa(e,t){if(1&e&&s._UZ(0,"image-or-icon",4),2&e){const e=s.oxw(2);s.Q6J("src",e.defaultBackground)}}function ga(e,t){if(1&e&&s.YNc(0,pa,1,1,"image-or-icon",5),2&e){const e=s.oxw();s.Q6J("ngIf",e.defaultBackground)}}function ha(e,t){if(1&e){const e=s.EpF();s.ynx(0),s._UZ(1,"span",6),s.TgZ(2,"button",7),s.NdJ("click",function(){return s.CHM(e),s.oxw().openUploadDialog()}),s._UZ(3,"mat-icon",8),s.qZA(),s.TgZ(4,"mat-menu",null,9),s.TgZ(6,"button",10),s.NdJ("filesSelected",function(t){return s.CHM(e),s.oxw().uploadImage(t)}),s._uU(7),s.ALo(8,"trans"),s.qZA(),s.TgZ(9,"button",11),s.NdJ("click",function(){return s.CHM(e),s.oxw().deleteUpload()}),s._uU(10,"Remove"),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.MAs(5),t=s.oxw();s.xp6(1),s.Q6J("matMenuTriggerFor",e),s.xp6(5),s.Q6J("uploadButton",t.uploadInputConfig),s.xp6(1),s.Oqu(s.lcZ(8,3,t.buttonText))}}function ma(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",14),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).deleteUpload()}),s._UZ(1,"mat-icon",15),s.qZA()}}function fa(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"button",12),s.NdJ("filesSelected",function(t){return s.CHM(e),s.oxw().uploadImage(t)}),s._uU(2),s.ALo(3,"trans"),s.qZA(),s.YNc(4,ma,2,0,"button",13),s.ALo(5,"async"),s.BQk()}if(2&e){const e=s.oxw();s.xp6(1),s.Q6J("uploadButton",e.uploadInputConfig),s.xp6(1),s.Oqu(s.lcZ(3,3,e.buttonText)),s.xp6(2),s.Q6J("ngIf",s.lcZ(5,5,e.src$))}}let _a=(()=>{class e{constructor(e,t,n,i){this.uploadQueue=e,this.imageValidator=t,this.uploadsApi=n,this.http=i,this.fileDeleted=new s.vpe,this.buttonText="Upload image",this.uploadConfig={},this.compact=!1,this.uploadInputConfig={multiple:!1,types:[na.j.image]},this.isDisabled$=new c.X(!1),this.src$=new c.X(null)}writeValue(e){this.src$.next(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}setDisabledState(e){this.isDisabled$.next(e)}uploadImage(e){const t=Object.assign(Object.assign({},this.defaultUploadConfig()),this.uploadConfig);this.uploadQueue.start(e,t).subscribe(e=>{this.src$.next(e.fileEntry.url),this.propagateChange(e.fileEntry.url)})}deleteUpload(){const e={paths:[this.src$.value],deleteForever:!0};(this.uploadConfig&&this.uploadConfig.uri?this.http.delete(this.uploadConfig.uri,e):this.uploadsApi.delete(e)).subscribe(()=>{this.src$.next(null),this.propagateChange(null),this.fileDeleted.emit()})}defaultUploadConfig(){return{httpParams:{diskPrefix:this.diskPrefix||"common_media"},uri:ji.C.Image,validator:this.imageValidator}}openUploadDialog(){this.src$.value?this.menuTrigger.toggleMenu():(0,ia.r)(this.uploadInputConfig).then(e=>{this.uploadImage(e)})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(ta.A),s.Y36(aa.G),s.Y36(sa.f),s.Y36(o.r))},e.\u0275cmp=s.Xpm({type:e,selectors:[["upload-image-control"]],viewQuery:function(e,t){if(1&e&&s.Gf(w.p6,5),2&e){let e;s.iGM(e=s.CRH())&&(t.menuTrigger=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&s.ekj("compact",t.compact)},inputs:{defaultBackground:"defaultBackground",buttonText:"buttonText",uploadConfig:"uploadConfig",diskPrefix:"diskPrefix",compact:"compact"},outputs:{fileDeleted:"fileDeleted"},features:[s._Bn([ta.A,{provide:a.JU,useExisting:e,multi:!0}])],decls:10,vars:10,consts:[["class","inherit-size",3,"src",4,"ngIf","ngIfElse"],["defaultBg",""],[1,"action-buttons"],[4,"ngIf"],[1,"inherit-size",3,"src"],["class","inherit-size",3,"src",4,"ngIf"],[3,"matMenuTriggerFor"],["type","button","mat-icon-button","",1,"action-button",3,"click"],["svgIcon","add-photo-alternate"],["menu","matMenu"],["type","button","mat-menu-item","",3,"uploadButton","filesSelected"],["type","button","mat-menu-item","","trans","",3,"click"],["type","button","mat-stroked-button","","color","accent",1,"action-button",3,"uploadButton","filesSelected"],["type","button","class","action-button delete-button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-icon-button","",1,"action-button","delete-button",3,"click"],["svgIcon","delete"]],template:function(e,t){if(1&e&&(s.YNc(0,ua,1,1,"image-or-icon",0),s.ALo(1,"async"),s.YNc(2,ga,1,1,"ng-template",null,1,s.W1O),s.TgZ(4,"div",2),s.YNc(5,ha,11,5,"ng-container",3),s.ALo(6,"async"),s.YNc(7,fa,6,7,"ng-container",3),s.ALo(8,"async"),s.qZA(),s._UZ(9,"upload-progress-bar")),2&e){const e=s.MAs(3);s.Q6J("ngIf",s.lcZ(1,4,t.src$))("ngIfElse",e),s.xp6(5),s.Q6J("ngIf",t.compact&&!s.lcZ(6,6,t.isDisabled$)),s.xp6(2),s.Q6J("ngIf",!t.compact&&!s.lcZ(8,8,t.isDisabled$))}},directives:[i.O5,la,ca.A,w.p6,p.lW,P.Hw,w.VK,w.OP,da.c,Zt.P],pipes:[i.Ov,lt.R],styles:["[_nghost-%COMP%]{display:block;width:220px;height:220px;flex-shrink:0;border-radius:4px;overflow:hidden;background:linear-gradient(135deg,#70929c,#846170);position:relative}.inherit-size[_nghost-%COMP%], .inherit-size   [_nghost-%COMP%]{width:100%;height:100%}.compact[_nghost-%COMP%]   .action-buttons[_ngcontent-%COMP%], .compact   [_nghost-%COMP%]   .action-buttons[_ngcontent-%COMP%]{bottom:0;top:0}.action-buttons[_ngcontent-%COMP%]{position:absolute;bottom:25px;left:0;right:0;margin:auto;text-align:center;height:34px}.action-button[_ngcontent-%COMP%]{color:rgba(0,0,0,.87);border-color:rgba(0,0,0,.1);background:hsla(0,0%,100%,.8)}.mat-icon-button[_ngcontent-%COMP%]{border-radius:4px;line-height:34px;height:34px;width:34px}.delete-button[_ngcontent-%COMP%]{margin-left:5px}upload-progress-bar[_ngcontent-%COMP%]{width:100%;position:absolute;left:0;bottom:0}"]}),e})();class ba{constructor(e,t){this.key=t,this.selected=[],this.selected=[...e],this.key=t||"id"}isSelected(e){return this.findIndex(e)>-1}toggle(e){const t=this.findIndex(e);t>-1?this.selected.splice(t,1):this.selected.push(Object.assign({},e))}updateValue(e){const t=this.findIndex(e);this.selected[t]=Object.assign({},e)}getValue(e){return this.selected.find(t=>t[this.key]===e)}values(){return[...this.selected]}findIndex(e){return this.selected.findIndex(t=>t[this.key]===e[this.key])}}var va=n(99981);let Za=(()=>{class e{constructor(e){this.httpClient=e}getRoles(){return this.httpClient.getWithCache("roles?perPage=15")}createNew(e){return this.httpClient.post("roles",e)}update(e,t){return this.httpClient.put("roles/"+e,t)}delete(e){return this.httpClient.delete("roles/"+e)}addUsers(e,t){return this.httpClient.post("roles/"+e+"/add-users",{userIds:t})}removeUsers(e,t){return this.httpClient.post("roles/"+e+"/remove-users",{ids:t})}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(va.F))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function xa(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"li",10),s.TgZ(1,"div",11),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().selectionModel.toggle(t)}),s.TgZ(2,"div",12),s.TgZ(3,"div",13),s._uU(4),s.qZA(),s.qZA(),s._UZ(5,"mat-pseudo-checkbox",14),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.xp6(4),s.Oqu(e.name),s.xp6(1),s.Q6J("state",n.selectionModel.isSelected(e)?"checked":"unchecked")}}let ya=(()=>{class e{constructor(e,t,n){this.rolesService=e,this.dialogRef=t,this.data=n,this.allRoles$=new c.X([]),this.selectionModel=new ba(this.data.initialRoles||[],"id")}ngOnInit(){this.fetchAllRoles()}confirm(){this.close(this.selectionModel.values())}close(e){this.dialogRef.close(e)}fetchAllRoles(){this.rolesService.getRoles().subscribe(e=>this.allRoles$.next(e.pagination.data))}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Za),s.Y36(m.so),s.Y36(m.WI))},e.\u0275cmp=s.Xpm({type:e,selectors:[["select-roles-modal"]],decls:15,vars:3,consts:[[1,"modal-header"],["mat-dialog-title","","trans","",1,"modal-title"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"ngSubmit"],[1,"unstyled-list","selection-list"],["class","list-item",4,"ngFor","ngForOf"],[1,"buttons","right","mat-dialog-actions"],["mat-button","","type","button","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans",""],[1,"list-item"],["matRipple","",1,"list-item-header",3,"click"],[1,"meta"],[1,"list-item-name"],[3,"state"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s._uU(2,"Select Roles"),s.qZA(),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.TgZ(5,"form",4),s.NdJ("ngSubmit",function(){return t.confirm()}),s.TgZ(6,"mat-dialog-content"),s.TgZ(7,"ul",5),s.YNc(8,xa,6,2,"li",6),s.ALo(9,"async"),s.qZA(),s.qZA(),s.TgZ(10,"mat-dialog-actions",7),s.TgZ(11,"button",8),s.NdJ("click",function(){return t.close()}),s._uU(12,"Cancel"),s.qZA(),s.TgZ(13,"button",9),s._uU(14,"Select"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(8),s.Q6J("ngForOf",s.lcZ(9,1,t.allRoles$)))},directives:[m.uh,Zt.P,P.Hw,a.JL,a.F,m.xY,i.sg,m.H8,p.lW,Z.wG,Z.nP],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.list-item[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),e})();function Aa(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",9),s.TgZ(1,"button",10),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).openSelectRolesModal()}),s._uU(2,"Manage"),s.qZA(),s.qZA()}}function wa(e,t){1&e&&(s.TgZ(0,"div",11),s._uU(1,"No roles yet."),s.qZA())}function Ca(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-chip",12),s.NdJ("removed",function(){const t=s.CHM(e).$implicit;return s.oxw(2).detachRole(t)}),s.TgZ(1,"span",13),s._uU(2),s.qZA(),s._UZ(3,"mat-icon",14),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(2);s.Q6J("removable",!0)("disabled",n.readonly),s.xp6(2),s.Oqu(e.name)}}function Ta(e,t){if(1&e&&(s.TgZ(0,"div",1),s.TgZ(1,"div",2),s.TgZ(2,"div",3),s._uU(3,"Roles"),s.qZA(),s.YNc(4,Aa,3,0,"div",4),s.qZA(),s.TgZ(5,"div",5),s.YNc(6,wa,2,0,"div",6),s.ALo(7,"async"),s.TgZ(8,"mat-chip-list",7),s.YNc(9,Ca,4,3,"mat-chip",8),s.ALo(10,"async"),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.oxw();let t;s.xp6(4),s.Q6J("ngIf",!e.readonly),s.xp6(2),s.Q6J("ngIf",!(null!=(t=s.lcZ(7,4,e.roles$))&&t.length)),s.xp6(2),s.Q6J("selectable",!1),s.xp6(1),s.Q6J("ngForOf",s.lcZ(10,6,e.roles$))}}let qa=(()=>{class e{constructor(e,t,n,i){this.users=e,this.roleApi=t,this.modal=n,this.currentUser=i,this.roles$=new c.X([]),this.readonly=!1}openSelectRolesModal(){this.modal.open(ya,{initialRoles:this.roles$.value}).afterClosed().subscribe(e=>{e&&this.setRoles(e)})}setRoles(e){this.roles$.next(e),this.propagateChange(this.roles$.value)}detachRole(e){const t=this.roles$.value.filter(t=>t.id!==e.id);this.setRoles(t)}writeValue(e){this.roles$.next(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Xi.Q),s.Y36(Za),s.Y36(mt.u),s.Y36(Wi.I))},e.\u0275cmp=s.Xpm({type:e,selectors:[["role-manager"]],inputs:{readonly:"readonly"},features:[s._Bn([{provide:a.JU,useExisting:e,multi:!0}])],decls:1,vars:1,consts:[["class","panel-outter",4,"ngIf"],[1,"panel-outter"],[1,"header"],["trans","",1,"title"],["class","add-button",4,"ngIf"],[1,"panel-body","roles"],["class","no-permissions","trans","",4,"ngIf"],[3,"selectable"],[3,"removable","disabled","removed",4,"ngFor","ngForOf"],[1,"add-button"],["mat-flat-button","","color","accent","type","button","trans","",1,"select-roles-modal-button",3,"click"],["trans","",1,"no-permissions"],[3,"removable","disabled","removed"],[1,"role-name"],["svgIcon","cancel","matChipRemove",""]],template:function(e,t){1&e&&s.YNc(0,Ta,11,8,"div",0),2&e&&s.Q6J("ngIf",t.currentUser.hasPermission("roles.update"))},directives:[i.O5,Zt.P,h.qn,i.sg,p.lW,h.HS,P.Hw,h.qH],pipes:[i.Ov],styles:[".panel-outter[_ngcontent-%COMP%]{margin:10px 0 20px}.header[_ngcontent-%COMP%]{display:flex;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--be-divider-default);align-items:flex-end}.title[_ngcontent-%COMP%]{font-weight:500}.add-button[_ngcontent-%COMP%]{text-align:right;flex:1 1 auto}.role-name[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),e})();var ka=n(20616);function Ma(e,t){if(1&e&&(s.TgZ(0,"p",21),s._uU(1),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.description," ")}}function Ia(e,t){if(1&e&&(s.TgZ(0,"p",31),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).$implicit;s.xp6(1),s.hij(" ",e.description," ")}}function Ua(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",27),s.TgZ(1,"label",28),s._uU(2),s.qZA(),s.TgZ(3,"input",29),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().$implicit.value=t}),s.qZA(),s.YNc(4,Ia,2,1,"p",30),s.qZA()}if(2&e){const e=s.oxw().$implicit,t=s.oxw(2).$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("for",t.name+"-"+e.name),s.xp6(1),s.Oqu(n.viewName(e.name)),s.xp6(1),s.Q6J("id",t.name+"-"+e.name)("ngModel",e.value),s.xp6(1),s.Q6J("ngIf",e.description)}}function Oa(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-slide-toggle",34),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).$implicit.value=t}),s._uU(1),s.qZA()}if(2&e){const e=s.oxw(2).$implicit,t=s.oxw(2).$implicit,n=s.oxw(2);s.Q6J("id",t.name+"-"+e.name)("ngModel",e.value),s.xp6(1),s.Oqu(n.viewName(e.name))}}function Da(e,t){if(1&e&&(s.TgZ(0,"p",31),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).$implicit;s.xp6(1),s.hij(" ",e.description," ")}}function Pa(e,t){if(1&e&&(s.TgZ(0,"div",32),s.YNc(1,Oa,2,3,"mat-slide-toggle",33),s.YNc(2,Da,2,1,"p",30),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngSwitchCase","bool"),s.xp6(1),s.Q6J("ngIf",e.description)}}function Sa(e,t){if(1&e&&(s.ynx(0),s.ynx(1,24),s.YNc(2,Ua,5,5,"div",25),s.YNc(3,Pa,3,2,"div",26),s.BQk(),s.BQk()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("ngSwitch",e.type),s.xp6(1),s.Q6J("ngSwitchCase","number"),s.xp6(1),s.Q6J("ngSwitchCase","bool")}}function Ja(e,t){if(1&e&&(s.TgZ(0,"div",22),s.YNc(1,Sa,4,3,"ng-container",23),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",e.restrictions)}}function Na(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"li",14),s.TgZ(1,"div",15),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).selectionModel.toggle(t)}),s.TgZ(2,"div",16),s.TgZ(3,"div",17),s._uU(4),s.qZA(),s.YNc(5,Ma,2,1,"p",18),s.qZA(),s._UZ(6,"mat-pseudo-checkbox",19),s.qZA(),s.YNc(7,Ja,2,1,"div",20),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(2);s.xp6(4),s.hij(" ",e.display_name||e.name," "),s.xp6(1),s.Q6J("ngIf",e.description),s.xp6(1),s.Q6J("state",n.selectionModel.isSelected(e)?"checked":"unchecked"),s.xp6(1),s.Q6J("ngIf",!(null!=n.data&&n.data.hideRestrictions)&&(null==e.restrictions?null:e.restrictions.length)&&n.selectionModel.isSelected(e))}}function Ra(e,t){if(1&e&&(s.TgZ(0,"mat-expansion-panel",10),s.TgZ(1,"mat-expansion-panel-header"),s.TgZ(2,"mat-panel-title",11),s._uU(3),s.qZA(),s.qZA(),s.TgZ(4,"ul",12),s.YNc(5,Na,8,4,"li",13),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.Q6J("expanded",!1),s.xp6(3),s.Oqu(e.key.replace("_"," ")),s.xp6(2),s.Q6J("ngForOf",e.value)}}let Qa=(()=>{class e{constructor(e,t,n){this.dialogRef=e,this.data=t,this.values=n,this.allPermissions$=new c.X({}),this.filteredPermissions$=new c.X({}),this.loading$=new c.X(!1),this.selectionModel=new ba(this.data.initialPermissions||[],"name"),this.showAdvancedControl=new a.NI(!1)}ngOnInit(){this.fetchAllPermissions(),this.showAdvancedControl.valueChanges.subscribe(()=>{this.setShowAdvanced()})}confirm(){this.close(this.getSelectedPermissions())}close(e){this.dialogRef.close(e)}fetchAllPermissions(){const e=this.data.valueListKey||"permissions";this.loading$.next(!0),this.values.get([e]).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(t=>{const n=this.mergeRestrictions(t[e]).reduce(function(e,t){return(e[t.group]=e[t.group]||[]).push(t),e},{});this.allPermissions$.next(n),this.setShowAdvanced()})}setShowAdvanced(){const e=this.allPermissions$.value,t={};Object.keys(e).forEach(n=>{const i=e[n].filter(e=>this.showAdvancedControl.value||!e.advanced);i.length&&(t[n]=i)}),this.filteredPermissions$.next(t)}getSelectedPermissions(){return Ei(Object.values(this.allPermissions$.value)).filter(e=>this.selectionModel.isSelected(e))}mergeRestrictions(e){return e.map(e=>{const t=this.selectionModel.getValue(e.name);return e.restrictions=(e.restrictions||[]).map(e=>{let n={};return t&&t.restrictions&&(n=t.restrictions.find(t=>t.name===e.name)||{}),Object.assign(Object.assign({},e),n)}),e})}viewName(e){return e.replace(/_/g," ")}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so),s.Y36(m.WI),s.Y36(_t.l))},e.\u0275cmp=s.Xpm({type:e,selectors:[["select-permissions-modal"]],decls:20,vars:9,consts:[[1,"modal-header"],["mat-dialog-title","","trans","",1,"modal-title","mat-dialog-title"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["class","mat-elevation-z2",3,"expanded",4,"ngFor","ngForOf"],[1,"show-advanced-container"],["trans","",3,"formControl"],["mat-button","","type","button","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",3,"click"],[1,"overlay","overlay-partial",3,"isVisible"],[1,"mat-elevation-z2",3,"expanded"],["trans",""],[1,"unstyled-list","selection-list"],["class","list-item",4,"ngFor","ngForOf"],[1,"list-item"],["matRipple","",1,"list-item-header",3,"click"],[1,"meta"],["trans","",1,"list-item-name"],["class","list-item-description","trans","",4,"ngIf"],[3,"state"],["class","list-item-restrictions",4,"ngIf"],["trans","",1,"list-item-description"],[1,"list-item-restrictions"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],["class","input-container list-item-restriction",4,"ngSwitchCase"],["class","setting-toggle-container list-item-restriction",4,"ngSwitchCase"],[1,"input-container","list-item-restriction"],[3,"for"],["type","number","min","0",3,"id","ngModel","ngModelChange"],["class","description","trans","",4,"ngIf"],["trans","",1,"description"],[1,"setting-toggle-container","list-item-restriction"],["trans","",3,"id","ngModel","ngModelChange",4,"ngSwitchCase"],["trans","",3,"id","ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s._uU(2,"Select Permissions"),s.qZA(),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.TgZ(5,"mat-dialog-content"),s.TgZ(6,"mat-accordion"),s.YNc(7,Ra,6,3,"mat-expansion-panel",4),s.ALo(8,"keyvalue"),s.ALo(9,"async"),s.qZA(),s.TgZ(10,"div",5),s.TgZ(11,"mat-slide-toggle",6),s._uU(12,"Show advanced permissions"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(13,"mat-dialog-actions"),s.TgZ(14,"button",7),s.NdJ("click",function(){return t.close()}),s._uU(15,"Cancel"),s.qZA(),s.TgZ(16,"button",8),s.NdJ("click",function(){return t.confirm()}),s._uU(17,"Select"),s.qZA(),s.qZA(),s._UZ(18,"loading-indicator",9),s.ALo(19,"async")),2&e&&(s.xp6(7),s.Q6J("ngForOf",s.lcZ(8,3,s.lcZ(9,5,t.filteredPermissions$))),s.xp6(4),s.Q6J("formControl",t.showAdvancedControl),s.xp6(7),s.Q6J("isVisible",s.lcZ(19,7,t.loading$)))},directives:[m.uh,Zt.P,P.Hw,m.xY,Ke.pp,i.sg,T.Rr,a.JJ,a.oH,m.H8,p.lW,ka.Q,Ke.ib,Ke.yz,Ke.yK,Z.wG,i.O5,Z.nP,i.RF,i.n9,a.qQ,a.wV,a.Fj,a.On],pipes:[i.Nd,i.Ov],styles:["[_nghost-%COMP%]{display:block;width:550px;max-width:100%;position:relative}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{text-transform:capitalize}p[_ngcontent-%COMP%]{color:var(--be-secondary-text);font-size:1.3rem}.setting-toggle-container[_ngcontent-%COMP%]{margin-bottom:0}.show-advanced-container[_ngcontent-%COMP%]{margin-top:25px;margin-bottom:20px}"],changeDetection:0}),e})();function Fa(e,t){1&e&&(s.TgZ(0,"div",7),s._uU(1,"No permissions yet."),s.qZA())}function Ea(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.ALo(2,"trans"),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.hij("(",s.lcZ(2,1,e.value+" max"),")")}}function Ya(e,t){if(1&e&&(s.ynx(0),s.YNc(1,Ea,3,3,"span",10),s.BQk()),2&e){const e=t.ngIf;s.xp6(1),s.Q6J("ngIf",e.value)}}function La(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-chip",8),s.NdJ("removed",function(){const t=s.CHM(e).$implicit;return s.oxw().removePermission(t.name)}),s.TgZ(1,"span"),s.TgZ(2,"span",9),s._uU(3),s.qZA(),s.YNc(4,Ya,2,1,"ng-container",10),s.qZA(),s._UZ(5,"mat-icon",11),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.Q6J("removable",!0),s.xp6(3),s.Oqu(e.name),s.xp6(1),s.Q6J("ngIf",n.getCountRestriction(e))}}let $a=(()=>{class e{constructor(e){this.modal=e,this.valueListKey="permissions",this.hideRestrictions=!1,this.permissions$=new c.X([])}showSelectPermissionsModal(){this.modal.open(Qa,{initialPermissions:this.permissions$.value,valueListKey:this.valueListKey,hideRestrictions:this.hideRestrictions}).afterClosed().subscribe(e=>{e&&this.setPermissions(e)})}removePermission(e){const t=this.permissions$.value.filter(t=>t.name!==e);this.setPermissions(t)}setPermissions(e){this.permissions$.next(e),this.propagateChange(this.permissions$.value)}getCountRestriction(e){return e.restrictions.find(e=>"count"===e.name)}writeValue(e){this.permissions$.next(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(mt.u))},e.\u0275cmp=s.Xpm({type:e,selectors:[["permission-manager"]],inputs:{valueListKey:"valueListKey",hideRestrictions:"hideRestrictions"},features:[s._Bn([{provide:a.JU,useExisting:e,multi:!0}])],decls:11,vars:7,consts:[[1,"header"],["trans","",1,"title"],["mat-flat-button","","color","accent","type","button","trans","",3,"click"],[1,"manage-permissions"],["class","no-permissions","trans","",4,"ngIf"],[3,"selectable"],[3,"removable","removed",4,"ngFor","ngForOf"],["trans","",1,"no-permissions"],[3,"removable","removed"],["trans",""],[4,"ngIf"],["svgIcon","cancel","matChipRemove",""]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"span",1),s._uU(2,"Permissions"),s.qZA(),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.showSelectPermissionsModal()}),s._uU(4,"Manage"),s.qZA(),s.qZA(),s.TgZ(5,"div",3),s.YNc(6,Fa,2,0,"div",4),s.ALo(7,"async"),s.TgZ(8,"mat-chip-list",5),s.YNc(9,La,6,3,"mat-chip",6),s.ALo(10,"async"),s.qZA(),s.qZA()),2&e){let e;s.xp6(6),s.Q6J("ngIf",!(null!=(e=s.lcZ(7,3,t.permissions$))&&e.length)),s.xp6(2),s.Q6J("selectable",!1),s.xp6(1),s.Q6J("ngForOf",s.lcZ(10,5,t.permissions$))}},directives:[Zt.P,p.lW,i.O5,h.qn,i.sg,h.HS,P.Hw,h.qH],pipes:[i.Ov,lt.R],styles:["[_nghost-%COMP%]{display:block;margin:25px 0 35px}.header[_ngcontent-%COMP%]{display:flex;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--be-divider-default);align-items:flex-end}.title[_ngcontent-%COMP%]{font-weight:500}button[_ngcontent-%COMP%]{margin-left:auto}.error[_ngcontent-%COMP%]{margin-top:10px;color:#f44336}"],changeDetection:0}),e})();function Va(e,t){1&e&&(s.TgZ(0,"h2",5),s._uU(1,"Update User Details"),s.qZA())}function Ha(e,t){1&e&&(s.TgZ(0,"h2",5),s._uU(1,"Create a New User"),s.qZA())}function za(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(null==e?null:e.email)}}function Ba(e,t){if(1&e&&(s.TgZ(0,"div",13),s.TgZ(1,"label",35),s._uU(2,"Email"),s.qZA(),s._UZ(3,"input",36),s.YNc(4,za,2,1,"div",12),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(4),s.Q6J("ngIf",null==e?null:e.email)}}function ja(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(null==e?null:e.password)}}function Ga(e,t){if(1&e&&(s.TgZ(0,"div",13),s.TgZ(1,"label",38),s._uU(2,"Password"),s.qZA(),s._UZ(3,"input",39),s.YNc(4,ja,2,1,"div",12),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(4),s.Q6J("ngIf",null==e?null:e.password)}}function Xa(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.avatar)}}function Wa(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.first_name)}}function Ka(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.last_name)}}function es(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.email_verified_at)}}function ts(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.available_space)}}function ns(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.roles)}}function is(e,t){1&e&&s._UZ(0,"permission-manager",40)}function as(e,t){if(1&e&&(s.TgZ(0,"div",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.permissions)}}function ss(e,t){1&e&&(s.TgZ(0,"span",41),s._uU(1,"Update User"),s.qZA())}function os(e,t){1&e&&(s.TgZ(0,"span",41),s._uU(1,"Create User"),s.qZA())}function rs(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",6),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw().confirm()}),s.TgZ(1,"mat-dialog-content",7),s.YNc(2,Ba,5,1,"div",8),s.YNc(3,Ga,5,1,"div",8),s.TgZ(4,"div",9),s.TgZ(5,"div",10),s._UZ(6,"upload-image-control",11),s.YNc(7,Xa,2,1,"div",12),s.qZA(),s.TgZ(8,"div",7),s.TgZ(9,"div",13),s.TgZ(10,"label",14),s._uU(11,"First Name"),s.qZA(),s._UZ(12,"input",15),s.YNc(13,Wa,2,1,"div",12),s.qZA(),s.TgZ(14,"div",13),s.TgZ(15,"label",16),s._uU(16,"Last Name"),s.qZA(),s._UZ(17,"input",17),s.YNc(18,Ka,2,1,"div",12),s.qZA(),s.qZA(),s.qZA(),s.TgZ(19,"div",13),s.TgZ(20,"label",18),s._uU(21,"Email Confirmed"),s.qZA(),s.TgZ(22,"div",19),s.TgZ(23,"select",20),s.TgZ(24,"option",21),s._uU(25,"Yes"),s.qZA(),s.TgZ(26,"option",21),s._uU(27,"No"),s.qZA(),s.qZA(),s.TgZ(28,"button",22),s.NdJ("click",function(){return s.CHM(e),s.oxw().sendEmailConfirmation()}),s.ALo(29,"async"),s._uU(30,"Resend"),s.qZA(),s.qZA(),s.YNc(31,es,2,1,"div",12),s.qZA(),s.TgZ(32,"div",13),s.TgZ(33,"label",23),s._uU(34,"New Password"),s.qZA(),s.TgZ(35,"div",24),s._UZ(36,"input",25),s.TgZ(37,"button",26),s.NdJ("click",function(){return s.CHM(e),s.oxw().generateNewPassword()}),s._uU(38,"Generate"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(39,"space-input",27),s.TgZ(40,"p",28),s._uU(41,'Disk space available to user. If left empty, it will be inherited from value set in "admin -> settings -> uploading" page.'),s.qZA(),s.YNc(42,ts,2,1,"div",12),s.qZA(),s._UZ(43,"role-manager",29),s.YNc(44,ns,2,1,"div",12),s.YNc(45,is,1,0,"permission-manager",30),s.YNc(46,as,2,1,"div",12),s.qZA(),s.TgZ(47,"div",31),s.TgZ(48,"button",32),s.NdJ("click",function(){return s.CHM(e),s.oxw().close()}),s._uU(49,"Cancel"),s.qZA(),s.TgZ(50,"button",33),s.ALo(51,"async"),s.YNc(52,ss,2,0,"span",34),s.YNc(53,os,2,0,"span",34),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.Q6J("formGroup",n.form),s.xp6(2),s.Q6J("ngIf",!n.data.user),s.xp6(1),s.Q6J("ngIf",!n.data.user),s.xp6(3),s.Q6J("uploadConfig",n.avatarUploadConfig()),s.xp6(1),s.Q6J("ngIf",null==e?null:e.avatar),s.xp6(6),s.Q6J("ngIf",null==e?null:e.first_name),s.xp6(5),s.Q6J("ngIf",null==e?null:e.last_name),s.xp6(1),s.ekj("resend-button-visible",n.shouldShowResendButton()),s.xp6(5),s.Q6J("ngValue",!0),s.xp6(2),s.Q6J("ngValue",!1),s.xp6(2),s.Q6J("disabled",s.lcZ(29,20,n.loading$)),s.xp6(3),s.Q6J("ngIf",null==e?null:e.email_verified_at),s.xp6(11),s.Q6J("ngIf",null==e?null:e.available_space),s.xp6(2),s.Q6J("ngIf",null==e?null:e.roles),s.xp6(1),s.Q6J("ngIf",n.currentUser.hasPermission("permissions.update")),s.xp6(1),s.Q6J("ngIf",null==e?null:e.permissions),s.xp6(4),s.Q6J("disabled",s.lcZ(51,22,n.loading$)),s.xp6(2),s.Q6J("ngIf",n.data.user),s.xp6(1),s.Q6J("ngIf",!n.data.user)}}let ls=(()=>{class e{constructor(e,t,n,i,a,s,o,r,l){this.dialogRef=e,this.data=t,this.users=n,this.toast=i,this.currentUser=a,this.fb=s,this.auth=o,this.settings=r,this.avatarValidator=l,this.loading$=new c.X(!1),this.form=this.fb.group({email:[""],password:[""],avatar:[""],first_name:[""],last_name:[""],email_verified_at:[!1],available_space:[""],roles:[],permissions:[]}),this.errors$=new c.X({})}ngOnInit(){this.data.user&&this.form.patchValue(Object.assign(Object.assign({},this.data.user),{password:null,email_verified_at:!!this.data.user.email_verified_at}))}confirm(){if(this.loading$.value)return;let e;const t=this.getPayload();this.loading$.next(!0),e=this.data.user?this.users.update(this.data.user.id,t):this.users.create(t),e.pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(e=>{this.close(e.user),this.toast.open("User "+(this.data.user?"updated":"created"))},e=>this.errors$.next(e.errors))}close(e){this.dialogRef.close(e)}getPayload(){const e=Object.assign({},this.form.value);return e.roles=(e.roles||[]).map(e=>e.id),e.permissions=e.permissions||[],e.password||delete e.password,e.email_verified_at=e.email_verified_at?new Date:null,e}sendEmailConfirmation(){this.loading$.next(!0),this.auth.resendEmailConfirmation(this.data.user.email).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(()=>{this.toast.open("Verification email re-sent.")},e=>{this.toast.open(e.message||Gi.v.Default)})}shouldShowResendButton(){return this.data.user&&this.data.user.id&&this.settings.get("require_email_confirmation")&&!this.form.get("email_verified_at").value}avatarUploadConfig(){return{uri:this.data.user?`users/${this.data.user.id}/avatar`:ji.C.Image,httpParams:{diskPrefix:"avatars"},validator:this.avatarValidator}}generateNewPassword(){this.form.patchValue({password:(0,li.O)(15)})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so),s.Y36(m.WI),s.Y36(Xi.Q),s.Y36(ht.F),s.Y36(Wi.I),s.Y36(a.qu),s.Y36(Ki.e),s.Y36(st.Z),s.Y36(ea.m))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-user-modal"]],decls:7,vars:5,consts:[[1,"modal-header"],["class","modal-title","mat-dialog-title","","trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["autocomplete","off","ngNativeValidate","",3,"formGroup","ngSubmit",4,"ngIf"],["mat-dialog-title","","trans","",1,"modal-title"],["autocomplete","off","ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"many-inputs"],["class","input-container",4,"ngIf"],[1,"avatar-container"],[1,"input-container","avatar-input-container"],["formControlName","avatar",1,"inherit-size",3,"uploadConfig"],["class","error",4,"ngIf"],[1,"input-container"],["for","crupdate-user-first_name","trans",""],["type","text","id","crupdate-user-first_name","formControlName","first_name"],["for","crupdate-user-last_name","trans",""],["type","text","id","crupdate-user-last_name","formControlName","last_name"],["for","crupdate-user-confirmed","trans",""],[1,"confirmed-select-wrapper"],["id","crupdate-user-confirmed","formControlName","email_verified_at"],["trans","",3,"ngValue"],["mat-flat-button","","color","accent","type","button","trans","",1,"resend-confirmation-button",3,"disabled","click"],["for","crupdate-user-new-password","trans",""],[1,"input-with-action"],["type","text","id","crupdate-user-new-password","formControlName","password"],["type","button","mat-flat-button","","color","accent","trans","",3,"click"],["label","Available Space","formControlName","available_space"],["trans","",1,"description"],["formControlName","roles"],["formControlName","permissions",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right","mat-dialog-actions"],["type","button","mat-button","","trans","",1,"button","cancel",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary",3,"disabled"],["trans","",4,"ngIf"],["for","crupdate-user-email","trans",""],["type","email","id","crupdate-user-email","formControlName","email","required",""],[1,"error"],["for","crupdate-user-password","trans",""],["type","password","id","crupdate-user-password","formControlName","password","required",""],["formControlName","permissions"],["trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,Va,2,0,"h2",1),s.YNc(2,Ha,2,0,"h2",1),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.YNc(5,rs,54,24,"form",4),s.ALo(6,"async")),2&e&&(s.xp6(1),s.Q6J("ngIf",t.data.user),s.xp6(1),s.Q6J("ngIf",!t.data.user),s.xp6(3),s.Q6J("ngIf",s.lcZ(6,3,t.errors$)))},directives:[i.O5,P.Hw,m.uh,Zt.P,a.JL,a.sg,m.xY,_a,a.JJ,a.u,a.Fj,a.EJ,a.YN,a.Kr,p.lW,_i,qa,m.H8,a.Q7,$a],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:block;width:500px;max-width:100%}.avatar-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px}.avatar-container[_ngcontent-%COMP%]   .many-inputs[_ngcontent-%COMP%]{flex:1 1 auto}.avatar-container[_ngcontent-%COMP%]   .input-container[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.avatar-input-container[_ngcontent-%COMP%]{flex-shrink:0;width:170px;height:170px;margin-right:15px}.resend-confirmation-button[_ngcontent-%COMP%]{display:none}.resend-button-visible[_ngcontent-%COMP%]   .confirmed-select-wrapper[_ngcontent-%COMP%]{display:flex}.resend-button-visible[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{flex:1;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}.resend-button-visible[_ngcontent-%COMP%]   .resend-confirmation-button[_ngcontent-%COMP%]{display:block;border-top-left-radius:0;border-bottom-left-radius:0}"],changeDetection:0}),e})();var cs=n(99883),ds=n(83644),us=n(45418);const ps=[new ds.XQ({type:ds.Bq.Select,key:"email_verified_at",label:"Email",description:"Email verification status",defaultValue:{value:null,operator:ds.pg.ne},defaultOperator:ds.pg.ne,options:[{key:"Confirmed",value:{value:null,operator:ds.pg.ne}},{key:"Not Confirmed",value:{value:null,operator:ds.pg.eq}}]}),new us.T7({description:"Date user registered or was created"}),new us.yH({description:"Date user was last updated"}),new ds.XQ({type:ds.Bq.Select,key:"subscriptions",label:"Subscribed",description:"Whether user is subscribed or not",defaultValue:{value:"*",operator:ds.pg.has},defaultOperator:ds.pg.ne,options:[{key:"Yes",value:{value:"*",operator:ds.pg.has}},{key:"No",value:{value:"*",operator:ds.pg.doesntHave}}]})];var gs=n(63412);let hs=(()=>{class e{constructor(e){this.dialogRef=e}close(){this.dialogRef.close()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so))},e.\u0275cmp=s.Xpm({type:e,selectors:[["csv-export-info-dialog"]],decls:13,vars:0,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["mat-dialog-content","",1,"mat-dialog-contents"],[1,"message-container"],["svgIcon","check","color","su",1,"success-icon"],["trans",""],["mat-dialog-actions","",1,"buttons","right","mat-dialog-actions"],["mat-raised-button","","color","accent","cdkFocusInitial","","trans","",1,"button","primary","submit-button",3,"click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s._uU(2,"CSV Export"),s.qZA(),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"div",5),s._UZ(7,"mat-icon",6),s.TgZ(8,"div",7),s._uU(9," Your request is being processed. We'll email you when the report is ready to download. In certain cases, it might take a little longer, depending on the number of items beings exported and the volume of activity. "),s.qZA(),s.qZA(),s.qZA(),s.TgZ(10,"div",8),s.TgZ(11,"button",9),s.NdJ("click",function(){return t.close()}),s._uU(12," Got it "),s.qZA(),s.qZA())},directives:[m.uh,P.Hw,m.xY,Zt.P,m.H8,p.lW],styles:["[_nghost-%COMP%]{display:block;max-width:500px}.modal-header[_ngcontent-%COMP%]{margin-bottom:10px}.message-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;margin-bottom:10px}.success-icon[_ngcontent-%COMP%]{color:#43a047;margin-right:10px;flex-shrink:0}"],changeDetection:0}),e})(),ms=(()=>{class e{constructor(e,t){this.http=e,this.modal=t}export(e,t={}){return this.http.post(e,t).subscribe(e=>{e.downloadPath?(0,gs.k)(e.downloadPath):this.modal.open(hs)})}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(o.r),s.LFG(mt.u))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var fs=n(54262);const _s=["table-header-checkbox",""];let bs=(()=>{class e{constructor(e,t){this.datatable=e,this.cd=t}ngOnInit(){this.changeRef=this.datatable.selectedRows$.subscribe(()=>{this.cd.markForCheck()})}ngOnDestroy(){this.changeRef.unsubscribe()}anyRowsSelected(){return!!this.datatable.selectedRows$.value.length}allRowsSelected(){var e;return this.datatable.selectedRows$.value.length&&this.datatable.selectedRows$.value.length===(null===(e=this.datatable.data$.value)||void 0===e?void 0:e.length)}toggleAllRows(){this.allRowsSelected()?this.datatable.selectedRows$.next([]):this.datatable.selectedRows$.next(this.datatable.data$.value.map(e=>e.id))}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(cs.x),s.Y36(s.sBO))},e.\u0275cmp=s.Xpm({type:e,selectors:[["","table-header-checkbox",""]],hostAttrs:[1,"table-checkbox"],attrs:_s,decls:1,vars:2,consts:[[3,"checked","indeterminate","change"]],template:function(e,t){1&e&&(s.TgZ(0,"mat-checkbox",0),s.NdJ("change",function(e){return e?t.toggleAllRows():null}),s.qZA()),2&e&&s.Q6J("checked",t.allRowsSelected())("indeterminate",t.anyRowsSelected()&&!t.allRowsSelected())},directives:[g.oG],encapsulation:2,changeDetection:0}),e})();var vs=n(1303),Zs=n(32141);const xs=["table-body-checkbox",""];let ys=(()=>{class e{constructor(e,t){this.datatable=e,this.cd=t}ngOnInit(){this.changeRef=this.datatable.selectedRows$.subscribe(e=>{this.cd.markForCheck()})}ngOnDestroy(){this.changeRef.unsubscribe()}isRowSelected(e){return this.datatable.selectedRows$.value.indexOf(e)>-1}toggleRow(e){if(this.isRowSelected(e)){const t=this.datatable.selectedRows$.value.slice(),n=this.datatable.selectedRows$.value.indexOf(e);t.splice(n,1),this.datatable.selectedRows$.next(t)}else this.datatable.selectedRows$.next([...this.datatable.selectedRows$.value,e])}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(cs.x),s.Y36(s.sBO))},e.\u0275cmp=s.Xpm({type:e,selectors:[["","table-body-checkbox",""]],hostAttrs:[1,"table-checkbox"],inputs:{rowId:["table-body-checkbox","rowId"]},attrs:xs,decls:1,vars:1,consts:[[3,"checked","click","change"]],template:function(e,t){1&e&&(s.TgZ(0,"mat-checkbox",0),s.NdJ("click",function(e){return e.stopPropagation()})("change",function(e){return e?t.toggleRow(t.rowId):null}),s.qZA()),2&e&&s.Q6J("checked",t.isRowSelected(t.rowId))},directives:[g.oG],encapsulation:2,changeDetection:0}),e})();var As=n(31176),ws=n(76403);function Cs(e,t){1&e&&s._UZ(0,"mat-progress-bar",22)}function Ts(e,t){1&e&&(s.TgZ(0,"th",1),s._uU(1,"Subscribed"),s.qZA())}function qs(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",27),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).maybeDeleteSelectedUsers()}),s._uU(1," Delete "),s.qZA()}}const ks=function(e){return{count:e,resource:"user(s)"}};function Ms(e,t){if(1&e&&(s.TgZ(0,"tr"),s.TgZ(1,"th",23),s.TgZ(2,"div",24),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",25),s.YNc(5,qs,2,0,"button",26),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.ngIf,n=s.oxw();s.xp6(2),s.Q6J("transValues",s.VKq(2,ks,e)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("users.delete"))}}function Is(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",null!=e.subscriptions&&e.subscriptions.length?"Yes":"No"," ")}}function Us(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",37),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().showCrupdateUserModal(t)}),s.ALo(1,"trans"),s._UZ(2,"mat-icon",38),s.qZA()}2&e&&s.Q6J("matTooltip",s.lcZ(1,1,"Edit user"))}function Os(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",37),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().loginAs(t)}),s.ALo(1,"trans"),s._UZ(2,"mat-icon",39),s.qZA()}2&e&&s.Q6J("matTooltip",s.lcZ(1,1,"Login as user"))}function Ds(e,t){if(1&e&&(s.TgZ(0,"tr"),s._UZ(1,"td",28),s.TgZ(2,"td"),s._UZ(3,"user-column",29),s.qZA(),s.YNc(4,Is,2,1,"td",30),s.TgZ(5,"td",31),s._uU(6),s.qZA(),s.TgZ(7,"td",32),s._uU(8),s.qZA(),s.TgZ(9,"td",33),s._uU(10),s.qZA(),s.TgZ(11,"td"),s._uU(12),s.ALo(13,"formattedDate"),s.qZA(),s.TgZ(14,"td",34),s.YNc(15,Us,3,3,"button",35),s.YNc(16,Os,3,3,"button",35),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Q6J("user",e),s.xp6(1),s.Q6J("ngIf",n.settings.get("billing.enable")),s.xp6(2),s.Oqu(n.makeRolesList(e.roles)),s.xp6(2),s.Oqu(e.first_name||"-"),s.xp6(2),s.Oqu(e.last_name||"-"),s.xp6(2),s.Oqu(s.lcZ(13,9,e.created_at)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("users.update")),s.xp6(1),s.Q6J("ngIf",n.currentUser.hasPermission("admin"))}}function Ps(e,t){1&e&&(s.TgZ(0,"no-results-message",40),s.TgZ(1,"span",41),s._uU(2,"No users have been created yet"),s.qZA(),s.qZA())}let Ss=(()=>{class e{constructor(e,t,n,i,a,s,o){this.userService=e,this.currentUser=t,this.settings=n,this.toast=i,this.datatable=a,this.csv=s,this.http=o,this.filters=ps,this.users$=this.datatable.data$}ngOnInit(){this.datatable.init({uri:Xi.Q.BASE_URI,staticParams:{with:["subscriptions"]}})}ngOnDestroy(){this.datatable.destroy()}makeRolesList(e){return e.slice(0,3).map(e=>e.name).join(", ")}maybeDeleteSelectedUsers(){this.datatable.confirmResourceDeletion("users").subscribe(()=>{this.userService.delete(this.datatable.selectedRows$.value).subscribe(()=>{this.datatable.reset(),this.toast.open("Deleted selected users")},e=>{this.toast.open(e.message||Gi.v.Default)})})}showCrupdateUserModal(e){this.datatable.openCrupdateResourceModal(ls,{user:e}).subscribe()}exportCsv(){this.csv.export(Xi.Q.EXPORT_CSV_URI)}loginAs(e){this.http.post(`admin/users/impersonate/${e.id}`).subscribe(()=>{location.reload()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Xi.Q),s.Y36(Wi.I),s.Y36(st.Z),s.Y36(ht.F),s.Y36(cs.x),s.Y36(ms),s.Y36(o.r))},e.\u0275cmp=s.Xpm({type:e,selectors:[["user-index"]],features:[s._Bn([cs.x])],decls:46,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","users",3,"filters"],[1,"action-buttons"],["mat-raised-button","",1,"btn-with-dropdown-icon",3,"matMenuTriggerFor"],["svgIcon","keyboard-arrow-down"],["menu","matMenu"],["mat-menu-item","",3,"click"],["svgIcon","export-csv"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","email","trans",""],["trans","",4,"ngIf"],["table-sort-header","","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","people.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["colspan","8"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["mat-raised-button","","color","warn","trans","",3,"click",4,"ngIf"],["mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],[3,"user"],["data-label","Subscribed",4,"ngIf"],["data-label","Roles"],["data-label","First Name"],["data-label","Last Name"],[1,"edit-column"],["mat-icon-button","",3,"matTooltip","click",4,"ngIf"],["data-label","Subscribed"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["svgIcon","login"],["svgImage","people.svg"],["primary-text","","trans",""]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s._uU(2,"Users"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"datatable-filters",3),s.TgZ(5,"div",4),s.TgZ(6,"button",5),s.TgZ(7,"span",1),s._uU(8,"More Actions"),s.qZA(),s._UZ(9,"mat-icon",6),s.qZA(),s.TgZ(10,"mat-menu",null,7),s.TgZ(12,"button",8),s.NdJ("click",function(){return t.exportCsv()}),s._UZ(13,"mat-icon",9),s.TgZ(14,"span",1),s._uU(15,"Export users in CSV"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(16,"button",10),s.NdJ("click",function(){return t.showCrupdateUserModal()}),s._UZ(17,"mat-icon",11),s.TgZ(18,"span",1),s._uU(19,"Add New User"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(20,"div",12),s.YNc(21,Cs,1,0,"mat-progress-bar",13),s.ALo(22,"async"),s.TgZ(23,"table",14),s.TgZ(24,"thead"),s.TgZ(25,"tr"),s._UZ(26,"th",15),s.TgZ(27,"th",16),s._uU(28,"User"),s.qZA(),s.YNc(29,Ts,2,0,"th",17),s.TgZ(30,"th",1),s._uU(31,"Roles"),s.qZA(),s.TgZ(32,"th",18),s._uU(33,"First Name"),s.qZA(),s.TgZ(34,"th",18),s._uU(35,"Last Name"),s.qZA(),s.TgZ(36,"th",18),s._uU(37,"Created At"),s.qZA(),s._UZ(38,"th"),s.qZA(),s.YNc(39,Ms,6,4,"tr",19),s.qZA(),s.TgZ(40,"tbody"),s.YNc(41,Ds,17,11,"tr",20),s.ALo(42,"async"),s.qZA(),s.qZA(),s.YNc(43,Ps,3,0,"no-results-message",21),s.ALo(44,"async"),s._UZ(45,"datatable-footer"),s.qZA()),2&e){const e=s.MAs(11);s.xp6(4),s.Q6J("filters",t.filters),s.xp6(2),s.Q6J("matMenuTriggerFor",e),s.xp6(15),s.Q6J("ngIf",s.lcZ(22,7,t.datatable.paginator&&t.datatable.paginator.loading$)),s.xp6(8),s.Q6J("ngIf",t.settings.get("billing.enable")),s.xp6(10),s.Q6J("ngIf",t.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(42,9,t.users$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(44,11,t.datatable.paginator.noResults$))}},directives:[Zt.P,fs.h,p.lW,w.p6,P.Hw,w.VK,w.OP,i.O5,bs,vs.p,i.sg,Zs.V,C.pW,ys,As.r,k.gM,ws.U],pipes:[i.Ov,mn.l,lt.R],styles:[".mat-column-permissions[_ngcontent-%COMP%]{max-height:49px}.mat-column-email[_ngcontent-%COMP%]{margin-right:15px}"],changeDetection:0}),e})();class Js{constructor(e={}){for(const t in e)this[t]=e[t]}}var Ns=n(8208);function Rs(e,t){1&e&&(s.TgZ(0,"h2",5),s._uU(1,"Update Role"),s.qZA())}function Qs(e,t){1&e&&(s.TgZ(0,"h2",5),s._uU(1,"Create a New Role"),s.qZA())}function Fs(e,t){if(1&e&&(s.TgZ(0,"div",21),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.name)}}function Es(e,t){1&e&&(s.TgZ(0,"div",8),s.TgZ(1,"label",22),s._uU(2,"Type"),s.qZA(),s.TgZ(3,"select",23),s.TgZ(4,"option",24),s._uU(5,"Site Wide"),s.qZA(),s.TgZ(6,"option",25),s._uU(7,"Workspace"),s.qZA(),s.qZA(),s.qZA())}function Ys(e,t){if(1&e&&(s.TgZ(0,"div",21),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(null==e?null:e.permissions)}}function Ls(e,t){if(1&e&&(s.TgZ(0,"div",21),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.default)}}function $s(e,t){if(1&e&&(s.TgZ(0,"div",21),s._uU(1),s.qZA()),2&e){const e=s.oxw(3).ngIf;s.xp6(1),s.Oqu(e.guests)}}function Vs(e,t){if(1&e&&(s.TgZ(0,"div",26),s.TgZ(1,"mat-slide-toggle",30),s._uU(2,"Guests"),s.qZA(),s.TgZ(3,"p",28),s._uU(4,"Assign this role to guests (not logged in users)."),s.qZA(),s.YNc(5,$s,2,1,"div",11),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(5),s.Q6J("ngIf",e.guests)}}function Hs(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"div",26),s.TgZ(2,"mat-slide-toggle",27),s._uU(3,"Default"),s.qZA(),s.TgZ(4,"p",28),s._uU(5,"Assign this role to new users automatically."),s.qZA(),s.YNc(6,Ls,2,1,"div",11),s.qZA(),s.YNc(7,Vs,6,1,"div",29),s.BQk()),2&e){const e=s.oxw().ngIf,t=s.oxw();s.xp6(6),s.Q6J("ngIf",e.default),s.xp6(1),s.Q6J("ngIf","sitewide"===t.form.get("type").value)}}function zs(e,t){1&e&&(s.TgZ(0,"span",28),s._uU(1,"Update"),s.qZA())}function Bs(e,t){1&e&&(s.TgZ(0,"span",28),s._uU(1,"Create"),s.qZA())}function js(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",6),s.NdJ("submit",function(){return s.CHM(e),s.oxw().confirm()}),s.TgZ(1,"div",7),s.TgZ(2,"div",8),s.TgZ(3,"label",9),s._uU(4,"Name"),s.qZA(),s._UZ(5,"input",10),s.YNc(6,Fs,2,1,"div",11),s.qZA(),s.TgZ(7,"div",8),s.TgZ(8,"label",12),s._uU(9,"Description"),s.qZA(),s._UZ(10,"textarea",13),s.qZA(),s.YNc(11,Es,8,0,"div",14),s._UZ(12,"permission-manager",15),s.YNc(13,Ys,2,1,"div",11),s.YNc(14,Hs,8,2,"ng-container",16),s.qZA(),s.TgZ(15,"div",17),s.TgZ(16,"button",18),s.NdJ("click",function(){return s.CHM(e),s.oxw().close()}),s._uU(17,"Cancel"),s.qZA(),s.TgZ(18,"button",19),s.ALo(19,"async"),s.YNc(20,zs,2,0,"span",20),s.YNc(21,Bs,2,0,"span",20),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.Q6J("formGroup",n.form),s.xp6(6),s.Q6J("ngIf",e.name),s.xp6(5),s.Q6J("ngIf",n.settings.get("workspaces.integrated")),s.xp6(1),s.Q6J("valueListKey","workspace"===n.form.get("type").value?"workspacePermissions":"permissions")("hideRestrictions",null==n.data||null==n.data.role?null:n.data.role.guests),s.xp6(1),s.Q6J("ngIf",null==e?null:e.permissions),s.xp6(1),s.Q6J("ngIf",!(null!=n.data.role&&n.data.role.internal)),s.xp6(4),s.Q6J("disabled",s.lcZ(19,10,n.loading$)),s.xp6(2),s.Q6J("ngIf",n.data.role),s.xp6(1),s.Q6J("ngIf",!n.data.role)}}let Gs=(()=>{class e{constructor(e,t,n,i,a,s,o){this.toast=e,this.roleService=t,this.modal=n,this.fb=i,this.dialogRef=a,this.settings=s,this.data=o,this.form=this.fb.group({name:[""],description:[""],type:["sitewide"],default:[!1],guests:[!1],permissions:[]}),this.loading$=new c.X(!1),this.errors$=new c.X({})}ngOnInit(){this.resetState(),this.data.role&&this.form.patchValue(this.data.role)}close(e){this.resetState(),this.dialogRef.close(e)}confirm(){let e;this.loading$.next(!0),e=this.data.role?this.roleService.update(this.data.role.id,this.form.value):this.roleService.createNew(this.form.value),e.pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(e=>{this.toast.open("Role "+(this.data.role?"Updated":"Created")),this.close(e.data)},e=>this.errors$.next(e.errors))}resetState(){this.form.reset(),this.errors$.next({})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(ht.F),s.Y36(Za),s.Y36(mt.u),s.Y36(a.qu),s.Y36(m.so),s.Y36(st.Z),s.Y36(m.WI))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-role-modal"]],decls:7,vars:5,consts:[[1,"modal-header"],["class","modal-title mat-dialog-title","mat-dialog-title","","trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["autocomplete","off","ngNativeValidate","",3,"formGroup","submit",4,"ngIf"],["mat-dialog-title","","trans","",1,"modal-title","mat-dialog-title"],["autocomplete","off","ngNativeValidate","",3,"formGroup","submit"],["mat-dialog-content","",1,"many-inputs","mat-dialog-content"],[1,"input-container"],["for","name","trans",""],["type","text","formControlName","name","id","name","required",""],["class","error",4,"ngIf"],["for","description","trans",""],["type","text","id","description","formControlName","description","maxlength","190"],["class","input-container",4,"ngIf"],["formControlName","permissions",3,"valueListKey","hideRestrictions"],[4,"ngIf"],["mat-dialog-actions","",1,"buttons","right","mat-dialog-actions"],["type","button","mat-button","","trans","",1,"button","cancel",3,"click"],["type","submit","mat-raised-button","","color","accent",3,"disabled"],["trans","",4,"ngIf"],[1,"error"],["for","type","trans",""],["id","type","formControlName","type"],["value","sitewide","trans",""],["value","workspace","trans",""],[1,"setting-container"],["formControlName","default","id","default","trans",""],["trans",""],["class","setting-container",4,"ngIf"],["id","guest","formControlName","guests","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,Rs,2,0,"h2",1),s.YNc(2,Qs,2,0,"h2",1),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.YNc(5,js,22,12,"form",4),s.ALo(6,"async")),2&e&&(s.xp6(1),s.Q6J("ngIf",t.data.role),s.xp6(1),s.Q6J("ngIf",!t.data.role),s.xp6(3),s.Q6J("ngIf",s.lcZ(6,3,t.errors$)))},directives:[i.O5,P.Hw,m.uh,Zt.P,a.JL,a.sg,m.xY,a.Fj,a.JJ,a.u,a.Q7,a.nD,$a,m.H8,p.lW,a.EJ,a.YN,a.Kr,T.Rr],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.setting-container[_ngcontent-%COMP%]{margin-bottom:25px}.setting-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--be-secondary-text);margin:5px 0}"],changeDetection:0}),e})();var Xs=n(35866);const Ws=[{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:50},{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:50}];var Ks=n(72100),eo=n(67310);function to(e,t){1&e&&s.GkF(0)}let no=(()=>{class e{constructor(e,t){this.data=e,this.overlayPanelRef=t}close(){this.overlayPanelRef.close()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Ks.p),s.Y36(eo.L))},e.\u0275cmp=s.Xpm({type:e,selectors:[["datatable-filters-panel"]],hostVars:1,hostBindings:function(e,t){2&e&&s.d8E("@dialogContainer","enter")},decls:9,vars:1,consts:[["svgIcon","filter-list"],["trans",""],[1,"body",3,"ngSubmit"],[4,"ngTemplateOutlet"],["type","button","mat-button","","color","accent","trans","",3,"click"]],template:function(e,t){1&e&&(s.TgZ(0,"header"),s._UZ(1,"mat-icon",0),s.TgZ(2,"span",1),s._uU(3,"Filters"),s.qZA(),s.qZA(),s.TgZ(4,"form",2),s.NdJ("ngSubmit",function(){return t.close()}),s.YNc(5,to,1,0,"ng-container",3),s.qZA(),s.TgZ(6,"footer"),s.TgZ(7,"button",4),s.NdJ("click",function(){return t.close()}),s._uU(8,"Close"),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.Q6J("ngTemplateOutlet",t.data.filters))},directives:[P.Hw,Zt.P,a._Y,a.JL,a.F,i.tP,p.lW],styles:["[_nghost-%COMP%]{display:block;min-width:250px;margin:auto;background-color:var(--be-background);border-radius:4px;box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}header[_ngcontent-%COMP%]{border-bottom:1px solid var(--be-divider-default);padding:15px 20px;margin-bottom:20px;font-weight:500}header[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:5px}.body[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}footer[_ngcontent-%COMP%]{border-top:1px solid var(--be-divider-default);text-align:right;margin-top:10px;padding:10px 20px}"],data:{animation:[m.Nv.dialogContainer]},changeDetection:0}),e})();var io=n(84889),ao=n(7964);function so(e,t){1&e&&s._UZ(0,"mat-icon",3)}let oo=(()=>{class e{constructor(e){this.datatable=e,this.hideIcon=!1}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(cs.x))},e.\u0275cmp=s.Xpm({type:e,selectors:[["datatable-header-search-input"]],inputs:{placeholder:"placeholder",hideIcon:"hideIcon"},decls:4,vars:5,consts:[[1,"input-container","search-input-container"],["type","text",1,"search-input",3,"placeholder","formControl"],["svgIcon","search",4,"ngIf"],["svgIcon","search"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s._UZ(1,"input",1),s.ALo(2,"trans"),s.YNc(3,so,1,0,"mat-icon",2),s.qZA()),2&e&&(s.xp6(1),s.Q6J("placeholder",s.lcZ(2,3,t.placeholder))("formControl",t.datatable.searchControl),s.xp6(2),s.Q6J("ngIf",!t.hideIcon))},directives:[a.Fj,a.JJ,a.oH,i.O5,P.Hw],pipes:[lt.R],styles:[".input-container[_ngcontent-%COMP%]{min-width:250px;position:relative;flex-shrink:0}.input-container[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 12px);right:5px;color:var(--be-secondary-text)}.icon-left[_nghost-%COMP%]   .mat-icon[_ngcontent-%COMP%], .icon-left   [_nghost-%COMP%]   .mat-icon[_ngcontent-%COMP%]{left:10px;right:0}"],changeDetection:0}),e})(),ro=(()=>{class e extends i.rS{transform(e){return e?super.transform(e.replace("-"," ").replace("_"," ")):""}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275pipe=s.Yjl({name:"titleCase",type:e,pure:!0}),e})();const lo=["tableFilters"],co=["filterButton"];function uo(e,t){1&e&&s._UZ(0,"mat-progress-bar",7)}function po(e,t){1&e&&(s.TgZ(0,"div",8),s.Hsn(1),s.qZA())}const go=function(e,t){return{count:e,resource:t}};function ho(e,t){if(1&e&&(s.TgZ(0,"div",9),s._uU(1),s.ALo(2,"trans"),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.hij(" ",s.xi3(2,1,":count :resource selected",s.WLB(4,go,e.numberOfRowsSelected,e.pluralResourceName))," ")}}function mo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-chip",18),s.NdJ("removed",function(){const t=s.CHM(e).$implicit;return s.oxw(3).datatable.removeFilter(t.key)}),s._uU(1),s.ALo(2,"trans"),s.ALo(3,"titleCase"),s._UZ(4,"mat-icon",19),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(3);s.Q6J("removable",!0)("selectable",!1),s.xp6(1),s.AsE(" ",s.lcZ(2,4,s.lcZ(3,6,e.key)),": ",n.isModel(e.value)?e.value.name||e.value.display_name:e.value," ")}}function fo(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"mat-chip-list",13),s.YNc(2,mo,5,8,"mat-chip",14),s.ALo(3,"keyvalue"),s.ALo(4,"async"),s.qZA(),s.TgZ(5,"button",15,16),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).openFiltersPanel()}),s._UZ(7,"mat-icon",17),s.qZA(),s.BQk()}if(2&e){const e=s.oxw(2);s.xp6(2),s.Q6J("ngForOf",s.lcZ(3,3,s.lcZ(4,5,e.filters$))),s.xp6(3),s.ekj("active",e.filterPanelRef)}}function _o(e,t){if(1&e&&(s.TgZ(0,"div",10),s.YNc(1,fo,8,7,"ng-container",11),s._UZ(2,"datatable-header-search-input",12),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf",e.filterPanelTemplate),s.xp6(1),s.MGl("placeholder","Search ",e.pluralResourceName,"")}}function bo(e,t){1&e&&(s.TgZ(0,"div",20),s.Hsn(1,1),s.qZA())}const vo=[[["","leftContent",""]],[["","rightContent",""]]],Zo=["[leftContent]","[rightContent]"];let xo=(()=>{class e{constructor(e,t,n){this.datatable=e,this.cd=t,this.overlayPanel=n,this.showSelectedActions=!0,this.subscriptions=[],this.filters$=this.datatable.filters$.pipe((0,di.U)(e=>{const t=(0,io.N)(e);return delete t.query,t}))}ngOnInit(){const e=this.datatable.filters$.subscribe(()=>{this.filterPanelRef&&this.filterPanelRef.close()}),t=this.datatable.selectedRows$.subscribe(e=>{this.numberOfRowsSelected=e.length,this.cd.markForCheck()});this.subscriptions=[e,t]}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}openFiltersPanel(){if(this.filterPanelRef)this.filterPanelRef.close();else{const e=Ws.slice();e[0].offsetY=40,e[1].offsetY=40,this.filterPanelRef=this.overlayPanel.open(no,{origin:this.filterButton,position:e,mobilePosition:"center",data:{filters:this.filterPanelTemplate},maxWidth:"90%"}),this.filterButton.nativeElement.classList.add("active"),this.filterPanelRef.afterClosed().subscribe(()=>{this.filterPanelRef=null,this.filterButton.nativeElement.classList.remove("active")})}}isModel(e){return"object"==typeof e&&e.id}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(cs.x),s.Y36(s.sBO),s.Y36(ao.T))},e.\u0275cmp=s.Xpm({type:e,selectors:[["datatable-header"]],contentQueries:function(e,t,n){if(1&e&&s.Suo(n,lo,5),2&e){let e;s.iGM(e=s.CRH())&&(t.filterPanelTemplate=e.first)}},viewQuery:function(e,t){if(1&e&&s.Gf(co,5,s.SBq),2&e){let e;s.iGM(e=s.CRH())&&(t.filterButton=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&s.ekj("rows-selected",t.numberOfRowsSelected)},inputs:{pluralResourceName:"pluralResourceName",showSelectedActions:"showSelectedActions"},ngContentSelectors:Zo,decls:8,vars:7,consts:[["mode","indeterminate","color","accent",4,"ngIf"],[1,"left-column"],["class","default-left-content",4,"ngIf"],["class","selected-left-content capitalize",4,"ngIf"],[1,"right-column"],["class","default-right-content",4,"ngIf"],["class","selected-right-actions",4,"ngIf"],["mode","indeterminate","color","accent"],[1,"default-left-content"],[1,"selected-left-content","capitalize"],[1,"default-right-content"],[4,"ngIf"],[3,"placeholder"],["aria-label","Active Filters",1,"filter-chip-list"],[3,"removable","selectable","removed",4,"ngFor","ngForOf"],["mat-icon-button","",1,"filter-button",3,"click"],["filterButton",""],["svgIcon","filter-list"],[3,"removable","selectable","removed"],["matChipRemove","","svgIcon","cancel"],[1,"selected-right-actions"]],template:function(e,t){1&e&&(s.F$t(vo),s.YNc(0,uo,1,0,"mat-progress-bar",0),s.ALo(1,"async"),s.TgZ(2,"div",1),s.YNc(3,po,2,0,"div",2),s.YNc(4,ho,3,7,"div",3),s.qZA(),s.TgZ(5,"div",4),s.YNc(6,_o,3,2,"div",5),s.YNc(7,bo,2,0,"div",6),s.qZA()),2&e&&(s.Q6J("ngIf",s.lcZ(1,5,t.datatable.paginator&&t.datatable.paginator.loading$)),s.xp6(3),s.Q6J("ngIf",!t.showSelectedActions||!t.numberOfRowsSelected),s.xp6(1),s.Q6J("ngIf",t.showSelectedActions&&t.numberOfRowsSelected),s.xp6(2),s.Q6J("ngIf",!t.showSelectedActions||!t.numberOfRowsSelected),s.xp6(1),s.Q6J("ngIf",t.showSelectedActions&&t.numberOfRowsSelected))},directives:[i.O5,C.pW,oo,h.qn,i.sg,p.lW,P.Hw,h.HS,h.qH],pipes:[i.Ov,lt.R,i.Nd,ro],styles:[".rows-selected[_nghost-%COMP%], .rows-selected   [_nghost-%COMP%]{background-color:var(--be-accent-emphasis);color:var(--be-secondary-text);font-size:1.5rem;border-color:var(--be-divider-default)}[_nghost-%COMP%]{display:flex;align-items:center;height:85px;padding:15px;border-bottom:1px solid transparent;position:relative}.mat-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.left-column[_ngcontent-%COMP%]{margin-right:auto}.right-column[_ngcontent-%COMP%]{margin-left:25px}.default-right-content[_ngcontent-%COMP%]{display:flex;align-items:center}.filter-button[_ngcontent-%COMP%]{margin-right:10px}.active[_ngcontent-%COMP%]{color:var(--be-accent-default)}.mat-chip[_ngcontent-%COMP%]{text-transform:capitalize}  datatable-header info-popover{margin-left:10px}"],changeDetection:0}),e})();function yo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw().showCrupdateRoleModal()}),s._uU(1," New Role "),s.qZA()}}function Ao(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",22),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).selectRole(t)}),s.ALo(1,"async"),s._uU(2),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(2);s.ekj("selected",s.lcZ(1,3,n.selectedRole$).id===e.id),s.xp6(2),s.hij(" ",e.name," ")}}function wo(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"button",16),s.TgZ(2,"span",17),s._uU(3),s.ALo(4,"async"),s.qZA(),s._UZ(5,"mat-icon",18),s.qZA(),s.TgZ(6,"mat-menu",19,20),s.YNc(8,Ao,3,5,"button",21),s.ALo(9,"async"),s.qZA(),s.BQk()),2&e){const e=s.MAs(7),t=s.oxw();s.xp6(1),s.Q6J("matMenuTriggerFor",e),s.xp6(2),s.Oqu(s.lcZ(4,3,t.selectedRole$).name),s.xp6(5),s.Q6J("ngForOf",s.lcZ(9,5,t.roles$))}}function Co(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",32),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw(2).showCrupdateRoleModal(t)}),s._uU(1," Edit "),s.qZA()}}function To(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",32),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw(2).maybeDeleteRole(t)}),s._uU(1," Delete "),s.qZA()}}function qo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",25),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).selectRole(t)}),s.ALo(1,"async"),s.TgZ(2,"div",17),s.TgZ(3,"div"),s._uU(4),s.qZA(),s.TgZ(5,"div",26),s._uU(6),s.qZA(),s.qZA(),s.TgZ(7,"div",27),s.TgZ(8,"button",28),s.NdJ("click",function(e){return e.stopPropagation()}),s._UZ(9,"mat-icon",29),s.qZA(),s.TgZ(10,"mat-menu",null,30),s.YNc(12,Co,2,0,"div",31),s.YNc(13,To,2,0,"div",31),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.MAs(11),i=s.oxw(2);s.ekj("selected",s.lcZ(1,7,i.selectedRole$).id===e.id),s.xp6(4),s.Oqu(e.name),s.xp6(2),s.Oqu(e.type),s.xp6(2),s.Q6J("matMenuTriggerFor",n),s.xp6(4),s.Q6J("ngIf",i.currentUser.hasPermission("roles.update")),s.xp6(1),s.Q6J("ngIf",!e.internal&&i.currentUser.hasPermission("roles.delete"))}}function ko(e,t){if(1&e&&(s.TgZ(0,"aside",23),s.YNc(1,qo,14,9,"div",24),s.ALo(2,"async"),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngForOf",s.lcZ(2,1,e.roles$))}}function Mo(e,t){if(1&e){const e=s.EpF();s.ynx(0,33),s.TgZ(1,"button",34),s.NdJ("click",function(){return s.CHM(e),s.oxw().showAssignUsersModal()}),s._uU(2," Assign Users "),s.qZA(),s.TgZ(3,"button",35),s.NdJ("click",function(){return s.CHM(e),s.oxw().maybeDetachUsers()}),s.ALo(4,"async"),s._uU(5," Unassign Users "),s.qZA(),s.BQk()}if(2&e){const e=s.oxw();s.xp6(1),s.Q6J("disabled",!e.canAssignUsers()),s.xp6(2),s.Q6J("disabled",!s.lcZ(4,2,e.datatable.selectedRows$).length)}}function Io(e,t){if(1&e&&(s.TgZ(0,"tr"),s._UZ(1,"td",36),s.TgZ(2,"td",37),s._UZ(3,"user-column",38),s.qZA(),s.TgZ(4,"td",39),s._uU(5),s.qZA(),s.TgZ(6,"td",40),s._uU(7),s.qZA(),s.TgZ(8,"td",41),s._uU(9),s.ALo(10,"formattedDate"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Q6J("user",e),s.xp6(2),s.Oqu(e.first_name||"-"),s.xp6(2),s.Oqu(e.last_name||"-"),s.xp6(2),s.Oqu(s.lcZ(10,5,e.created_at))}}function Uo(e,t){1&e&&(s.TgZ(0,"no-results-message",44),s.TgZ(1,"span",45),s._uU(2,"This role can't be assigned to users."),s.qZA(),s.qZA())}function Oo(e,t){1&e&&(s.TgZ(0,"no-results-message",44),s.TgZ(1,"span",45),s._uU(2,"No users are assigned this role yet."),s.qZA(),s.qZA())}function Do(e,t){if(1&e&&(s.YNc(0,Oo,3,0,"no-results-message",46),s.ALo(1,"async"),s.ALo(2,"async")),2&e){const e=s.oxw(2);s.Q6J("ngIf",s.lcZ(1,1,e.datatable.paginator.noResults$)&&!s.lcZ(2,3,e.datatable.paginator.loading$))}}function Po(e,t){if(1&e&&(s.ynx(0),s.YNc(1,Uo,3,0,"no-results-message",42),s.YNc(2,Do,3,5,"ng-template",null,43,s.W1O),s.BQk()),2&e){const e=t.ngIf,n=s.MAs(3);s.xp6(1),s.Q6J("ngIf",e.guests||"sitewide"!==e.type)("ngIfElse",n)}}function So(e,t){1&e&&(s.TgZ(0,"no-results-message",44),s.TgZ(1,"span",45),s._uU(2,"No role selected."),s.qZA(),s.qZA())}let Jo=(()=>{class e{constructor(e,t,n,i,a,s){this.roleApi=e,this.toast=t,this.modal=n,this.currentUser=i,this.breakpoints=a,this.datatable=s,this.roles$=new c.X([]),this.users$=this.datatable.data$,this.selectedRole$=new c.X(new Js)}ngOnInit(){this.refreshRoles().then(()=>{var e;this.datatable.init({uri:Xi.Q.BASE_URI,staticParams:{role_id:null===(e=this.selectedRole$.value)||void 0===e?void 0:e.id}})})}selectRole(e){this.selectedRole$.value.id!==e.id&&(this.selectedRole$.next(e),this.refreshRoleUsers(e))}refreshRoles(){return new Promise(e=>{this.roleApi.getRoles().subscribe(t=>{if(this.roles$.next(t.pagination.data),this.roles$.value.length)if(this.selectedRole$.value.id){const e=this.roles$.value.find(e=>e.id===this.selectedRole$.value.id);e&&this.selectedRole$.next(e)}else this.selectRole(this.roles$.value[0]);e()})})}refreshRoleUsers(e){this.datatable.reset("sitewide"!==e.type||e.guests?{role_id:999}:{role_id:e.id})}showAssignUsersModal(){this.modal.open(Xs.y).afterClosed().subscribe(e=>{e&&this.roleApi.addUsers(this.selectedRole$.value.id,[e.id]).subscribe(()=>{this.toast.open("User assigned to role"),this.refreshRoleUsers(this.selectedRole$.value)})})}showCrupdateRoleModal(e){this.modal.show(Gs,{role:e}).afterClosed().subscribe(e=>{e&&this.refreshRoles()})}maybeDeleteRole(e){this.modal.open(Ns.z,{title:"Delete Role",body:"Are you sure you want to delete this role?",ok:"Delete"}).afterClosed().subscribe(t=>{t&&this.deleteRole(e)})}deleteRole(e){this.roleApi.delete(e.id).subscribe(()=>{this.selectedRole$.next(new Js),this.refreshRoles().then(()=>{this.refreshRoleUsers(this.selectedRole$.value)})})}maybeDetachUsers(){this.modal.show(Ns.z,{title:"Remove users from role",body:"Are you sure you want to remove selected users from this role?",ok:"Remove"}).afterClosed().subscribe(e=>{e&&this.removeUsersFromSelectedRole()})}removeUsersFromSelectedRole(){this.roleApi.removeUsers(this.selectedRole$.value.id,this.datatable.selectedRows$.value).subscribe(()=>{this.refreshRoleUsers(this.selectedRole$.value),this.datatable.selectedRows$.next([]),this.toast.open("Users removed from role.")})}canAssignUsers(){return this.selectedRole$.value.id&&!this.datatable.selectedRows$.value.length&&!this.selectedRole$.value.guests}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Za),s.Y36(ht.F),s.Y36(mt.u),s.Y36(Wi.I),s.Y36(At.S),s.Y36(cs.x))},e.\u0275cmp=s.Xpm({type:e,selectors:[["role-index"]],features:[s._Bn([cs.x])],decls:30,vars:14,consts:[[1,"admin-pill-nav"],[1,"new-role"],["mat-flat-button","","color","accent","class","new-role-button","trans","",3,"click",4,"ngIf"],[4,"ngIf","ngIfElse"],["desktopNav",""],[1,"datatable","responsive-table"],["pluralResourceName","roles",3,"showSelectedActions"],["leftContent","",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","email","trans",""],["table-sort-header","","trans",""],["table-sort-header","created_at","trans",""],[4,"ngFor","ngForOf"],["noRoleSelected",""],["mat-flat-button","","color","accent","trans","",1,"new-role-button",3,"click"],[1,"no-style","admin-pill-nav-mobile-selector",3,"matMenuTriggerFor"],["trans","",1,"name"],["svgIcon","keyboard-arrow-down"],[1,"admin-pill-nav-menu"],["navMenu","matMenu"],["mat-menu-item","",3,"selected","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[1,"admin-pill-nav","rounded"],["class","nav-item",3,"selected","click",4,"ngFor","ngForOf"],[1,"nav-item",3,"click"],[1,"role-type"],[1,"actions"],["mat-icon-button","",3,"matMenuTriggerFor","click"],["svgIcon","settings"],["actionsMenu",""],["mat-menu-item","","trans","",3,"click",4,"ngIf"],["mat-menu-item","","trans","",3,"click"],["leftContent",""],["mat-raised-button","","color","accent","trans","",1,"assign-users-button",3,"disabled","click"],["mat-raised-button","","color","accent","trans","",3,"disabled","click"],[3,"table-body-checkbox"],[1,"mobile-no-label"],[3,"user"],["data-label","First Name"],["data-label","Last Name"],["data-label","Assigned At"],["svgImage","people.svg",4,"ngIf","ngIfElse"],["regularRole",""],["svgImage","people.svg"],["primary-text","","trans",""],["svgImage","people.svg",4,"ngIf"]],template:function(e,t){if(1&e&&(s.TgZ(0,"section",0),s.TgZ(1,"div",1),s.YNc(2,yo,2,0,"button",2),s.qZA(),s.YNc(3,wo,10,7,"ng-container",3),s.ALo(4,"async"),s.YNc(5,ko,3,3,"ng-template",null,4,s.W1O),s.qZA(),s.TgZ(7,"div",5),s.TgZ(8,"datatable-header",6),s.YNc(9,Mo,6,4,"ng-container",7),s.qZA(),s.TgZ(10,"table",8),s.TgZ(11,"thead"),s.TgZ(12,"tr"),s._UZ(13,"th",9),s.TgZ(14,"th",10),s._uU(15,"User"),s.qZA(),s.TgZ(16,"th",11),s._uU(17,"First Name"),s.qZA(),s.TgZ(18,"th",11),s._uU(19,"Last Name"),s.qZA(),s.TgZ(20,"th",12),s._uU(21,"Assigned At"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(22,"tbody"),s.YNc(23,Io,11,7,"tr",13),s.ALo(24,"async"),s.qZA(),s.qZA(),s.YNc(25,Po,4,2,"ng-container",3),s.ALo(26,"async"),s.YNc(27,So,3,0,"ng-template",null,14,s.W1O),s._UZ(29,"datatable-footer"),s.qZA()),2&e){const e=s.MAs(6),n=s.MAs(28);s.xp6(2),s.Q6J("ngIf",t.currentUser.hasPermission("roles.create")),s.xp6(1),s.Q6J("ngIf",s.lcZ(4,8,t.breakpoints.isMobile$))("ngIfElse",e),s.xp6(5),s.Q6J("showSelectedActions",!1),s.xp6(1),s.Q6J("ngIf",t.currentUser.hasPermission("roles.update")),s.xp6(14),s.Q6J("ngForOf",s.lcZ(24,10,t.users$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(26,12,t.selectedRole$))("ngIfElse",n)}},directives:[i.O5,xo,bs,vs.p,Zt.P,i.sg,Zs.V,p.lW,w.p6,P.Hw,w.VK,w.OP,ys,As.r,ws.U],pipes:[i.Ov,mn.l],styles:["[_nghost-%COMP%]{display:block}@media screen and (min-width:768px){[_nghost-%COMP%]{display:flex}.new-role[_ngcontent-%COMP%]{border-bottom:1px solid var(--be-divider-default);margin-bottom:10px;padding-bottom:10px}}.datatable[_ngcontent-%COMP%]{flex:1 1 auto}.role-type[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--be-secondary-text)}@media screen and (max-width:768px){.admin-pill-nav[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;margin-bottom:20px}.admin-pill-nav-mobile-selector[_ngcontent-%COMP%]{margin-left:15px}.new-role-button[_ngcontent-%COMP%]{height:56px}}.assign-users-button[_ngcontent-%COMP%]{margin-right:5px}"],changeDetection:0}),e})();var No=n(69538);function Ro(e,t){1&e&&(s.TgZ(0,"span",6),s._uU(1,"Update Localization"),s.qZA())}function Qo(e,t){1&e&&(s.TgZ(0,"span",6),s._uU(1,"Create Localization"),s.qZA())}function Fo(e,t){if(1&e&&(s.TgZ(0,"div",18),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.name)}}function Eo(e,t){if(1&e&&(s.TgZ(0,"option",19),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.code),s.xp6(1),s.Oqu(e.name)}}function Yo(e,t){1&e&&(s.TgZ(0,"span",6),s._uU(1,"Update"),s.qZA())}function Lo(e,t){1&e&&(s.TgZ(0,"span",6),s._uU(1,"Create"),s.qZA())}function $o(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",7),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw().confirm()}),s.TgZ(1,"mat-dialog-content",8),s.TgZ(2,"div",9),s.TgZ(3,"label",10),s._uU(4,"Name"),s.qZA(),s._UZ(5,"input",11),s.YNc(6,Fo,2,1,"div",12),s.qZA(),s.TgZ(7,"div",9),s.TgZ(8,"label",13),s._uU(9,"Language"),s.qZA(),s.TgZ(10,"select",14),s.YNc(11,Eo,2,2,"option",15),s.ALo(12,"async"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(13,"mat-dialog-actions"),s.TgZ(14,"button",16),s.NdJ("click",function(){return s.CHM(e),s.oxw().close()}),s._uU(15,"Cancel"),s.qZA(),s.TgZ(16,"button",17),s.ALo(17,"async"),s.YNc(18,Yo,2,0,"span",2),s.YNc(19,Lo,2,0,"span",2),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.Q6J("formGroup",n.form),s.xp6(6),s.Q6J("ngIf",e.name),s.xp6(5),s.Q6J("ngForOf",s.lcZ(12,6,n.languages$)),s.xp6(5),s.Q6J("disabled",s.lcZ(17,8,n.loading$)),s.xp6(2),s.Q6J("ngIf",n.data.localization),s.xp6(1),s.Q6J("ngIf",!n.data.localization)}}let Vo=(()=>{class e{constructor(e,t,n,i,a,s){this.fb=e,this.localizations=t,this.dialogRef=n,this.data=i,this.toast=a,this.lists=s,this.loading$=new c.X(!1),this.errors$=new c.X({}),this.languages$=new c.X([]),this.form=this.fb.group({name:[""],language:[""]})}ngOnInit(){this.lists.get(["languages"]).subscribe(e=>{this.languages$.next(e.languages)}),this.data.localization&&this.form.patchValue(this.data.localization.model)}confirm(){this.loading$.next(!0),(this.data.localization?this.updateLocalization():this.createNewLocalization()).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(e=>{this.close(e.localization),this.toast.open("Localization "+(this.data.localization?"updated":"created"))},e=>this.errors$.next(e.errors))}close(e){this.dialogRef.close(e)}createNewLocalization(){return this.localizations.create(this.form.value)}updateLocalization(){return this.localizations.update(this.data.localization.model.id,this.form.value)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(a.qu),s.Y36(No.v),s.Y36(m.so),s.Y36(m.WI),s.Y36(ht.F),s.Y36(_t.l))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-localization-modal"]],decls:8,vars:5,consts:[[1,"modal-header"],["mat-dialog-title",""],["trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["class","modal-content","ngNativeValidate","",3,"formGroup","ngSubmit",4,"ngIf"],["trans",""],["ngNativeValidate","",1,"modal-content",3,"formGroup","ngSubmit"],[1,"many-inputs"],[1,"input-container"],["for","name","trans",""],["type","text","formControlName","name","id","name","pattern","[A-Za-z0-9_-]+","required",""],["class","error",4,"ngIf"],["for","language","trans",""],["id","language","formControlName","language"],["trans","",3,"value",4,"ngFor","ngForOf"],["mat-button","","type","button","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled"],[1,"error"],["trans","",3,"value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s.YNc(2,Ro,2,0,"span",2),s.YNc(3,Qo,2,0,"span",2),s.qZA(),s.TgZ(4,"button",3),s.NdJ("click",function(){return t.close()}),s._UZ(5,"mat-icon",4),s.qZA(),s.qZA(),s.YNc(6,$o,20,10,"form",5),s.ALo(7,"async")),2&e&&(s.xp6(2),s.Q6J("ngIf",t.data.localization),s.xp6(1),s.Q6J("ngIf",!t.data.localization),s.xp6(3),s.Q6J("ngIf",s.lcZ(7,3,t.errors$)))},directives:[m.uh,i.O5,P.Hw,Zt.P,a.JL,a.sg,m.xY,a.Fj,a.JJ,a.u,a.c5,a.Q7,a.EJ,i.sg,m.H8,p.lW,a.YN,a.Kr],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}"],changeDetection:0}),e})();var Ho=n(87519);let zo=(()=>{class e{constructor(e){this.dialogRef=e,this.form=new a.cw({key:new a.NI,value:new a.NI})}confirm(){this.close(this.form.value)}close(e){this.dialogRef.close(e)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so))},e.\u0275cmp=s.Xpm({type:e,selectors:[["new-line-modal"]],decls:24,vars:1,consts:[[1,"modal-header"],["mat-dialog-title","","trans","",1,"mat-dialog-title"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",1,"modal-content",3,"formGroup","ngSubmit"],[1,"many-inputs"],[1,"input-container"],["for","translation-key","trans",""],["type","text","formControlName","key","name","translation-key","id","translation-key","required",""],["trans",""],["for","translation-value","trans",""],["type","text","formControlName","value","name","translation-value","id","translation-value","required",""],["mat-button","","type","button","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s._uU(2,"Add New Translation Line"),s.qZA(),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.TgZ(5,"form",4),s.NdJ("ngSubmit",function(){return t.confirm()}),s.TgZ(6,"mat-dialog-content",5),s.TgZ(7,"div",6),s.TgZ(8,"label",7),s._uU(9,"Translation Key"),s.qZA(),s._UZ(10,"input",8),s.TgZ(11,"p",9),s._uU(12,"Word or sentence you want to translate."),s.qZA(),s.qZA(),s.TgZ(13,"div",6),s.TgZ(14,"label",10),s._uU(15,"Translation Value"),s.qZA(),s._UZ(16,"input",11),s.TgZ(17,"p",9),s._uU(18,"What word or sentence should be translated to."),s.qZA(),s.qZA(),s.qZA(),s.TgZ(19,"mat-dialog-actions"),s.TgZ(20,"button",12),s.NdJ("click",function(){return t.close()}),s._uU(21,"Cancel"),s.qZA(),s.TgZ(22,"button",13),s._uU(23,"Add"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.Q6J("formGroup",t.form))},directives:[m.uh,Zt.P,P.Hw,a.JL,a.sg,m.xY,a.Fj,a.JJ,a.u,a.Q7,m.H8,p.lW],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}"],changeDetection:0}),e})();var Bo=n(83326),jo=n(19244),Go=n(64833);function Xo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",18),s.NdJ("click",function(){return s.CHM(e),s.oxw().showCrupdateLocalizationModal()}),s._UZ(1,"mat-icon",19),s.TgZ(2,"span",15),s._uU(3,"New Localization"),s.qZA(),s.qZA()}}function Wo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",26),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).setSelectedLocalization(t)}),s._uU(1),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(2);s.ekj("selected",(null==n.selectedLocalization?null:n.selectedLocalization.model.id)==e.model.id),s.xp6(1),s.Oqu(e.model.name)}}function Ko(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"button",20),s.TgZ(2,"span",21),s._uU(3),s.qZA(),s._UZ(4,"mat-icon",22),s.qZA(),s.TgZ(5,"mat-menu",23,24),s.YNc(7,Wo,2,3,"button",25),s.ALo(8,"async"),s.qZA(),s.BQk()),2&e){const e=s.MAs(6),t=s.oxw();s.xp6(1),s.Q6J("matMenuTriggerFor",e),s.xp6(2),s.Oqu(null==t.selectedLocalization?null:t.selectedLocalization.model.name),s.xp6(4),s.Q6J("ngForOf",s.lcZ(8,3,t.localizations$))}}function er(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",35),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw(2).setDefaultLocalization(t)}),s._uU(1,"Set as Default"),s.qZA()}}function tr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",35),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw(2).showCrupdateLocalizationModal(t)}),s._uU(1,"Update"),s.qZA()}}function nr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",35),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw(2).confirmLocalizationDeletion(t)}),s._uU(1,"Delete"),s.qZA()}}function ir(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",28),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).setSelectedLocalization(t)}),s.TgZ(1,"div",29),s._uU(2),s.qZA(),s.TgZ(3,"div",30),s.TgZ(4,"button",31),s.NdJ("click",function(e){return e.stopPropagation()}),s._UZ(5,"mat-icon",32),s.qZA(),s.TgZ(6,"mat-menu",null,33),s.YNc(8,er,2,0,"div",34),s.YNc(9,tr,2,0,"div",34),s.YNc(10,nr,2,0,"div",34),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.MAs(7),i=s.oxw(2);s.ekj("selected",(null==i.selectedLocalization?null:i.selectedLocalization.model.id)==e.model.id),s.Q6J("@fadeIn",void 0),s.xp6(2),s.Oqu(e.model.name.replace("-"," ")),s.xp6(2),s.Q6J("matMenuTriggerFor",n),s.xp6(4),s.Q6J("ngIf",i.currentUser.hasPermission("settings.update")),s.xp6(1),s.Q6J("ngIf","English"!==e.name&&i.currentUser.hasPermission("localizations.update")),s.xp6(1),s.Q6J("ngIf","English"!==e.name&&i.currentUser.hasPermission("localizations.delete"))}}function ar(e,t){1&e&&(s.TgZ(0,"div",37),s._UZ(1,"skeleton",38),s.qZA())}const sr=function(){return[1,2,3,4,5]};function or(e,t){1&e&&(s.TgZ(0,"div"),s.YNc(1,ar,2,0,"div",36),s.qZA()),2&e&&(s.xp6(1),s.Q6J("ngForOf",s.DdM(1,sr)))}function rr(e,t){if(1&e&&(s.YNc(0,ir,11,8,"div",27),s.ALo(1,"async"),s.YNc(2,or,2,2,"div",16),s.ALo(3,"async")),2&e){const e=s.oxw();s.Q6J("ngForOf",s.lcZ(1,3,e.localizations$))("ngForTrackBy",e.trackByFn),s.xp6(2),s.Q6J("ngIf",s.lcZ(3,5,!e.selectedLocalization&&e.loading$))}}function lr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",39),s.NdJ("click",function(){return s.CHM(e),s.oxw().updateLocalization()}),s.ALo(1,"async"),s._uU(2,"Update"),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("disabled",s.lcZ(1,1,e.loading$))}}function cr(e,t){1&e&&(s.TgZ(0,"tr"),s.TgZ(1,"td"),s._UZ(2,"skeleton",40),s.qZA(),s.TgZ(3,"td"),s._UZ(4,"skeleton",40),s.qZA(),s.qZA())}const dr=function(){return[1,2,3,4,5,6,7,8,9,10]};function ur(e,t){1&e&&(s.ynx(0),s.YNc(1,cr,5,0,"tr",17),s.BQk()),2&e&&(s.xp6(1),s.Q6J("ngForOf",s.DdM(1,dr)))}function pr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"tr"),s.TgZ(1,"td",41),s._uU(2),s.qZA(),s.TgZ(3,"td",42),s.TgZ(4,"input",43),s.NdJ("ngModelChange",function(t){const n=s.CHM(e).$implicit;return s.oxw().selectedLocalization.lines[n.key]=t}),s.qZA(),s.qZA(),s.TgZ(5,"td",44),s.TgZ(6,"button",45),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().removeLine(t)}),s.ALo(7,"trans"),s._UZ(8,"mat-icon",46),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.Q6J("@fadeIn",void 0),s.xp6(2),s.Oqu(e.key),s.xp6(2),s.s9C("id",e.key),s.Q6J("ngModel",n.selectedLocalization.lines[e.key]),s.xp6(2),s.Q6J("matTooltip",s.lcZ(7,5,"Remove"))}}let gr=(()=>{class e{constructor(e,t,n,i,s,o,r,l){this.toast=e,this.modal=t,this.settings=n,this.i18n=i,this.route=s,this.currentUser=o,this.localizationsApi=r,this.breakpoints=l,this.loading$=new c.X(!1),this.loadingLines$=new c.X(!1),this.searchQuery=new a.NI,this.localizations$=new c.X([]),this.lines$=new c.X([]),this.trackByFn=(e,t)=>t.model.id}ngOnInit(){this.loading$.next(!0),this.localizationsApi.all().pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(e=>{this.setLocalizations(e.localizations),this.bindSearchQuery()})}setLocalizations(e){this.localizations$.next(e);const t=e.find(e=>e.model.language===this.settings.get("i18n.default_localization"))||e[0];t&&this.setSelectedLocalization(t)}setSelectedLocalization(e){var t;(null===(t=this.selectedLocalization)||void 0===t?void 0:t.model.id)!==e.model.id&&(this.selectedLocalization=e,this.searchQuery.setValue(null),e.lines?this.lines$.next(this.originalLines()):(this.selectedLocalization.lines={},this.loadingLines$.next(!0),this.localizationsApi.get(this.selectedLocalization.model.name).pipe((0,pt.x)(()=>this.loadingLines$.next(!1))).subscribe(t=>{this.selectedLocalization=t.localization;const n=[...this.localizations$.value],i=n.findIndex(t=>t.model.id===e.model.id);n[i]=t.localization,this.localizations$.next(n),this.lines$.next(this.originalLines())})))}addLine(){this.modal.open(zo).beforeClosed().subscribe(e=>{e&&(this.selectedLocalization.lines[e.key]=e.value,this.lines$.next(this.originalLines()))})}setDefaultLocalization(e){this.selectedLocalization.model.id||this.setSelectedLocalization(e),this.localizationsApi.setDefault(e.model).subscribe(()=>{this.toast.open("Default Localization Changed")},()=>{this.toast.open(Gi.v.Default)})}updateLocalization(){this.loading$.next(!0),this.localizationsApi.update(this.selectedLocalization.model.id,this.selectedLocalization).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(()=>{this.toast.open("Localizations updated"),this.i18n.isActive(this.selectedLocalization.model)&&this.i18n.setLocalization(this.selectedLocalization)})}showCrupdateLocalizationModal(e){this.modal.show(Vo,{localization:e}).afterClosed().subscribe(t=>{if(!t)return;let n=[...this.localizations$.value];e?n=n.map(e=>e.model.id===t.model.id?t:e):(n.push(t),this.setSelectedLocalization(t)),this.localizations$.next(n)})}confirmLocalizationDeletion(e){this.localizations$.value.length<2?this.toast.open("There must be at least one localization."):this.modal.open(Ns.z,{title:"Delete Localization",body:"Are you sure you want to delete this localization?",ok:"Delete"}).afterClosed().subscribe(t=>{t&&this.deleteLocalization(e)})}deleteLocalization(e){this.localizationsApi.delete(e.model.id).subscribe(()=>{this.toast.open("Localization deleted");const t=[...this.localizations$.value];t.splice(t.indexOf(e),1),this.localizations$.next(t),this.selectedLocalization.model.id===e.model.id&&this.setSelectedLocalization(t[0])})}bindSearchQuery(){this.searchQuery.valueChanges.pipe((0,Ho.x)()).subscribe(e=>{const t=this.originalLines();this.lines$.next(e?t.filter(t=>this.filterPredicate(t,e)):t)})}filterPredicate(e,t){const n=Object.keys(e).reduce((t,n)=>t+e[n]+"\u25ec","").toLowerCase(),i=t.trim().toLowerCase();return-1!=n.indexOf(i)}linesToArray(e){const t=[];for(const n in e)t.push({key:n,translation:e[n]});return t}originalLines(){return this.selectedLocalization.lines?this.linesToArray(this.selectedLocalization.lines):[]}removeLine(e){delete this.selectedLocalization.lines[e.key],this.lines$.next(this.originalLines())}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(ht.F),s.Y36(mt.u),s.Y36(st.Z),s.Y36(jo.Z),s.Y36(r.gz),s.Y36(Wi.I),s.Y36(No.v),s.Y36(At.S))},e.\u0275cmp=s.Xpm({type:e,selectors:[["localization-index"]],decls:29,vars:13,consts:[[1,"admin-pill-nav"],[1,"new-localization"],["mat-button","",3,"click",4,"ngIf"],[4,"ngIf","ngIfElse"],["desktopNav",""],[1,"update-translations"],["mat-raised-button","","color","accent","trans","",3,"disabled","click",4,"ngIf"],[1,"datatable","responsive-table"],[1,"datatable-header","localizations-datatable-header"],["mat-raised-button","","color","accent","trans","",1,"new-translation-button",3,"click"],[1,"input-container","search-input-container"],["type","text","placeholder","Search Translations","trans-placeholder","",1,"search",3,"formControl"],["svgIcon","search"],[1,"material-table"],["trans","",1,"source-column"],["trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["mat-button","",3,"click"],["svgIcon","add"],[1,"no-style","admin-pill-nav-mobile-selector",3,"matMenuTriggerFor"],["trans","",1,"name"],["svgIcon","keyboard-arrow-down"],[1,"admin-pill-nav-menu"],["navMenu","matMenu"],["mat-menu-item","",3,"selected","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["class","nav-item",3,"selected","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"nav-item",3,"click"],[1,"name"],[1,"actions"],["mat-icon-button","",3,"matMenuTriggerFor","click"],["svgIcon","settings",1,"size-22"],["actionsMenu",""],["mat-menu-item","","trans","",3,"click",4,"ngIf"],["mat-menu-item","","trans","",3,"click"],["class","nav-item skeleton-nav-item",4,"ngFor","ngForOf"],[1,"nav-item","skeleton-nav-item"],["variant","text"],["mat-raised-button","","color","accent","trans","",3,"disabled","click"],["variant","text",1,"table-skeleton"],[1,"mobile-no-label","source-column"],[1,"mobile-no-label"],["type","text",1,"translation-input",3,"id","ngModel","ngModelChange"],[1,"edit-column"],["type","button","mat-icon-button","",3,"matTooltip","click"],["svgIcon","close"]],template:function(e,t){if(1&e&&(s.TgZ(0,"aside",0),s.TgZ(1,"div",1),s.YNc(2,Xo,4,0,"button",2),s.qZA(),s.YNc(3,Ko,9,5,"ng-container",3),s.ALo(4,"async"),s.YNc(5,rr,4,7,"ng-template",null,4,s.W1O),s.TgZ(7,"div",5),s.YNc(8,lr,3,3,"button",6),s.qZA(),s.qZA(),s.TgZ(9,"div",7),s.TgZ(10,"div",8),s.TgZ(11,"button",9),s.NdJ("click",function(){return t.addLine()}),s._uU(12,"Add New Translation"),s.qZA(),s.TgZ(13,"div",10),s._UZ(14,"input",11),s._UZ(15,"mat-icon",12),s.qZA(),s.qZA(),s.TgZ(16,"table",13),s.TgZ(17,"thead"),s.TgZ(18,"tr"),s.TgZ(19,"th",14),s._uU(20,"Source Text"),s.qZA(),s.TgZ(21,"th",15),s._uU(22,"Translation"),s.qZA(),s._UZ(23,"th"),s.qZA(),s.qZA(),s.TgZ(24,"tbody"),s.YNc(25,ur,2,2,"ng-container",16),s.ALo(26,"async"),s.YNc(27,pr,9,7,"tr",17),s.ALo(28,"async"),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.MAs(6);s.xp6(2),s.Q6J("ngIf",t.currentUser.hasPermission("localizations.create")),s.xp6(1),s.Q6J("ngIf",s.lcZ(4,7,t.breakpoints.isMobile$))("ngIfElse",e),s.xp6(5),s.Q6J("ngIf",t.currentUser.hasPermission("localizations.update")),s.xp6(6),s.Q6J("formControl",t.searchQuery),s.xp6(11),s.Q6J("ngIf",s.lcZ(26,9,t.loadingLines$)),s.xp6(2),s.Q6J("ngForOf",s.lcZ(28,11,t.lines$))}},directives:[i.O5,p.lW,Zt.P,a.Fj,a.JJ,a.oH,P.Hw,i.sg,w.p6,w.VK,w.OP,Go._,a.On,k.gM],pipes:[i.Ov,lt.R],styles:["[_nghost-%COMP%]{display:flex}  .localizations-datatable-header{display:flex;align-items:center;height:85px;padding:15px;border-bottom:1px solid transparent;position:relative}.search-input-container[_ngcontent-%COMP%]{margin-left:auto;max-width:300px;position:relative}.search-input-container[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px}.search-input-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{margin-left:1px}.datatable[_ngcontent-%COMP%]{flex:1 1 auto}.datatable[_ngcontent-%COMP%]   .translation-input[_ngcontent-%COMP%]{position:relative;z-index:1;min-height:40px;border:none;background-color:transparent;padding:0 10px;margin-left:1px;color:inherit;width:98%}.datatable[_ngcontent-%COMP%]   .translation-input[_ngcontent-%COMP%]:focus, .datatable[_ngcontent-%COMP%]   .translation-input[_ngcontent-%COMP%]:hover{outline:var(--be-accent-default) auto 1px}.datatable[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(.edit-column){width:50%}.table-skeleton[_ngcontent-%COMP%]{vertical-align:middle;max-width:99%}.skeleton-nav-item[_ngcontent-%COMP%]{pointer-events:none}@media screen and (min-width:768px){.update-translations[_ngcontent-%COMP%]{margin-top:10px;padding-top:10px;border-top:1px solid var(--be-divider-default)}.new-localization[_ngcontent-%COMP%]{border-bottom:1px solid var(--be-divider-default);margin-bottom:10px;padding-bottom:10px}}@media screen and (max-width:768px){[_nghost-%COMP%]{display:block}.admin-pill-nav[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;width:100%;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--be-divider-lighter);position:relative}.source-column[_ngcontent-%COMP%]{margin-left:10px}.new-localization[_ngcontent-%COMP%]{margin-bottom:5px}.update-translations[_ngcontent-%COMP%]{position:absolute;top:-5px;right:0}.datatable[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:auto!important}}"],data:{animation:Bo.B},changeDetection:0}),e})();var hr=n(79893),mr=n(52644);function fr(e,t){1&e&&s._UZ(0,"mat-progress-bar",15)}function _r(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",20),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).maybeDeleteSelectedEntries()}),s._uU(1," Delete "),s.qZA()}}const br=function(e){return{count:e,resource:"file(s)"}};function vr(e,t){if(1&e&&(s.TgZ(0,"tr"),s.TgZ(1,"th",16),s.TgZ(2,"div",17),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",18),s.YNc(5,_r,2,0,"button",19),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.ngIf,n=s.oxw();s.xp6(2),s.Q6J("transValues",s.VKq(2,br,e)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("files.delete"))}}function Zr(e,t){if(1&e&&(s.TgZ(0,"tr"),s._UZ(1,"td",21),s.TgZ(2,"td",22),s._uU(3),s.qZA(),s.TgZ(4,"td",23),s._uU(5),s.qZA(),s.TgZ(6,"td"),s._UZ(7,"user-column",24),s.qZA(),s.TgZ(8,"td",25),s._uU(9),s.qZA(),s.TgZ(10,"td",26),s._uU(11),s.qZA(),s.TgZ(12,"td",27),s._uU(13),s.ALo(14,"formattedFileSize"),s.qZA(),s.TgZ(15,"td"),s._uU(16),s.ALo(17,"formattedDate"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Oqu(e.name),s.xp6(2),s.Oqu(e.file_name),s.xp6(2),s.Q6J("user",e.users[0]),s.xp6(2),s.Oqu(e.type),s.xp6(2),s.Oqu(e.public?"Yes":"No"),s.xp6(2),s.hij(" ",e.file_size?s.lcZ(14,8,e.file_size):"-"," "),s.xp6(3),s.Oqu(s.lcZ(17,10,e.created_at))}}function xr(e,t){1&e&&(s.TgZ(0,"no-results-message",28),s.TgZ(1,"span",29),s._uU(2,"No files have been created yet"),s.qZA(),s.qZA())}let yr=(()=>{class e{constructor(e,t,n,i){this.currentUser=e,this.settings=t,this.uploads=n,this.datatable=i,this.files$=this.datatable.data$,this.filters=hr.b}ngOnInit(){this.datatable.init({uri:sa.f.BASE_URI})}maybeDeleteSelectedEntries(){this.datatable.confirmResourceDeletion("files").subscribe(()=>{this.uploads.delete({entryIds:this.datatable.selectedRows$.value,deleteForever:!0}).subscribe(()=>{this.datatable.reset()})})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Wi.I),s.Y36(st.Z),s.Y36(sa.f),s.Y36(cs.x))},e.\u0275cmp=s.Xpm({type:e,selectors:[["file-entry-index"]],features:[s._Bn([cs.x])],decls:34,vars:11,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","files",3,"filters"],[1,"action-buttons"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans",""],["table-sort-header","created_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","file-searching.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["colspan","9"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["mat-raised-button","","color","warn","trans","",3,"click",4,"ngIf"],["mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Name"],["data-label","File Name"],[3,"user"],["data-label","Type"],["data-label","Public"],["data-label","File Size"],["svgImage","file-searching.svg"],["primary-text","","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s._uU(2,"Uploaded Files"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"datatable-filters",3),s._UZ(5,"div",4),s.qZA(),s.qZA(),s.TgZ(6,"div",5),s.YNc(7,fr,1,0,"mat-progress-bar",6),s.ALo(8,"async"),s.TgZ(9,"table",7),s.TgZ(10,"thead"),s.TgZ(11,"tr"),s._UZ(12,"th",8),s.TgZ(13,"th",9),s._uU(14,"Name"),s.qZA(),s.TgZ(15,"th",9),s._uU(16,"File Name"),s.qZA(),s.TgZ(17,"th",10),s._uU(18,"Owner"),s.qZA(),s.TgZ(19,"th",9),s._uU(20,"Type"),s.qZA(),s.TgZ(21,"th",9),s._uU(22,"Public"),s.qZA(),s.TgZ(23,"th",9),s._uU(24,"File Size"),s.qZA(),s.TgZ(25,"th",11),s._uU(26,"Uploaded At"),s.qZA(),s.qZA(),s.YNc(27,vr,6,4,"tr",12),s.qZA(),s.TgZ(28,"tbody"),s.YNc(29,Zr,18,12,"tr",13),s.ALo(30,"async"),s.qZA(),s.qZA(),s.YNc(31,xr,3,0,"no-results-message",14),s.ALo(32,"async"),s._UZ(33,"datatable-footer"),s.qZA()),2&e&&(s.xp6(4),s.Q6J("filters",t.filters),s.xp6(3),s.Q6J("ngIf",s.lcZ(8,5,t.datatable.paginator&&t.datatable.paginator.loading$)),s.xp6(20),s.Q6J("ngIf",t.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(30,7,t.files$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(32,9,t.datatable.paginator.noResults$)))},directives:[Zt.P,fs.h,i.O5,bs,vs.p,i.sg,Zs.V,C.pW,p.lW,ys,As.r,ws.U],pipes:[i.Ov,mr.y,mn.l],styles:[".title[_ngcontent-%COMP%]{font-size:1.8rem;color:var(--be-secondary-text);margin-left:15px}"],changeDetection:0}),e})(),Ar=(()=>{class e{constructor(e,t){this.data=e,this.overlayPanelRef=t}close(){this.overlayPanelRef.close()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Ks.p,8),s.Y36(eo.L))},e.\u0275cmp=s.Xpm({type:e,selectors:[["image-zoom-overlay"]],hostVars:1,hostBindings:function(e,t){2&e&&s.d8E("@dialogContainer","enter")},decls:3,vars:2,consts:[[3,"src","alt"],["mat-mini-fab","","color","accent",1,"close-button",3,"click"],["svgIcon","close"]],template:function(e,t){1&e&&(s._UZ(0,"img",0),s.TgZ(1,"button",1),s.NdJ("click",function(){return t.close()}),s._UZ(2,"mat-icon",2),s.qZA()),2&e&&s.Q6J("src",t.data.src,s.LSH)("alt",t.data.alt)},directives:[p.lW,P.Hw],styles:[".image-zoom-overlay-container{margin:auto;top:0;left:0;right:0;bottom:0;max-width:calc(100% - 65px);max-height:calc(100% - 65px)}image-zoom-overlay{display:block;width:100%;height:100%;position:relative;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}image-zoom-overlay img{max-height:100%;max-width:100%;border-radius:4px;overflow:hidden;-o-object-fit:cover;object-fit:cover}image-zoom-overlay .close-button{position:absolute;top:-15px;right:-15px}"],encapsulation:2,data:{animation:[m.Nv.dialogContainer]},changeDetection:0}),e})(),wr=(()=>{class e{constructor(e){this.overlay=e}zoomImage(){this.overlay.open(Ar,{position:"center",origin:"global",data:{src:this.src,alt:this.alt},panelClass:"image-zoom-overlay-container"})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(ao.T))},e.\u0275cmp=s.Xpm({type:e,selectors:[["image-zoom"]],inputs:{src:"src",alt:"alt"},decls:1,vars:2,consts:[[3,"src","alt","click"]],template:function(e,t){1&e&&(s.TgZ(0,"img",0),s.NdJ("click",function(){return t.zoomImage()}),s.qZA()),2&e&&s.Q6J("src",t.src,s.LSH)("alt",t.alt)},styles:["[_nghost-%COMP%]{display:inline-block;border-radius:4px;overflow:hidden;cursor:zoom-in}img[_ngcontent-%COMP%]{max-width:100%;max-height:100%;width:auto;-o-object-fit:cover;object-fit:cover}"],changeDetection:0}),e})();function Cr(e,t){if(1&e&&(s.TgZ(0,"div",8),s.TgZ(1,"div",9),s.TgZ(2,"label",10),s._uU(3),s.qZA(),s._UZ(4,"textarea",11),s.qZA(),s._UZ(5,"image-zoom",12),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(2),s.Q6J("for",e.slot),s.xp6(1),s.Oqu(e.description),s.xp6(1),s.Q6J("name",e.slot)("id",e.slot)("formControlName",e.slot),s.xp6(1),s.Q6J("src",n.getPreviewUrl(e))}}function Tr(e,t){1&e&&s._UZ(0,"mat-progress-bar",13)}let qr=(()=>{class e{constructor(e,t,n){this.settings=e,this.toast=t,this.fb=n,this.loading$=new c.X(!1),this.form=this.fb.group({"ads.disable":[!1]})}ngOnInit(){this.hydrate()}saveAds(){this.loading$.next(!0),this.settings.save({client:this.form.value}).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(()=>{this.toast.open("Ads updated")},()=>{this.toast.open(Gi.v.Default)})}allAds(){return this.settings.get("vebto.admin.ads",[])}getPreviewUrl(e){return`client/assets/images/verts/${e.slot.replace(/\./g,"-").replace("ads-","")}.png`}hydrate(){const e=this.settings.getFlat()||{};this.form.patchValue({"ads.disable":e["ads.disable"]}),this.allAds().forEach(t=>{this.form.addControl(t.slot,this.fb.control(e[t.slot]))})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z),s.Y36(ht.F),s.Y36(a.qu))},e.\u0275cmp=s.Xpm({type:e,selectors:[["ads-page"]],decls:14,vars:8,consts:[["ngNativeValidate","",1,"panel",3,"formGroup","ngSubmit"],["trans","",1,"header"],["class","vert-row",4,"ngFor","ngForOf"],[1,"setting-toggle-container","margin-top","margin-bottom"],["name","ads.disable","id","ads.disable","formControlName","ads.disable","trans",""],["trans",""],["type","submit","mat-raised-button","","color","accent","trans","",1,"save-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"vert-row"],[1,"input-container"],["trans","",3,"for"],[3,"name","id","formControlName"],[3,"src"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"form",0),s.NdJ("ngSubmit",function(){return t.saveAds()}),s.TgZ(1,"div",1),s._uU(2,"Predefined AD Slots"),s.qZA(),s.YNc(3,Cr,6,6,"div",2),s.TgZ(4,"div",3),s.TgZ(5,"mat-slide-toggle",4),s._uU(6,"Disable Ads"),s.qZA(),s.TgZ(7,"p",5),s._uU(8,"Disable all ad related functionality."),s.qZA(),s.qZA(),s.TgZ(9,"button",6),s.ALo(10,"async"),s._uU(11,"Save"),s.qZA(),s.YNc(12,Tr,1,0,"mat-progress-bar",7),s.ALo(13,"async"),s.qZA()),2&e&&(s.Q6J("formGroup",t.form),s.xp6(3),s.Q6J("ngForOf",t.allAds()),s.xp6(6),s.Q6J("disabled",s.lcZ(10,4,t.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(13,6,t.loading$)))},directives:[a.JL,a.sg,Zt.P,i.sg,T.Rr,a.JJ,a.u,p.lW,i.O5,a.Fj,wr,C.pW],pipes:[i.Ov],styles:[".panel[_ngcontent-%COMP%]{border:1px solid var(--be-divider-default);box-shadow:none;border-radius:4px;background-color:var(--be-background)}.header[_ngcontent-%COMP%]{background-color:var(--be-background-alternative);border-bottom:1px solid var(--be-divider-lighter);padding:15px;font-weight:500;color:#555}.header[_ngcontent-%COMP%], .vert-row[_ngcontent-%COMP%]{margin-bottom:25px}.vert-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;padding-left:25px;padding-right:25px}image-zoom[_ngcontent-%COMP%]{margin-left:25px;border:1px solid var(--be-divider-default);height:150px}.input-container[_ngcontent-%COMP%]{max-width:750px}textarea[_ngcontent-%COMP%]{display:block;height:150px}label[_ngcontent-%COMP%]:empty{display:none}.setting-toggle-container[_ngcontent-%COMP%]{margin-left:15px}.save-button[_ngcontent-%COMP%]{margin:0 0 30px 15px}@media only screen and (max-width:768px){.vert-row[_ngcontent-%COMP%]{display:block;border-bottom:1px solid var(--be-divider-lighter);margin-bottom:30px;padding-bottom:25px}image-zoom[_ngcontent-%COMP%]{margin-left:0;margin-top:15px}}"],changeDetection:0}),e})();var kr=n(24284);function Mr(e,t){1&e&&(s.TgZ(0,"h2",6),s._uU(1,"Update Plan Details"),s.qZA())}function Ir(e,t){1&e&&(s.TgZ(0,"h2",6),s._uU(1,"Create a New Plan"),s.qZA())}function Ur(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.name)}}function Or(e,t){if(1&e&&(s.TgZ(0,"option",24),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("ngValue",e.id),s.xp6(1),s.Oqu(e.name)}}function Dr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.parent_id)}}function Pr(e,t){1&e&&(s.ynx(0),s.TgZ(1,"p",17),s._uU(2,"How much subscribers of this plan should be charged. (Dollars, euros etc.)"),s.qZA(),s.TgZ(3,"p",17),s._uU(4,"For example, Amount=100, Interval=Year and Interval Count=1, will charge user 100 dollars every year."),s.qZA(),s.BQk())}function Sr(e,t){1&e&&(s.TgZ(0,"p",17),s._uU(1,"Plan amount can't be changed once plan has already been created, however you can add a new child plan with a different price or delete this plan and create a new one."),s.qZA())}function Jr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.amount)}}function Nr(e,t){if(1&e&&(s.TgZ(0,"option",24),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("ngValue",e.code),s.xp6(1),s.AsE("",e.code," - ",e.name,"")}}function Rr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(3).ngIf;s.xp6(1),s.Oqu(e.currency)}}function Qr(e,t){if(1&e&&(s.TgZ(0,"div",9),s.TgZ(1,"label",30),s._uU(2,"Currency"),s.qZA(),s.TgZ(3,"select",31),s.YNc(4,Nr,2,3,"option",16),s.ALo(5,"async"),s.qZA(),s.YNc(6,Rr,2,1,"div",12),s.qZA()),2&e){const e=s.oxw(2).ngIf,t=s.oxw();s.xp6(4),s.Q6J("ngForOf",s.lcZ(5,2,t.currencies$)),s.xp6(2),s.Q6J("ngIf",e.currency)}}function Fr(e,t){if(1&e&&(s.TgZ(0,"option",24),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("ngValue",e),s.xp6(1),s.Oqu(e)}}function Er(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.interval)}}function Yr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(3).ngIf;s.xp6(1),s.Oqu(e.interval_count)}}function Lr(e,t){if(1&e&&(s.TgZ(0,"div",9),s.TgZ(1,"label",32),s._uU(2,"Interval Count"),s.qZA(),s._UZ(3,"input",33),s.TgZ(4,"p",17),s._uU(5,"The number of intervals (specified in the interval property above) between each subscription billing. For example, Interval=Month and Interval Count=3 bills every 3 months."),s.qZA(),s.YNc(6,Yr,2,1,"div",12),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(6),s.Q6J("ngIf",e.interval_count)}}function $r(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"div",9),s.TgZ(2,"label",25),s._uU(3,"Amount"),s.qZA(),s._UZ(4,"input",26),s.YNc(5,Pr,5,0,"ng-container",18),s.YNc(6,Sr,2,0,"p",22),s.YNc(7,Jr,2,1,"div",12),s.qZA(),s.YNc(8,Qr,7,4,"div",27),s.TgZ(9,"div",9),s.TgZ(10,"label",28),s._uU(11,"Interval"),s.qZA(),s.TgZ(12,"select",29),s.YNc(13,Fr,2,2,"option",16),s.qZA(),s.TgZ(14,"p",17),s._uU(15,"The frequency with which a subscription should be billed."),s.qZA(),s.YNc(16,Er,2,1,"div",12),s.qZA(),s.YNc(17,Lr,7,1,"div",27),s.BQk()),2&e){const e=s.oxw().ngIf,t=s.oxw();s.xp6(4),s.Q6J("min",t.getMinAmount())("max",t.getMaxAmount()),s.xp6(1),s.Q6J("ngIf",!t.data.plan),s.xp6(1),s.Q6J("ngIf",t.data.plan),s.xp6(1),s.Q6J("ngIf",e.amount),s.xp6(1),s.Q6J("ngIf",!t.formValue().parent_id),s.xp6(5),s.Q6J("ngForOf",t.intervals),s.xp6(3),s.Q6J("ngIf",e.interval),s.xp6(1),s.Q6J("ngIf","year"!==t.formValue().interval)}}function Vr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.position)}}function Hr(e,t){1&e&&(s.TgZ(0,"div",36),s.TgZ(1,"mat-slide-toggle",53),s._uU(2,"Free"),s.qZA(),s.TgZ(3,"p",17),s._uU(4,"Basic free plan that will be assigned to new users that have not upgraded to other plans."),s.qZA(),s.qZA())}function zr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(null==e?null:e.permissions)}}function Br(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"li",54),s.TgZ(1,"button",55),s._UZ(2,"mat-icon",56),s.qZA(),s.TgZ(3,"div",57),s._uU(4),s.qZA(),s.TgZ(5,"button",58),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(3).removeFeature(t)}),s._UZ(6,"mat-icon",59),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit;s.uIk("data-id",e.id),s.xp6(4),s.Oqu(e.content)}}function jr(e,t){1&e&&(s.TgZ(0,"p",17),s._uU(1,"No custom features yet."),s.qZA())}function Gr(e,t){if(1&e&&(s.TgZ(0,"div",23),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.available_space)}}function Xr(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",9),s.TgZ(2,"label",34),s._uU(3,"Position"),s.qZA(),s.TgZ(4,"select",35),s.TgZ(5,"option",24),s._uU(6,"1"),s.qZA(),s.TgZ(7,"option",24),s._uU(8,"2"),s.qZA(),s.TgZ(9,"option",24),s._uU(10,"3"),s.qZA(),s.TgZ(11,"option",24),s._uU(12,"4"),s.qZA(),s.TgZ(13,"option",24),s._uU(14,"5"),s.qZA(),s.TgZ(15,"option",24),s._uU(16,"6"),s.qZA(),s.TgZ(17,"option",24),s._uU(18,"7"),s.qZA(),s.TgZ(19,"option",24),s._uU(20,"8"),s.qZA(),s.qZA(),s.TgZ(21,"p",17),s._uU(22,"Order of plans. Lower position will appear first."),s.qZA(),s.YNc(23,Vr,2,1,"div",12),s.qZA(),s.TgZ(24,"div",36),s.TgZ(25,"mat-slide-toggle",37),s._uU(26,"Recommended"),s.qZA(),s.TgZ(27,"p",17),s._uU(28,'Plan will be marked as "Most Popular" and emphasized to users.'),s.qZA(),s.qZA(),s.YNc(29,Hr,5,0,"div",38),s.TgZ(30,"div",36),s.TgZ(31,"mat-slide-toggle",39),s._uU(32,"Show Permissions"),s.qZA(),s.TgZ(33,"p",17),s._uU(34,"Whether plan permissions should be displayed as features to users."),s.qZA(),s.qZA(),s.TgZ(35,"div",36),s.TgZ(36,"mat-slide-toggle",40),s._uU(37,"Hidden"),s.qZA(),s.TgZ(38,"p",17),s._uU(39,"Whether this plan should be hidden on upgrade and pricing pages."),s.qZA(),s.qZA(),s._UZ(40,"permission-manager",41),s.YNc(41,zr,2,1,"div",12),s.TgZ(42,"div",42),s.TgZ(43,"div",43),s._uU(44,"Custom Features"),s.qZA(),s.TgZ(45,"ul",44),s.NdJ("cdkDropListDropped",function(t){return s.CHM(e),s.oxw(2).reorderPlanFeatures(t)}),s.YNc(46,Br,7,2,"li",45),s.ALo(47,"async"),s.qZA(),s.YNc(48,jr,2,0,"p",22),s.ALo(49,"async"),s.TgZ(50,"form",46),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw(2).addFeature()}),s.TgZ(51,"div",9),s.TgZ(52,"div",47),s.TgZ(53,"input",48),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).newFeature=t}),s.qZA(),s.TgZ(54,"button",49),s._uU(55,"Add"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(56,"div",50),s.TgZ(57,"div",43),s._uU(58,"Available Space"),s.qZA(),s.TgZ(59,"space-input",51),s.TgZ(60,"p",52),s._uU(61,"Hard drive space available to users subscribed to this plan."),s.qZA(),s.YNc(62,Gr,2,1,"div",12),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw().ngIf,t=s.oxw();s.xp6(5),s.Q6J("ngValue",1),s.xp6(2),s.Q6J("ngValue",2),s.xp6(2),s.Q6J("ngValue",3),s.xp6(2),s.Q6J("ngValue",4),s.xp6(2),s.Q6J("ngValue",5),s.xp6(2),s.Q6J("ngValue",6),s.xp6(2),s.Q6J("ngValue",7),s.xp6(2),s.Q6J("ngValue",8),s.xp6(4),s.Q6J("ngIf",e.position),s.xp6(6),s.Q6J("ngIf",!t.data.plan||t.data.plan.free),s.xp6(12),s.Q6J("ngIf",null==e?null:e.permissions),s.xp6(5),s.Q6J("ngForOf",s.lcZ(47,15,t.features$)),s.xp6(2),s.Q6J("ngIf",!s.lcZ(49,17,t.features$).length),s.xp6(5),s.Q6J("ngModel",t.newFeature),s.xp6(9),s.Q6J("ngIf",e.available_space)}}function Wr(e,t){1&e&&(s.TgZ(0,"span",17),s._uU(1,"Update Plan"),s.qZA())}function Kr(e,t){1&e&&(s.TgZ(0,"span",17),s._uU(1,"Create Plan"),s.qZA())}function el(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",7),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw().confirm()}),s.TgZ(1,"div",8),s.TgZ(2,"div",9),s.TgZ(3,"label",10),s._uU(4,"Name"),s.qZA(),s._UZ(5,"input",11),s.YNc(6,Ur,2,1,"div",12),s.qZA(),s.TgZ(7,"div",9),s.TgZ(8,"label",13),s._uU(9,"Parent Plan"),s.qZA(),s.TgZ(10,"select",14),s.TgZ(11,"option",15),s._uU(12,"None"),s.qZA(),s.YNc(13,Or,2,2,"option",16),s.qZA(),s.TgZ(14,"p",17),s._uU(15,"Used for creating yearly, weekly etc versions of base plan. Child plans will inherit their parent permissions/features."),s.qZA(),s.YNc(16,Dr,2,1,"div",12),s.qZA(),s.YNc(17,$r,18,9,"ng-container",18),s.YNc(18,Xr,63,19,"ng-container",18),s.qZA(),s.TgZ(19,"div",19),s.TgZ(20,"button",20),s.NdJ("click",function(){return s.CHM(e),s.oxw().close()}),s._uU(21,"Cancel"),s.qZA(),s.TgZ(22,"button",21),s.ALo(23,"async"),s.YNc(24,Wr,2,0,"span",22),s.YNc(25,Kr,2,0,"span",22),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.Q6J("formGroup",n.form),s.xp6(6),s.Q6J("ngIf",e.name),s.xp6(5),s.Q6J("ngValue",null),s.xp6(2),s.Q6J("ngForOf",n.getBasePlans(n.data.plan)),s.xp6(3),s.Q6J("ngIf",e.parent_id),s.xp6(1),s.Q6J("ngIf",!n.formValue().free),s.xp6(1),s.Q6J("ngIf",!n.formValue().parent_id),s.xp6(4),s.Q6J("disabled",s.lcZ(23,10,n.loading$)),s.xp6(2),s.Q6J("ngIf",n.data.plan),s.xp6(1),s.Q6J("ngIf",!n.data.plan)}}let tl=(()=>{class e{constructor(e,t,n,i,a,s){this.dialogRef=e,this.data=t,this.plans=n,this.toast=i,this.valueLists=a,this.fb=s,this.loading$=new c.X(!1),this.features$=new c.X([]),this.errors$=new c.X({}),this.currencies$=new c.X([]),this.intervals=["day","week","month","year"],this.allPlans$=new c.X([]),this.form=this.fb.group({name:[""],parent_id:[],free:[!1],hidden:[!1],recommended:[!1],show_permissions:[!1],amount:[],currency:[],interval:[],interval_count:[],position:[],available_space:[],permissions:[[]]})}ngOnInit(){this.resetState(),this.allPlans$.next(this.data.plans||[]),this.valueLists.get(["currencies"]).subscribe(e=>{this.currencies$.next(Object.values(e.currencies))}),this.data.plan&&this.hydrateModel(this.data.plan)}confirm(){let e;this.loading$.next(!0),e=this.data.plan?this.plans.update(this.data.plan.id,this.getPayload()):this.plans.create(this.getPayload()),e.pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(e=>{this.close(e.plan),this.toast.open("Plan has been "+(this.data.plan?"updated":"created"))},e=>{this.errors$.next(e.errors)})}getPayload(){const e=Object.assign({},this.form.getRawValue());e.features=this.features$.value.map(e=>e.content);const t=this.currencies$.value.find(t=>t.code===e.currency);return e.currency_symbol=t.symbol,"year"===e.interval&&(e.interval_count=1),e}close(e){this.resetState(),this.dialogRef.close(e)}addFeature(){!(this.features$.value.findIndex(e=>e.content===this.newFeature)>-1)&&this.newFeature&&(this.features$.next([...this.features$.value,{content:this.newFeature,id:(0,li.O)(5)}]),this.newFeature=null)}removeFeature(e){const t=this.features$.value.filter(t=>t.id!==e.id);this.features$.next(t)}getBasePlans(e){return this.allPlans$.value.filter(t=>!(t.parent_id||t.free||e&&e.id===t.id))}hydrateModel(e){this.form.patchValue(e);const t=e.features.map(e=>({content:e,id:(0,li.O)(5)}));this.form.get("amount").disable(),this.features$.next(t)}resetState(){this.form.reset({currency:"USD",interval:"month",interval_count:1,position:1,permissions:[],free:!1,recommended:!1,show_permissions:!1}),this.features$.next([]),this.errors$.next({})}reorderPlanFeatures(e){const t=[...this.features$.value];(0,it.bA)(t,e.previousIndex,e.currentIndex),this.features$.next(t)}formValue(){return this.form.value}getMinAmount(){return this.form.get("parent_id").value?1:0}getMaxAmount(){return null}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so),s.Y36(m.WI),s.Y36(kr.o),s.Y36(ht.F),s.Y36(_t.l),s.Y36(a.qu))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-plan-modal"]],decls:9,vars:8,consts:[[1,"modal-header"],["class","modal-title","mat-dialog-title","","trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["autocomplete","off","ngNativeValidate","",3,"formGroup","ngSubmit",4,"ngIf"],[1,"overlay",3,"isVisible"],["mat-dialog-title","","trans","",1,"modal-title"],["autocomplete","off","ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content","",1,"many-inputs","mat-dialog-content"],[1,"input-container"],["for","plan-modal-name","trans",""],["type","text","id","plan-modal-name","formControlName","name","required",""],["class","error",4,"ngIf"],["for","parent_id","trans",""],["id","parent_id","formControlName","parent_id","required",""],["trans","",3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],["trans",""],[4,"ngIf"],["mat-dialog-actions","",1,"buttons","right","mat-dialog-actions"],["type","button","mat-button","","trans","",1,"button","cancel",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary",3,"disabled"],["trans","",4,"ngIf"],[1,"error"],[3,"ngValue"],["for","amount","trans",""],["type","number","step","0.01","id","amount","formControlName","amount","required","",3,"min","max"],["class","input-container",4,"ngIf"],["for","interval","trans",""],["id","interval","formControlName","interval","required","",1,"interval-select"],["for","currency","trans",""],["id","currency","formControlName","currency","required",""],["for","interval_count","trans",""],["type","number","id","interval_count","formControlName","interval_count","required","","min","1","max","12"],["for","position","trans",""],["type","text","id","position","formControlName","position","required",""],[1,"setting-toggle-container"],["id","recommended","formControlName","recommended","trans",""],["class","setting-toggle-container",4,"ngIf"],["id","show_permissions","formControlName","show_permissions","trans",""],["id","plan-modal-hidden","formControlName","hidden","trans",""],["formControlName","permissions"],[1,"plan-features"],["trans","",1,"section-title"],["cdkDropList","",1,"unstyled-list","feature-list",3,"cdkDropListDropped"],["class","feature-list-item","cdkDrag","",4,"ngFor","ngForOf"],["ngNativeValidate","",3,"ngSubmit"],[1,"input-with-action"],["type","text","name","new-feature","placeholder","+New Feature","trans-placeholder","","autocomplete","false","required","",3,"ngModel","ngModelChange"],["type","submit","mat-flat-button","","color","accent","trans",""],[1,"available-space"],["formControlName","available_space"],["trans","",1,"description"],["id","free","formControlName","free","trans",""],["cdkDrag","",1,"feature-list-item"],["cdkDragHandle","","mat-icon-button","",1,"drag-handle"],["svgIcon","drag-handle","matListIcon",""],[1,"text"],["mat-icon-button","",1,"delete-button",3,"click"],["svgIcon","delete","matListIcon",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,Mr,2,0,"h2",1),s.YNc(2,Ir,2,0,"h2",1),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.YNc(5,el,26,12,"form",4),s.ALo(6,"async"),s._UZ(7,"loading-indicator",5),s.ALo(8,"async")),2&e&&(s.xp6(1),s.Q6J("ngIf",t.data.plan),s.xp6(1),s.Q6J("ngIf",!t.data.plan),s.xp6(3),s.Q6J("ngIf",s.lcZ(6,4,t.errors$)),s.xp6(2),s.Q6J("isVisible",s.lcZ(8,6,t.loading$)))},directives:[i.O5,P.Hw,ka.Q,m.uh,Zt.P,a.JL,a.sg,m.xY,a.Fj,a.JJ,a.u,a.Q7,a.EJ,a.YN,a.Kr,i.sg,m.H8,p.lW,a.wV,a.qQ,a.Fd,T.Rr,$a,it.Wj,a.F,a.On,_i,it.Zt,it.Bh],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.section-title[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid var(--be-divider-default);padding-bottom:5px;margin-bottom:5px}.feature-list-item[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px 0;font-size:1.6rem}.feature-list-item[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{padding:0 10px;white-space:nowrap;text-overflow:ellipsis}.feature-list-item[_ngcontent-%COMP%]   .delete-button[_ngcontent-%COMP%]{color:#f44336;margin-left:auto}.feature-list-item[_ngcontent-%COMP%]   .drag-handle[_ngcontent-%COMP%]{cursor:move}.plan-features[_ngcontent-%COMP%]{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--be-divider-default)}.interval-select[_ngcontent-%COMP%]{text-transform:capitalize}.available-space[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{border-bottom:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%], .cdk-drop-list-dragging[_ngcontent-%COMP%]   .cdk-drag[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"],changeDetection:0}),e})();const nl=[new ds.XQ({type:ds.Bq.Select,key:"parent_id",label:"Type",description:"Whether plan is a child or not",defaultValue:null,options:[{key:"Any",value:null},{key:"Child",value:{value:null,operator:"!="}},{key:"Parent",value:{value:null,operator:"="}}]}),new ds.XQ({type:ds.Bq.Select,key:"currency",description:"Currency assigned to the plan",defaultValue:"USD",options:[{key:"USD",value:"USD"},{key:"EUR",value:"EUR"},{key:"Pound Sterling",value:"GBP"},{key:"Canadian Dollar",value:"CAD"}]}),new ds.XQ({type:ds.Bq.Select,key:"interval",description:"Currency assigned to the plan",defaultValue:"USD",options:[{key:"Day",value:"day"},{key:"Week",value:"week"},{key:"Month",value:"month"},{key:"Year",value:"yea"}]}),new us.T7({description:"Date plan was created"}),new us.yH({description:"Date plan was last updated"})];function il(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",22),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).maybeDeleteSelectedPlans()}),s._uU(1," Delete "),s.qZA()}}const al=function(e){return{count:e,resource:"plan(s)"}};function sl(e,t){if(1&e&&(s.TgZ(0,"tr"),s.TgZ(1,"th",18),s.TgZ(2,"div",19),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",20),s.YNc(5,il,2,0,"button",21),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.ngIf,n=s.oxw();s.xp6(2),s.Q6J("transValues",s.VKq(2,al,e)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("plans.delete"))}}function ol(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",34),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().showCrupdatePlanModal(t)}),s.ALo(1,"trans"),s._UZ(2,"mat-icon",35),s.qZA()}2&e&&s.Q6J("matTooltip",s.lcZ(1,1,"Edit plan"))}function rl(e,t){if(1&e&&(s.TgZ(0,"tr"),s._UZ(1,"td",23),s.TgZ(2,"td",24),s._uU(3),s.qZA(),s.TgZ(4,"td",25),s._uU(5),s.qZA(),s.TgZ(6,"td",26),s._uU(7),s.ALo(8,"currency"),s.qZA(),s.TgZ(9,"td",27),s._uU(10),s.qZA(),s.TgZ(11,"td",28),s._uU(12),s.qZA(),s.TgZ(13,"td",29),s._uU(14),s.qZA(),s.TgZ(15,"td",30),s._uU(16),s.qZA(),s.TgZ(17,"td",31),s._uU(18),s.ALo(19,"formattedDate"),s.qZA(),s.TgZ(20,"td",32),s.YNc(21,ol,3,3,"button",33),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Oqu(e.name),s.xp6(2),s.Oqu(e.parent?e.parent.name:"-"),s.xp6(2),s.hij(" ",e.free?"Free":s.xi3(8,10,e.amount,e.currency)," "),s.xp6(3),s.Oqu(e.free?"Free":e.currency),s.xp6(2),s.Oqu(e.free?"Free":e.interval),s.xp6(2),s.hij(" ",e.parent_id?"-":e.recommended?"Yes":"No"," "),s.xp6(2),s.Oqu(e.parent_id?"-":e.position),s.xp6(2),s.Oqu(s.lcZ(19,13,e.updated_at)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("plans.update"))}}function ll(e,t){1&e&&(s.TgZ(0,"no-results-message",36),s.TgZ(1,"span",37),s._uU(2,"No plans have been created yet"),s.qZA(),s.qZA())}let cl=(()=>{class e{constructor(e,t,n,i){this.plans=e,this.currentUser=t,this.toast=n,this.datatable=i,this.filters=nl,this.loading$=new c.X(!1),this.plans$=this.datatable.data$}ngOnInit(){this.datatable.init({uri:kr.o.BASE_URI})}maybeDeleteSelectedPlans(){this.datatable.confirmResourceDeletion("plans").subscribe(()=>{this.loading$.next(!0),this.plans.delete(this.datatable.selectedRows$.value).pipe((0,pt.x)(()=>{this.loading$.next(!1),this.datatable.reset()})).subscribe()})}showCrupdatePlanModal(e){this.datatable.openCrupdateResourceModal(tl,{plan:e,plans:this.datatable.data$.value}).subscribe()}syncPlans(){this.loading$.next(!0),this.plans.sync().pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(()=>{this.toast.open("Synced plans across all enabled payment gateways")})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(kr.o),s.Y36(Wi.I),s.Y36(ht.F),s.Y36(cs.x))},e.\u0275cmp=s.Xpm({type:e,selectors:[["plan-index"]],features:[s._Bn([cs.x])],decls:44,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","plans",3,"filters"],[1,"action-buttons"],["mat-raised-button","",1,"btn-with-dropdown-icon",3,"disabled","matTooltip","click"],["svgIcon","sync"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"disabled","click"],["svgIcon","add"],[1,"datatable","responsive-table"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","parent_id","trans",""],["table-sort-header","updated_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","online-payments.svg",4,"ngIf"],["colspan","10"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["mat-raised-button","","color","warn","trans","",3,"click",4,"ngIf"],["mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Name"],["data-label","Parent Plan"],["data-label","Amount"],["data-label","Currency"],["data-label","Interval"],["data-label","Recommended"],["data-label","Position"],["data-label","Last Updated"],[1,"edit-column"],["mat-icon-button","",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["svgImage","online-payments.svg"],["primary-text","","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s._uU(2,"Subscription Plans"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"datatable-filters",3),s.TgZ(5,"div",4),s.TgZ(6,"button",5),s.NdJ("click",function(){return t.syncPlans()}),s.ALo(7,"async"),s.TgZ(8,"span",1),s._uU(9,"Sync"),s.qZA(),s._UZ(10,"mat-icon",6),s.qZA(),s.TgZ(11,"button",7),s.NdJ("click",function(){return t.showCrupdatePlanModal()}),s._UZ(12,"mat-icon",8),s.TgZ(13,"span",1),s._uU(14,"Add New Plan"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(15,"div",9),s.TgZ(16,"table",10),s.TgZ(17,"thead"),s.TgZ(18,"tr"),s._UZ(19,"th",11),s.TgZ(20,"th",12),s._uU(21,"Name"),s.qZA(),s.TgZ(22,"th",13),s._uU(23,"Parent Plan"),s.qZA(),s.TgZ(24,"th",12),s._uU(25,"Amount"),s.qZA(),s.TgZ(26,"th",12),s._uU(27,"Currency"),s.qZA(),s.TgZ(28,"th",12),s._uU(29,"Interval"),s.qZA(),s.TgZ(30,"th",12),s._uU(31,"Recommended"),s.qZA(),s.TgZ(32,"th",12),s._uU(33,"Position"),s.qZA(),s.TgZ(34,"th",14),s._uU(35,"Last Updated"),s.qZA(),s._UZ(36,"th"),s.qZA(),s.YNc(37,sl,6,4,"tr",15),s.qZA(),s.TgZ(38,"tbody"),s.YNc(39,rl,22,15,"tr",16),s.ALo(40,"async"),s.qZA(),s.qZA(),s.YNc(41,ll,3,0,"no-results-message",17),s.ALo(42,"async"),s._UZ(43,"datatable-footer"),s.qZA()),2&e&&(s.xp6(4),s.Q6J("filters",t.filters),s.xp6(2),s.Q6J("disabled",s.lcZ(7,7,t.loading$))("matTooltip","Sync if one of payment gateways was enabled after plan has already been created"),s.xp6(5),s.Q6J("disabled",!t.currentUser.hasPermission("plans.create")),s.xp6(26),s.Q6J("ngIf",t.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(40,9,t.plans$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(42,11,t.datatable.paginator.noResults$)))},directives:[Zt.P,fs.h,p.lW,k.gM,P.Hw,bs,vs.p,i.O5,i.sg,Zs.V,ys,ws.U],pipes:[i.Ov,i.H9,mn.l,lt.R],styles:[""],changeDetection:0}),e})();var dl=n(53410),ul=n(54395),pl=n(43190),gl=n(80708),hl=n(80551);function ml(e,t){1&e&&(s.TgZ(0,"h2",6),s._uU(1,"Update Subscription Details"),s.qZA())}function fl(e,t){1&e&&(s.TgZ(0,"h2",6),s._uU(1,"Create a New Subscription"),s.qZA())}function _l(e,t){if(1&e&&(s.TgZ(0,"div",35),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.user_id)}}function bl(e,t){if(1&e&&(s.TgZ(0,"mat-option",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.Oqu(e.email)}}function vl(e,t){if(1&e&&(s.TgZ(0,"option",37),s._UZ(1,"full-plan-name",38),s._uU(2),s.ALo(3,"currency"),s.qZA()),2&e){const e=t.$implicit;s.Q6J("ngValue",e.id),s.xp6(1),s.Q6J("plan",e),s.xp6(1),s.hij(" (",s.xi3(3,3,e.amount,e.currency),") ")}}function Zl(e,t){if(1&e&&(s.TgZ(0,"div",35),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.description)}}function xl(e,t){if(1&e&&(s.TgZ(0,"div",35),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.renews_at)}}function yl(e,t){if(1&e&&(s.TgZ(0,"div",35),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.ends_at)}}function Al(e,t){1&e&&(s.TgZ(0,"span",26),s._uU(1,"Update"),s.qZA())}function wl(e,t){1&e&&(s.TgZ(0,"span",26),s._uU(1,"Create"),s.qZA())}function Cl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",7),s.NdJ("ngSubmit",function(){return s.CHM(e),s.oxw().confirm()}),s.TgZ(1,"div",8),s.TgZ(2,"div",9),s.TgZ(3,"label",10),s._uU(4,"User"),s.qZA(),s._UZ(5,"input",11),s.YNc(6,_l,2,1,"div",12),s.TgZ(7,"mat-autocomplete",13,14),s.YNc(9,bl,2,2,"mat-option",15),s.ALo(10,"async"),s.qZA(),s.qZA(),s.ynx(11,16),s.TgZ(12,"div",9),s.TgZ(13,"label",17),s._uU(14,"Plan"),s.qZA(),s.TgZ(15,"select",18),s.YNc(16,vl,4,6,"option",19),s.qZA(),s.qZA(),s.TgZ(17,"div",9),s.TgZ(18,"label",20),s._uU(19,"Description"),s.qZA(),s._UZ(20,"textarea",21),s.YNc(21,Zl,2,1,"div",12),s.qZA(),s.TgZ(22,"div",22),s.TgZ(23,"label",23),s._uU(24,"Renews At"),s.qZA(),s.TgZ(25,"input",24),s.NdJ("click",function(){s.CHM(e);const t=s.MAs(31);return s.oxw().toggleDatePicker(t)}),s.qZA(),s._UZ(26,"mat-datepicker-toggle",25),s.TgZ(27,"p",26),s._uU(28,"This will only change local records. User will continue to be billed on their original cycle on the payment gateway."),s.qZA(),s.YNc(29,xl,2,1,"div",12),s._UZ(30,"mat-datepicker",null,27),s.qZA(),s.TgZ(32,"div",22),s.TgZ(33,"label",28),s._uU(34,"Ends At"),s.qZA(),s.TgZ(35,"input",29),s.NdJ("click",function(){s.CHM(e);const t=s.MAs(41);return s.oxw().toggleDatePicker(t)}),s.qZA(),s.TgZ(36,"p",26),s._uU(37,"This will only change local records. User will continue to be billed on their original cycle on the payment gateway."),s.qZA(),s.YNc(38,yl,2,1,"div",12),s._UZ(39,"mat-datepicker-toggle",25),s._UZ(40,"mat-datepicker",null,30),s.qZA(),s.BQk(),s.qZA(),s.TgZ(42,"div",31),s.TgZ(43,"button",32),s.NdJ("click",function(){return s.CHM(e),s.oxw().close()}),s._uU(44,"Cancel"),s.qZA(),s.TgZ(45,"button",33),s.ALo(46,"async"),s.YNc(47,Al,2,0,"span",34),s.YNc(48,wl,2,0,"span",34),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.MAs(8),i=s.MAs(31),a=s.MAs(41),o=s.oxw();s.xp6(5),s.Q6J("formControl",o.userAutocomplete)("matAutocomplete",n),s.xp6(1),s.Q6J("ngIf",e.user_id),s.xp6(1),s.Q6J("displayWith",o.displayFn),s.xp6(2),s.Q6J("ngForOf",s.lcZ(10,17,o.filteredUsers)),s.xp6(2),s.Q6J("formGroup",o.form),s.xp6(5),s.Q6J("ngForOf",o.plans),s.xp6(5),s.Q6J("ngIf",e.description),s.xp6(4),s.Q6J("matDatepicker",i),s.xp6(1),s.Q6J("for",i),s.xp6(3),s.Q6J("ngIf",e.renews_at),s.xp6(6),s.Q6J("matDatepicker",a),s.xp6(3),s.Q6J("ngIf",e.ends_at),s.xp6(1),s.Q6J("for",a),s.xp6(6),s.Q6J("disabled",s.lcZ(46,19,o.loading$)),s.xp6(2),s.Q6J("ngIf",o.data.subscription),s.xp6(1),s.Q6J("ngIf",!o.data.subscription)}}let Tl=(()=>{class e{constructor(e,t,n,i,s,o,r){this.dialogRef=e,this.data=t,this.subscriptions=n,this.toast=i,this.users=s,this.plansApi=o,this.fb=r,this.loading$=new c.X(!1),this.form=this.fb.group({plan_id:[""],description:[""],renews_at:[""],ends_at:[""]}),this.errors$=new c.X({}),this.userAutocomplete=new a.NI(null),this.filteredUsers=new b.xQ,this.plans=[],this.resetState()}ngOnInit(){this.resetState(),this.bindToUserAutocomplete(),this.fetchPlans(),this.form.get("ends_at").valueChanges.pipe((0,Ho.x)()).subscribe(e=>{e?this.form.get("renews_at").disable():this.form.get("renews_at").enable()}),this.form.get("renews_at").valueChanges.pipe((0,Ho.x)()).subscribe(e=>{e?this.form.get("ends_at").disable():this.form.get("ends_at").enable()}),this.data.subscription&&this.hydrateModel(this.data.subscription)}confirm(){let e;this.loading$.next(!0),e=this.data.subscription?this.subscriptions.update(this.data.subscription.id,this.getPayload()):this.subscriptions.create(this.getPayload()),e.pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(e=>{this.close(e.subscription),this.toast.open("Subscription "+(this.data.subscription?"updated":"created"))},e=>this.errors$.next(e.errors))}close(e){this.resetState(),this.dialogRef.close(e)}displayFn(e){return e?e.email:null}hydrateModel(e){const t=Object.assign({},e);e.user_id&&this.userAutocomplete.setValue(e.user),this.form.patchValue(t)}getPayload(){const e=this.form.value;return!this.data.subscription&&this.userAutocomplete.value&&(e.user_id=this.userAutocomplete.value.id),e}resetState(){this.form.reset(),this.errors$.next({})}toggleDatePicker(e){e.opened?e.close():e.open()}bindToUserAutocomplete(){this.filteredUsers=this.userAutocomplete.valueChanges.pipe((0,ul.b)(400),(0,pl.w)(e=>e?this.users.getAll({query:e}):(0,H.of)([])))}fetchPlans(){this.plansApi.all().subscribe(e=>{this.plans=e.pagination.data,!this.form.value.plan_id&&this.plans.length&&this.form.patchValue({plan_id:this.plans[0].id})})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so),s.Y36(m.WI),s.Y36(gl.t),s.Y36(ht.F),s.Y36(Xi.Q),s.Y36(kr.o),s.Y36(a.qu))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-subscription-modal"]],decls:9,vars:8,consts:[[1,"modal-header"],["class","modal-title","mat-dialog-title","","trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["autocomplete","off","ngNativeValidate","",3,"ngSubmit",4,"ngIf"],[1,"overlay",3,"isVisible"],["mat-dialog-title","","trans","",1,"modal-title"],["autocomplete","off","ngNativeValidate","",3,"ngSubmit"],["mat-dialog-content","",1,"many-inputs","mat-dialog-content"],[1,"input-container"],["for","user","trans",""],["type","text","id","user","placeholder","Search for user...","required","",3,"formControl","matAutocomplete"],["class","error",4,"ngIf"],[3,"displayWith"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"formGroup"],["for","plan","trans",""],["id","plan","formControlName","plan_id","required",""],[3,"ngValue",4,"ngFor","ngForOf"],["for","description","trans",""],["id","description","formControlName","description"],[1,"input-container","date-picker-input-container"],["for","renews_at","trans",""],["id","renews_at","formControlName","renews_at",3,"matDatepicker","click"],[3,"for"],["trans",""],["renewsAtDatePicker",""],["for","ends_at","trans",""],["id","ends_at","formControlName","ends_at",3,"matDatepicker","click"],["endsAtDatePicker",""],["mat-dialog-actions","",1,"buttons","right","mat-dialog-actions"],["type","button","mat-button","","trans","",1,"button","cancel",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary",3,"disabled"],["trans","",4,"ngIf"],[1,"error"],[3,"value"],[3,"ngValue"],[3,"plan"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,ml,2,0,"h2",1),s.YNc(2,fl,2,0,"h2",1),s.TgZ(3,"button",2),s.NdJ("click",function(){return t.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.YNc(5,Cl,49,21,"form",4),s.ALo(6,"async"),s._UZ(7,"loading-indicator",5),s.ALo(8,"async")),2&e&&(s.xp6(1),s.Q6J("ngIf",t.data.subscription),s.xp6(1),s.Q6J("ngIf",!t.data.subscription),s.xp6(3),s.Q6J("ngIf",s.lcZ(6,4,t.errors$)),s.xp6(2),s.Q6J("isVisible",s.lcZ(8,6,t.loading$)))},directives:[i.O5,P.Hw,ka.Q,m.uh,Zt.P,a.JL,a.F,m.xY,a.Fj,u.ZL,a.Q7,a.JJ,a.oH,u.XC,i.sg,a.sg,a.EJ,a.u,je,Xe,$e,m.H8,p.lW,Z.ey,a.YN,a.Kr,hl.T],pipes:[i.Ov,i.H9],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.date-picker-input-container[_ngcontent-%COMP%]{position:relative}.mat-datepicker-toggle[_ngcontent-%COMP%]{position:absolute;top:29px;right:0}.mat-autocomplete-panel[_ngcontent-%COMP%]   .mat-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0}"],changeDetection:0}),e})();const ql=[new ds.XQ({type:ds.Bq.Select,key:"ends_at",label:"Status",description:"Whether subscription is active or cancelled",defaultValue:{value:null,operator:ds.pg.eq},options:[{key:"Active",value:{value:null,operator:ds.pg.eq}},{key:"Cancelled",value:{value:null,operator:ds.pg.ne}}]}),new ds.XQ({type:ds.Bq.Select,key:"gateway_name",label:"Gateway",description:"With which payment provider was subscription created",defaultValue:"stripe",options:[{key:"Stripe",value:"stripe"},{key:"Paypal",value:"paypal"},{key:"None",value:null}]}),new us.T7({description:"Date subscription was created"}),new us.yH({description:"Date subscription was last updated"})];function kl(e,t){1&e&&s._UZ(0,"mat-icon",25)}function Ml(e,t){1&e&&(s.TgZ(0,"span"),s._uU(1,"-"),s.qZA())}function Il(e,t){1&e&&s._UZ(0,"mat-icon",25)}function Ul(e,t){1&e&&(s.TgZ(0,"span"),s._uU(1,"-"),s.qZA())}function Ol(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"button",26),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().openCrupdateSubscriptionModal(t)}),s.ALo(2,"trans"),s._UZ(3,"mat-icon",27),s.qZA(),s.TgZ(4,"button",28),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().maybeCancelSubscription(t)}),s.ALo(5,"trans"),s._UZ(6,"mat-icon",29),s.qZA(),s.TgZ(7,"button",26),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().maybeDeleteSubscription(t)}),s.ALo(8,"trans"),s._UZ(9,"mat-icon",30),s.qZA(),s.BQk()}if(2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("matTooltip",s.lcZ(2,4,"Edit")),s.xp6(3),s.Q6J("disabled",e.cancelled)("matTooltip",s.lcZ(5,6,"Cancel/Suspend")),s.xp6(3),s.Q6J("matTooltip",s.lcZ(8,8,"Delete"))}}function Dl(e,t){if(1&e&&(s.TgZ(0,"tr"),s.TgZ(1,"td"),s._UZ(2,"user-column",15),s.qZA(),s.TgZ(3,"td",16),s._uU(4),s.qZA(),s.TgZ(5,"td",17),s.YNc(6,kl,1,0,"mat-icon",18),s.YNc(7,Ml,2,0,"span",19),s.qZA(),s.TgZ(8,"td",20),s.YNc(9,Il,1,0,"mat-icon",18),s.YNc(10,Ul,2,0,"span",19),s.qZA(),s.TgZ(11,"td",21),s._uU(12),s.ALo(13,"formattedDate"),s.qZA(),s.TgZ(14,"td",22),s._uU(15),s.ALo(16,"formattedDate"),s.qZA(),s.TgZ(17,"td",23),s._uU(18),s.ALo(19,"formattedDate"),s.qZA(),s.TgZ(20,"td",24),s.YNc(21,Ol,10,10,"ng-container",19),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(2),s.Q6J("user",e.user),s.xp6(2),s.Oqu(e.gateway_name),s.xp6(2),s.Q6J("ngIf",e.cancelled),s.xp6(1),s.Q6J("ngIf",!e.cancelled),s.xp6(2),s.Q6J("ngIf",e.on_grace_period),s.xp6(1),s.Q6J("ngIf",!e.on_grace_period),s.xp6(2),s.Oqu(e.renews_at?s.lcZ(13,10,e.renews_at):"-"),s.xp6(3),s.Oqu(e.ends_at?s.lcZ(16,12,e.ends_at):"-"),s.xp6(3),s.Oqu(s.lcZ(19,14,e.created_at)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("subscriptions.delete"))}}function Pl(e,t){1&e&&(s.TgZ(0,"no-results-message",31),s.TgZ(1,"span",32),s._uU(2,"No subscriptions have been created yet"),s.qZA(),s.qZA())}let Sl=(()=>{class e{constructor(e,t,n,i,a){this.modal=e,this.subscriptions=t,this.currentUser=n,this.toast=i,this.datatable=a,this.filters=ql,this.loading$=new c.X(!1),this.subscriptions$=this.datatable.data$}ngOnInit(){this.datatable.init({uri:gl.t.BASE_URI})}maybeCancelSubscription(e){this.modal.open(Ns.z,{title:"Cancel Subscription",body:"Are you sure you want to cancel this subscription?",bodyBold:"This will cancel or suspend subscription based on its gateway and put user on grace period until their next scheduled renewal date and allow them to renew the subscription.",ok:"Cancel",cancel:"Go Back"}).afterClosed().subscribe(t=>{t&&this.cancelOrDeleteSubscription(e,{delete:!1})})}maybeDeleteSubscription(e){this.modal.open(Ns.z,{title:"Delete Subscription",body:"Are you sure you want to delete this subscription?",bodyBold:"This will permanently delete user subscription and immediately cancel it on billing gateway.",ok:"Delete",cancel:"Go Back"}).afterClosed().subscribe(t=>{t&&this.cancelOrDeleteSubscription(e,{delete:!0})})}cancelOrDeleteSubscription(e,t={}){this.loading$.next(!0),this.subscriptions.cancel(e.id,{delete:t.delete}).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(()=>{this.datatable.reset(),this.toast.open("Subscription cancelled.")})}openCrupdateSubscriptionModal(e){this.modal.open(Tl,{subscription:e}).afterClosed().subscribe(e=>{e&&this.datatable.reset()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(mt.u),s.Y36(gl.t),s.Y36(Wi.I),s.Y36(ht.F),s.Y36(cs.x))},e.\u0275cmp=s.Xpm({type:e,selectors:[["subscription-index"]],features:[s._Bn([cs.x])],decls:35,vars:8,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","subscriptions",3,"filters"],[1,"action-buttons"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"disabled","click"],["svgIcon","add"],[1,"datatable","responsive-table"],[1,"material-table"],["table-sort-header","user_id","trans",""],["table-sort-header","","trans",""],["table-sort-header","ends_at","trans",""],["table-sort-header","created_at","trans",""],[4,"ngFor","ngForOf"],["svgImage","subscriptions.svg",4,"ngIf"],[3,"user"],["data-label","Gateway"],["data-label","Cancelled"],["svgIcon","check",4,"ngIf"],[4,"ngIf"],["data-label","On Grace Period"],["data-label","Renews At"],["data-label","Ends At"],["data-label","Created At"],[1,"edit-column"],["svgIcon","check"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["mat-icon-button","",3,"disabled","matTooltip","click"],["svgIcon","pause"],["svgIcon","delete"],["svgImage","subscriptions.svg"],["primary-text","","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s._uU(2,"Subscriptions"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"datatable-filters",3),s.TgZ(5,"div",4),s.TgZ(6,"button",5),s.NdJ("click",function(){return t.openCrupdateSubscriptionModal()}),s._UZ(7,"mat-icon",6),s.TgZ(8,"span",1),s._uU(9,"Add New Subscription"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(10,"div",7),s.TgZ(11,"table",8),s.TgZ(12,"thead"),s.TgZ(13,"tr"),s.TgZ(14,"th",9),s._uU(15,"User"),s.qZA(),s.TgZ(16,"th",10),s._uU(17,"Gateway"),s.qZA(),s.TgZ(18,"th",11),s._uU(19,"Cancelled"),s.qZA(),s.TgZ(20,"th",1),s._uU(21,"On Grace Period"),s.qZA(),s.TgZ(22,"th",10),s._uU(23,"Renews At"),s.qZA(),s.TgZ(24,"th",10),s._uU(25,"Ends At"),s.qZA(),s.TgZ(26,"th",12),s._uU(27,"Created At"),s.qZA(),s._UZ(28,"th"),s.qZA(),s.qZA(),s.TgZ(29,"tbody"),s.YNc(30,Dl,22,16,"tr",13),s.ALo(31,"async"),s.qZA(),s.qZA(),s.YNc(32,Pl,3,0,"no-results-message",14),s.ALo(33,"async"),s._UZ(34,"datatable-footer"),s.qZA()),2&e&&(s.xp6(4),s.Q6J("filters",t.filters),s.xp6(2),s.Q6J("disabled",!t.currentUser.hasPermission("subscriptions.create")),s.xp6(24),s.Q6J("ngForOf",s.lcZ(31,4,t.subscriptions$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(33,6,t.datatable.paginator.noResults$)))},directives:[Zt.P,fs.h,p.lW,P.Hw,vs.p,i.sg,i.O5,Zs.V,As.r,k.gM,ws.U],pipes:[i.Ov,mn.l,lt.R],styles:[""],changeDetection:0}),e})();function Jl(e,t){if(1&e&&(s.TgZ(0,"option",26),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.action),s.xp6(1),s.hij(" ",e.label," ")}}function Nl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",17),s.TgZ(1,"label",22),s._uU(2,"Learn More Link"),s.qZA(),s.TgZ(3,"select",23),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).state.client["cookie_notice.learn_more"]=t}),s.TgZ(4,"option",24),s._uU(5,"None (Hide learn more link)"),s.qZA(),s.YNc(6,Jl,2,2,"option",25),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw(2);s.xp6(3),s.Q6J("ngModel",n.state.client["cookie_notice.learn_more"]),s.xp6(3),s.Q6J("ngForOf",e.items)}}function Rl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",15),s.YNc(1,Nl,7,2,"div",16),s.ALo(2,"async"),s.TgZ(3,"div",17),s.TgZ(4,"div",17),s.TgZ(5,"label",18),s._uU(6,"Cookie Notice Position"),s.qZA(),s.TgZ(7,"select",19),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.client["cookie_notice.position"]=t}),s.TgZ(8,"option",20),s._uU(9,"Top"),s.qZA(),s.TgZ(10,"option",21),s._uU(11,"Bottom"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf",s.lcZ(2,2,e.customPages$)),s.xp6(6),s.Q6J("ngModel",e.state.client["cookie_notice.position"])}}function Ql(e,t){if(1&e&&s._UZ(0,"input",39),2&e){const e=s.oxw().index;s.MGl("id","policy-action-",e,"")}}function Fl(e,t){if(1&e&&(s.TgZ(0,"option",26),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.action),s.xp6(1),s.hij(" ",e.label," ")}}function El(e,t){if(1&e&&(s.TgZ(0,"select",40),s.YNc(1,Fl,2,2,"option",25),s.ALo(2,"async"),s.qZA()),2&e){const e=s.oxw().index,t=s.oxw();s.MGl("id","policy-action-",e,""),s.xp6(1),s.Q6J("ngForOf",s.lcZ(2,2,t.customPages$).items)}}function Yl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"li",27),s.TgZ(1,"div",17),s.TgZ(2,"label",28),s.TgZ(3,"span",6),s._uU(4,"Name"),s.qZA(),s.TgZ(5,"button",29),s.NdJ("click",function(){const t=s.CHM(e).index;return s.oxw().removeRegisterPolicy(t)}),s._UZ(6,"mat-icon",30),s.qZA(),s.qZA(),s._UZ(7,"input",31),s.qZA(),s.TgZ(8,"div",17),s.TgZ(9,"label",32),s._uU(10,"Link"),s.qZA(),s.TgZ(11,"div",33),s.TgZ(12,"select",34),s.NdJ("change",function(){const t=s.CHM(e).$implicit;return s.oxw().onPolicyTypeChange(t)}),s.TgZ(13,"option",35),s._uU(14,"Page"),s.qZA(),s.TgZ(15,"option",36),s._uU(16,"Link"),s.qZA(),s.qZA(),s.YNc(17,Ql,1,1,"input",37),s.YNc(18,El,3,4,"select",38),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=t.index;s.Q6J("formGroup",e),s.xp6(2),s.MGl("for","policy-name-",n,""),s.xp6(3),s.Q6J("disableRipple",!0),s.xp6(2),s.MGl("id","policy-name-",n,""),s.xp6(2),s.MGl("for","policy-action-",n,""),s.xp6(3),s.MGl("id","policy-type-",n,""),s.xp6(5),s.Q6J("ngIf","link"===e.value.type),s.xp6(1),s.Q6J("ngIf","page"===e.value.type)}}function Ll(e,t){1&e&&s._UZ(0,"mat-progress-bar",41)}let $l=(()=>{class e extends vt{constructor(){super(...arguments),this.customPages$=new c.X({name:"",items:[]}),this.registerPolicies=new a.Oe([])}ngOnInit(){this.valueLists.get(["menuItemCategories"]).subscribe(e=>{this.customPages$.next(e.menuItemCategories.find(e=>"Custom Page"===e.name))}),this.settings.getJson("register_policies",[]).forEach(e=>{this.addRegisterPolicy(e)})}saveSettings(){const e=this.state.getModified();e.client.register_policies=JSON.stringify(this.registerPolicies.value),super.saveSettings(e)}addRegisterPolicy(e={}){this.registerPolicies.push(new a.cw({label:new a.NI(e.label||""),action:new a.NI(e.action||this.getFirstCustomPageAction()),type:new a.NI(e.type||"page")}))}removeRegisterPolicy(e){this.registerPolicies.removeAt(e)}onPolicyTypeChange(e){e.get("action").reset(),"page"===e.get("type").value&&e.get("action").setValue(this.getFirstCustomPageAction())}getFirstCustomPageAction(){return this.customPages$.value.items[0]&&this.customPages$.value.items[0].action}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["gdpr-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:27,vars:9,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["ngNativeValidate","",1,"body","many-inputs",3,"ngSubmit"],[1,"setting-toggle-container"],["name","cookie_notice.enable","id","cookie_notice.enable","trans","",3,"ngModel","ngModelChange"],["trans",""],["class","error-group many-inputs",4,"ngIf"],[1,"error-group","no-border-top","no-bottom-border","policies-group"],["type","button","mat-icon-button","","color","accent",1,"add-policy-button",3,"click"],["svgIcon","add"],[1,"unstyled-list"],["class","many-inputs policy-list-item",3,"formGroup",4,"ngFor","ngForOf"],["mat-raised-button","","color","accent","type","submit","trans","",1,"button","primary","update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],[1,"error-group","many-inputs"],["class","input-container",4,"ngIf"],[1,"input-container"],["for","cookie-notice-position","trans",""],["id","cookie-notice-position","name","cookie-notice-position",3,"ngModel","ngModelChange"],["value","top","trans",""],["value","bottom","trans",""],["for","cookie_notice.learn_more"],["id","cookie_notice.learn_more","name","cookie_notice.learn_more",3,"ngModel","ngModelChange"],["value","","trans",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"many-inputs","policy-list-item",3,"formGroup"],[1,"policy-name-label",3,"for"],["mat-icon-button","","color","warn",3,"disableRipple","click"],["svgIcon","remove"],["type","text","formControlName","label","required","",3,"id"],["trans","",3,"for"],[1,"inline-inputs"],["formControlName","type",1,"policy-type-select",3,"id","change"],["value","page","trans",""],["value","link","trans",""],["type","url","class","policy-action-input","formControlName","action","placeholder","Optional...","trans-placeholder","",3,"id",4,"ngIf"],["class","policy-action-input","formControlName","action",3,"id",4,"ngIf"],["type","url","formControlName","action","placeholder","Optional...","trans-placeholder","",1,"policy-action-input",3,"id"],["formControlName","action",1,"policy-action-input",3,"id"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"GDPR"),s.qZA(),s.TgZ(3,"div",2),s._uU(4," Configure settings related to EU General Data Protection Regulation. "),s.qZA(),s.qZA(),s.TgZ(5,"form",3),s.NdJ("ngSubmit",function(){return t.saveSettings()}),s.TgZ(6,"div",4),s.TgZ(7,"mat-slide-toggle",5),s.NdJ("ngModelChange",function(e){return t.state.client["cookie_notice.enable"]=e}),s._uU(8,"Enable Cookie Notice"),s.qZA(),s.TgZ(9,"p",6),s._uU(10," Whether cookie notice should be shown automatically to users from EU until it is accepted. "),s.qZA(),s.qZA(),s.YNc(11,Rl,12,4,"div",7),s.TgZ(12,"div",8),s.TgZ(13,"h2"),s.TgZ(14,"span"),s._uU(15,"Registration Page Policies"),s.qZA(),s.TgZ(16,"button",9),s.NdJ("click",function(){return t.addRegisterPolicy()}),s._UZ(17,"mat-icon",10),s.qZA(),s.qZA(),s.TgZ(18,"p",6),s._uU(19," Here you can create policies that will be shown on registration page and user will be required to accept them by toggling a checkbox. "),s.qZA(),s.TgZ(20,"ul",11),s.YNc(21,Yl,19,8,"li",12),s.qZA(),s.qZA(),s.TgZ(22,"button",13),s.ALo(23,"async"),s._uU(24," Update "),s.qZA(),s.YNc(25,Ll,1,0,"mat-progress-bar",14),s.ALo(26,"async"),s.qZA()),2&e&&(s.xp6(7),s.Q6J("ngModel",t.state.client["cookie_notice.enable"]),s.xp6(4),s.Q6J("ngIf",t.state.client["cookie_notice.enable"]),s.xp6(10),s.Q6J("ngForOf",t.registerPolicies.controls),s.xp6(1),s.Q6J("disabled",s.lcZ(23,5,t.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(26,7,t.state.loading$)))},directives:[Zt.P,a.JL,a.F,T.Rr,a.JJ,a.On,i.O5,p.lW,P.Hw,i.sg,a.EJ,a.YN,a.Kr,a.sg,a.Fj,a.u,a.Q7,C.pW],pipes:[i.Ov],styles:[".error-group[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:0}.add-policy-button[_ngcontent-%COMP%]{flex-shrink:0;margin-left:auto}.inline-inputs[_ngcontent-%COMP%]{display:flex}.input-container[_ngcontent-%COMP%]   .policy-type-select[_ngcontent-%COMP%]{max-width:100px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.policy-action-input[_ngcontent-%COMP%]{border-bottom-left-radius:0;border-top-left-radius:0}.policy-list-item[_ngcontent-%COMP%]:not(:last-of-type){border-bottom:1px solid var(--be-divider-lighter);margin-bottom:20px}.policies-group[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--be-secondary-text);margin:0 0 20px}.policy-name-label[_ngcontent-%COMP%]{display:flex;align-items:center}.policy-name-label[_ngcontent-%COMP%]   .mat-icon-button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0;width:20px;height:20px;line-height:20px}"],changeDetection:0}),e})(),Vl=(()=>{class e{constructor(e){this.http=e}index(t){return this.http.get(e.BASE_URI,t)}create(t){return this.http.post(e.BASE_URI,t)}update(t,n){return this.http.put(`${e.BASE_URI}/${t}`,n)}delete(t){return this.http.delete(`${e.BASE_URI}/${t}`)}}return e.BASE_URI="tags",e.\u0275fac=function(t){return new(t||e)(s.LFG(o.r))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function Hl(e,t){1&e&&(s.TgZ(0,"span",10),s._uU(1,"Update Tag"),s.qZA())}function zl(e,t){1&e&&(s.TgZ(0,"span",10),s._uU(1,"Create a New Tag"),s.qZA())}function Bl(e,t){if(1&e&&(s.TgZ(0,"div",19),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Oqu(e.errors.name)}}function jl(e,t){if(1&e&&(s.TgZ(0,"div",19),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Oqu(e.errors.display_name)}}function Gl(e,t){if(1&e&&(s.TgZ(0,"option",20),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.name),s.xp6(1),s.Oqu(e.name)}}function Xl(e,t){if(1&e&&(s.TgZ(0,"div",19),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Oqu(e.errors.type)}}function Wl(e,t){1&e&&(s.TgZ(0,"span",10),s._uU(1,"Update"),s.qZA())}function Kl(e,t){1&e&&(s.TgZ(0,"span",10),s._uU(1,"Create"),s.qZA())}let ec=(()=>{class e{constructor(e,t,n,i,s){this.dialogRef=e,this.data=t,this.toast=n,this.tags=i,this.settings=s,this.errors={},this.isSystemTag=!1,this.form=new a.cw({name:new a.NI(""),display_name:new a.NI(""),type:new a.NI("")}),this.hydrate()}close(e){this.errors={},this.dialogRef.close(e)}hydrate(){var e,t,n;this.tagTypes=this.settings.get("vebto.admin.tagTypes",[]),this.data.tag?this.form.patchValue(this.data.tag):this.form.get("type").patchValue(this.data.forceType||(null===(e=this.tagTypes[0])||void 0===e?void 0:e.name)||"");const i=this.data.forceType||(null===(t=this.data.tag)||void 0===t?void 0:t.type);this.isSystemTag=null===(n=this.tagTypes.find(e=>e.name===i))||void 0===n?void 0:n.system,(this.isSystemTag||this.data.forceType)&&this.form.get("type").disable(),this.isSystemTag&&this.form.get("name").disable()}confirm(){(this.data.tag?this.tags.update(this.data.tag.id,this.form.getRawValue()):this.tags.create(this.form.getRawValue())).subscribe(e=>{this.toast.open("Tag "+(this.data.tag?"Updated":"Created")),this.close(e.tag)},e=>this.errors=e.errors)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(m.so),s.Y36(m.WI),s.Y36(ht.F),s.Y36(Vl),s.Y36(st.Z))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-tag-modal"]],decls:34,vars:9,consts:[[1,"modal-header"],["mat-dialog-title",""],["trans","",4,"ngIf"],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],["autocomplete","off","ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"many-inputs"],[1,"input-container"],["for","crupdate-tag-modal-name","trans",""],["type","text","id","crupdate-tag-modal-name","formControlName","name","required",""],["trans",""],["class","error",4,"ngIf"],["for","display_name","trans",""],["type","text","formControlName","display_name","id","display_name"],["for","crupdate_tag_modal_type","trans",""],["formControlName","type","id","crupdate_tag_modal_type","required","",1,"capitalize"],["trans","",3,"value",4,"ngFor","ngForOf"],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"submit-button"],[1,"error"],["trans","",3,"value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s.YNc(2,Hl,2,0,"span",2),s.YNc(3,zl,2,0,"span",2),s.qZA(),s.TgZ(4,"button",3),s.NdJ("click",function(){return t.close()}),s._UZ(5,"mat-icon",4),s.qZA(),s.qZA(),s.TgZ(6,"form",5),s.NdJ("ngSubmit",function(){return t.confirm()}),s.TgZ(7,"mat-dialog-content",6),s.TgZ(8,"div",7),s.TgZ(9,"label",8),s._uU(10,"Name"),s.qZA(),s._UZ(11,"input",9),s.TgZ(12,"p",10),s._uU(13,"Unique tag identifier."),s.qZA(),s.YNc(14,Bl,2,1,"div",11),s.qZA(),s.TgZ(15,"div",7),s.TgZ(16,"label",12),s._uU(17,"Display Name"),s.qZA(),s._UZ(18,"input",13),s.TgZ(19,"p",10),s._uU(20,"User friendly tag name."),s.qZA(),s.YNc(21,jl,2,1,"div",11),s.qZA(),s.TgZ(22,"div",7),s.TgZ(23,"label",14),s._uU(24,"Type"),s.qZA(),s.TgZ(25,"select",15),s.YNc(26,Gl,2,2,"option",16),s.qZA(),s.YNc(27,Xl,2,1,"div",11),s.qZA(),s.qZA(),s.TgZ(28,"mat-dialog-actions"),s.TgZ(29,"button",17),s.NdJ("click",function(){return t.close()}),s._uU(30,"Cancel"),s.qZA(),s.TgZ(31,"button",18),s.YNc(32,Wl,2,0,"span",2),s.YNc(33,Kl,2,0,"span",2),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(2),s.Q6J("ngIf",t.data.tag),s.xp6(1),s.Q6J("ngIf",!t.data.tag),s.xp6(3),s.Q6J("formGroup",t.form),s.xp6(8),s.Q6J("ngIf",t.errors.name),s.xp6(7),s.Q6J("ngIf",t.errors.display_name),s.xp6(5),s.Q6J("ngForOf",t.tagTypes),s.xp6(1),s.Q6J("ngIf",t.errors.type),s.xp6(5),s.Q6J("ngIf",t.data.tag),s.xp6(1),s.Q6J("ngIf",!t.data.tag))},directives:[m.uh,i.O5,p.lW,P.Hw,a.JL,a.sg,m.xY,Zt.P,a.Fj,a.JJ,a.u,a.Q7,a.EJ,i.sg,m.H8,a.YN,a.Kr],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.capitalize[_ngcontent-%COMP%]{text-transform:capitalize}"]}),e})();function tc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw().showCrupdateTagModal()}),s._UZ(1,"mat-icon",16),s.TgZ(2,"span",1),s._uU(3,"Add New Tag"),s.qZA(),s.qZA()}}function nc(e,t){1&e&&s._UZ(0,"mat-progress-bar",17)}const ic=function(e){return{count:e,resource:"tag(s)"}};function ac(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"tr"),s.TgZ(1,"th",18),s.TgZ(2,"div",19),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",20),s.TgZ(5,"button",21),s.NdJ("click",function(){return s.CHM(e),s.oxw().maybeDeleteSelectedTags()}),s._uU(6," Delete "),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf,n=s.oxw();s.xp6(2),s.Q6J("transValues",s.VKq(2,ic,e)),s.xp6(3),s.Q6J("disabled",!n.currentUser.hasPermission("tags.delete"))}}function sc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",29),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().showCrupdateTagModal(t)}),s.ALo(1,"trans"),s._UZ(2,"mat-icon",30),s.qZA()}2&e&&s.Q6J("matTooltip",s.lcZ(1,1,"Edit tag"))}function oc(e,t){if(1&e&&(s.TgZ(0,"tr"),s._UZ(1,"td",22),s.TgZ(2,"td",23),s._uU(3),s.qZA(),s.TgZ(4,"td",24),s._uU(5),s.qZA(),s.TgZ(6,"td",25),s._uU(7),s.qZA(),s.TgZ(8,"td",26),s._uU(9),s.ALo(10,"formattedDate"),s.qZA(),s.TgZ(11,"td",27),s.YNc(12,sc,3,3,"button",28),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Oqu(e.name),s.xp6(2),s.Oqu(e.type),s.xp6(2),s.Oqu(e.display_name),s.xp6(2),s.hij(" ",e.updated_at?s.lcZ(10,6,e.updated_at):"-"," "),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("tags.update"))}}function rc(e,t){1&e&&(s.TgZ(0,"no-results-message",31),s.TgZ(1,"span",32),s._uU(2,"No tags have been created yet"),s.qZA(),s.qZA())}let lc=(()=>{class e{constructor(e,t,n,i){var a;this.tags=e,this.currentUser=t,this.datatable=n,this.settings=i,this.filters=(a=this.settings.get("vebto.admin.tagTypes"),[new ds.XQ({type:ds.Bq.Select,key:"type",description:"Type of the link",defaultValue:a[0].name,options:a.map(e=>({key:e.name,value:e.name}))}),new us.T7({description:"Date tag was created"}),new us.yH({description:"Date tag was last updated"})]),this.tags$=this.datatable.data$}ngOnInit(){this.datatable.init({uri:Vl.BASE_URI})}maybeDeleteSelectedTags(){this.datatable.confirmResourceDeletion("tags").subscribe(()=>{this.tags.delete(this.datatable.selectedRows$.value).subscribe(()=>{this.datatable.reset()})})}showCrupdateTagModal(e){this.datatable.openCrupdateResourceModal(ec,{tag:e}).subscribe()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Vl),s.Y36(Wi.I),s.Y36(cs.x),s.Y36(st.Z))},e.\u0275cmp=s.Xpm({type:e,selectors:[["tags"]],features:[s._Bn([cs.x])],decls:31,vars:12,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","tags",3,"filters"],[1,"action-buttons"],["mat-raised-button","","color","accent","class","button-with-icon",3,"click",4,"ngIf"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","updated_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","folder.svg",4,"ngIf"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"click"],["svgIcon","add"],["mode","indeterminate","color","accent",1,"loading-bar"],["colspan","6"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["type","button","mat-raised-button","","color","warn","trans","",3,"disabled","click"],[3,"table-body-checkbox"],["data-label","Name"],["data-label","Type"],["data-label","Display Name"],["data-label","Last Updated"],[1,"edit-column"],["mat-icon-button","",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["svgImage","folder.svg"],["primary-text","","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s.TgZ(2,"span",1),s._uU(3,"Tags"),s.qZA(),s.qZA(),s.TgZ(4,"div",2),s._UZ(5,"datatable-filters",3),s.TgZ(6,"div",4),s.YNc(7,tc,4,0,"button",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",6),s.YNc(9,nc,1,0,"mat-progress-bar",7),s.ALo(10,"async"),s.TgZ(11,"table",8),s.TgZ(12,"thead"),s.TgZ(13,"tr"),s._UZ(14,"th",9),s.TgZ(15,"th",10),s._uU(16,"Name"),s.qZA(),s.TgZ(17,"th",10),s._uU(18,"Type"),s.qZA(),s.TgZ(19,"th",10),s._uU(20,"Display Name"),s.qZA(),s.TgZ(21,"th",11),s._uU(22,"Last Updated"),s.qZA(),s._UZ(23,"th"),s.qZA(),s.YNc(24,ac,7,4,"tr",12),s.qZA(),s.TgZ(25,"tbody"),s.YNc(26,oc,13,8,"tr",13),s.ALo(27,"async"),s.qZA(),s.qZA(),s.YNc(28,rc,3,0,"no-results-message",14),s.ALo(29,"async"),s._UZ(30,"datatable-footer"),s.qZA()),2&e&&(s.xp6(5),s.Q6J("filters",t.filters),s.xp6(2),s.Q6J("ngIf",t.currentUser.hasPermission("tags.create")),s.xp6(2),s.Q6J("ngIf",s.lcZ(10,6,t.datatable.paginator&&t.datatable.paginator.loading$)),s.xp6(15),s.Q6J("ngIf",t.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(27,8,t.tags$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(29,10,t.datatable.paginator.noResults$)))},directives:[Zt.P,fs.h,i.O5,bs,vs.p,i.sg,Zs.V,p.lW,P.Hw,C.pW,ys,k.gM,ws.U],pipes:[i.Ov,mn.l,lt.R],encapsulation:2}),e})();var cc=n(76251);const dc=[new us.yH({description:"Date the page was last updated"}),new us.T7({description:"Date the page was created"}),new ds.XQ({type:ds.Bq.SelectModel,key:"user_id",label:"User",description:"User page was created by",component:Xs.y})];function uc(e,t){1&e&&(s.TgZ(0,"a",17),s._UZ(1,"mat-icon",18),s.TgZ(2,"span",1),s._uU(3,"Add New Page"),s.qZA(),s.qZA())}function pc(e,t){1&e&&s._UZ(0,"mat-progress-bar",19)}function gc(e,t){1&e&&(s.TgZ(0,"th",20),s._uU(1,"Type"),s.qZA())}const hc=function(e){return{count:e,resource:"page(s)"}};function mc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"tr"),s.TgZ(1,"th",21),s.TgZ(2,"div",22),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",23),s.TgZ(5,"button",24),s.NdJ("click",function(){return s.CHM(e),s.oxw().maybeDeleteSelectedPages()}),s._uU(6," Delete "),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.ngIf;s.xp6(2),s.Q6J("transValues",s.VKq(1,hc,e))}}function fc(e,t){if(1&e&&(s.TgZ(0,"td",37),s._uU(1),s.qZA()),2&e){const e=s.oxw().$implicit,t=s.oxw();s.xp6(1),s.hij(" ",e.type?t.viewName(e.type):"default"," ")}}const _c=function(e){return[e,"edit"]};function bc(e,t){if(1&e&&(s.TgZ(0,"a",38),s.ALo(1,"trans"),s._UZ(2,"mat-icon",39),s.qZA()),2&e){const e=s.oxw().$implicit;s.Q6J("routerLink",s.VKq(4,_c,e.id))("matTooltip",s.lcZ(1,2,"Edit page"))}}function vc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"tr"),s._UZ(1,"td",25),s.TgZ(2,"td",26),s.TgZ(3,"a",27),s._uU(4),s.qZA(),s.qZA(),s.TgZ(5,"td",28),s._UZ(6,"user-column",29),s.qZA(),s.TgZ(7,"td",30),s._uU(8),s.qZA(),s.YNc(9,fc,2,1,"td",31),s.TgZ(10,"td",32),s._uU(11),s.ALo(12,"formattedDate"),s.qZA(),s.TgZ(13,"td",33),s.YNc(14,bc,3,6,"a",34),s.TgZ(15,"button",35),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().maybeDeleteSelectedPages([t.id])}),s._UZ(16,"mat-icon",36),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Q6J("href",n.getPageUrl(e),s.LSH),s.xp6(1),s.Oqu(e.slug),s.xp6(2),s.Q6J("user",e.user),s.xp6(2),s.Oqu(e.body),s.xp6(1),s.Q6J("ngIf",!n.endpoint),s.xp6(2),s.Oqu(s.lcZ(12,8,e.updated_at)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("custom_pages.update"))}}function Zc(e,t){1&e&&(s.TgZ(0,"no-results-message",40),s.TgZ(1,"span",41),s._uU(2,"No pages have been created yet"),s.qZA(),s.qZA())}let xc=(()=>{class e{constructor(e,t,n,i,a,s,o){this.settings=e,this.datatable=t,this.currentUser=n,this.customPages=i,this.toast=a,this.router=s,this.route=o,this.endpoint=this.route.snapshot.data.endpoint,this.filters=dc,this.pages$=this.datatable.data$}ngOnInit(){this.datatable.init({uri:this.endpoint||cc.i.BASE_URI,staticParams:{with:["user"]}})}maybeDeleteSelectedPages(e){this.datatable.confirmResourceDeletion("tracking pixels").subscribe(()=>{this.customPages.delete(e||this.datatable.selectedRows$.value).subscribe(()=>{this.datatable.reset(),this.toast.open("Pages deleted")},e=>{this.toast.open(e.message||Gi.v.Default)})})}showUserColumn(){return this.router.url.indexOf("admin")>-1}getPageUrl(e){return this.settings.getBaseUrl()+"/pages/"+e.id+"/"+e.slug}viewName(e){return e.replace(/_/g," ")}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z),s.Y36(cs.x),s.Y36(Wi.I),s.Y36(cc.i),s.Y36(ht.F),s.Y36(r.F0),s.Y36(r.gz))},e.\u0275cmp=s.Xpm({type:e,selectors:[["custom-pages-index"]],features:[s._Bn([cs.x])],decls:32,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","pages",3,"filters"],[1,"action-buttons"],["mat-raised-button","","color","accent","routerLink","new","class","button-with-icon",4,"ngIf"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans",""],["trans","",1,"body-column"],["class","type-column","table-sort-header","","trans","",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","custom-page.svg",4,"ngIf"],["mat-raised-button","","color","accent","routerLink","new",1,"button-with-icon"],["svgIcon","add"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","","trans","",1,"type-column"],["colspan","7"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Slug"],["target","_blank",3,"href"],["data-label","Owner"],[3,"user"],["data-label","Body",1,"body-column"],["data-label","Type","class","type-column",4,"ngIf"],["data-label","Last Updated"],[1,"edit-column"],["mat-icon-button","",3,"routerLink","matTooltip",4,"ngIf"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Type",1,"type-column"],["mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","edit"],["svgImage","custom-page.svg"],["primary-text","","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s.TgZ(2,"span",1),s._uU(3,"Custom Pages"),s.qZA(),s.qZA(),s.TgZ(4,"div",2),s._UZ(5,"datatable-filters",3),s.TgZ(6,"div",4),s.YNc(7,uc,4,0,"a",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",6),s.YNc(9,pc,1,0,"mat-progress-bar",7),s.ALo(10,"async"),s.TgZ(11,"table",8),s.TgZ(12,"thead"),s.TgZ(13,"tr"),s._UZ(14,"th",9),s.TgZ(15,"th",10),s._uU(16,"Slug"),s.qZA(),s.TgZ(17,"th",11),s._uU(18,"Owner"),s.qZA(),s.TgZ(19,"th",12),s._uU(20,"Body"),s.qZA(),s.YNc(21,gc,2,0,"th",13),s.TgZ(22,"th",1),s._uU(23,"Last Updated"),s.qZA(),s._UZ(24,"th"),s.qZA(),s.YNc(25,mc,7,3,"tr",14),s.qZA(),s.TgZ(26,"tbody"),s.YNc(27,vc,17,10,"tr",15),s.ALo(28,"async"),s.qZA(),s.qZA(),s.YNc(29,Zc,3,0,"no-results-message",16),s.ALo(30,"async"),s._UZ(31,"datatable-footer"),s.qZA()),2&e&&(s.xp6(5),s.Q6J("filters",t.filters),s.xp6(2),s.Q6J("ngIf",t.currentUser.hasPermission("custom_pages.create")),s.xp6(2),s.Q6J("ngIf",s.lcZ(10,7,t.datatable.paginator&&t.datatable.paginator.loading$)),s.xp6(12),s.Q6J("ngIf",!t.endpoint),s.xp6(4),s.Q6J("ngIf",t.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(28,9,t.pages$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(30,11,t.datatable.paginator.noResults$)))},directives:[Zt.P,fs.h,i.O5,bs,vs.p,i.sg,Zs.V,p.zs,r.yS,P.Hw,C.pW,p.lW,ys,As.r,k.gM,ws.U],pipes:[i.Ov,mn.l,lt.R],styles:[".body-column[_ngcontent-%COMP%]{margin-right:25px;overflow:hidden}.type-column[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),e})();var yc=n(71289),Ac=n(64762),wc=n(35402);let Cc=(()=>{class e{constructor(e,t,n,i,a){this.settings=e,this.zone=t,this.lazyLoader=n,this.breakpoints=i,this.i18n=a,this.makeBootstrapPromise()}reset(){this.editorIsReady()&&(this.tinymceInstance.setContent(""),this.tinymceInstance.undoManager.clear())}focus(){this.waitForEditor().then(()=>{this.tinymceInstance.focus(!1)})}hasUndo(){return this.editorIsReady()&&this.tinymceInstance.undoManager.hasUndo()}hasRedo(){return this.editorIsReady()&&this.tinymceInstance.undoManager.hasRedo()}queryCommandState(e){return this.editorIsReady()&&this.tinymceInstance.queryCommandState(e)}execCommand(e,t=null){this.waitForEditor().then(()=>{this.zone.run(()=>{this.tinymceInstance.execCommand(e,!1,t)})})}getContents(e){return this.editorIsReady()?this.tinymceInstance.getContent(e):""}setContents(e){this.waitForEditor().then(()=>{this.tinymceInstance.undoManager&&(this.tinymceInstance.undoManager.transact(()=>{this.tinymceInstance.setContent(e)}),this.tinymceInstance.selection.setCursorLocation(),this.tinymceInstance.nodeChanged(),this.tinymceInstance.execCommand("mceResize"))})}insertContents(e){this.waitForEditor().then(()=>{this.tinymceInstance.execCommand("mceInsertContent",!1,e),setTimeout(()=>this.tinymceInstance.selection.collapse())})}insertImage(e){this.waitForEditor().then(()=>{this.insertContents('<img src="'+e+'"/>'),setTimeout(()=>this.execCommand("mceAutoResize"),500)})}waitForEditor(){return this.tinymceInstance?new Promise(e=>e(this.tinymceInstance)):this.bootstrapPromise?this.bootstrapPromise:void 0}setConfig(e){this.config=e,this.loadTinymce().then(()=>{this.initTinymce()})}editorIsReady(){return!this.bootstrapPromise&&!!this.tinymceInstance&&!!this.tinymceInstance.undoManager}loadTinymce(){return this.lazyLoader.loadAsset("js/tinymce/tinymce.min.js",{type:"js"})}initTinymce(){const e={target:this.config.textAreaEl.nativeElement,plugins:["link","codesample","paste","autoresize"],branding:!1,browser_spellcheck:!0,max_height:this.config.maxHeight,min_height:this.config.minHeight,autoresize_on_init:!1,paste_as_text:!0,elementpath:!1,statusbar:!1,entity_encoding:"raw",menubar:!1,toolbar:!1,convert_urls:!1,forced_root_block:!1,document_base_url:document.baseURI,element_format:"html",body_class:"editor-body",content_style:'html {font-size: 62.5%;}\n.editor-body {font-size: 1.4rem;font-family: "Roboto", "Helvetica Neue", sans-serif;color: rgba(0, 0, 0, .87);}\nimg {max-width: 100%}\ncode[class*=language-], pre[class*=language-] {font-size: inherit;} .mce-preview-object {border: none;}',content_css:["https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"],default_link_target:"_blank",link_assume_external_targets:!0,target_list:!1,link_title:!1,image_dimensions:!1,image_description:!1,setup:e=>{this.tinymceInstance=e,e.on("change",()=>this.config.onChange.emit(e.getContent())),e.on("click",()=>{this.zone.run(()=>{})})},init_instance_callback:e=>{this.bootstrapPromise=!1,this.bootstrapPromiseResolve(this.tinymceInstance);const t=()=>{this.zone.run(()=>{this.config.onChange.emit(e.getContent()),this.config.onCtrlEnter.emit()})};e.shortcuts.add("ctrl+13","desc",t),window.navigator.platform.toLowerCase().includes("mac")&&e.shortcuts.add("meta+13","desc",t)}};if(this.config.showAdvancedControls&&(e.plugins=e.plugins.concat(["media","hr","visualblocks","visualchars","wordcount"]),e.forced_root_block="p",e.statusbar=!0,e.autoresize_on_init=!0,e.extended_valid_elements="svg[*],use[*],iframe[src|frameborder|width|height|allow=*|allowfullscreen],script[src]",e.elementpath=!0,e.content_css.push(this.settings.getAssetUrl()+"css/advanced-editor-styles.css"),e.target_list=[{title:this.i18n.t("Current window"),value:""},{title:this.i18n.t("New Window"),value:"_blank"}],e.codesample_languages=[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"Shell",value:"shell-session"},{text:"Bash",value:"bash"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]),"auto"===this.config.minHeight){const t=this.config.editorEl.nativeElement.parentElement.offsetHeight-74-4;e.min_height=t,e.max_height=t}tinymce.init(e)}destroyEditor(){try{this.tinymceInstance&&this.tinymceInstance.remove(),this.tinymceInstance=null,this.makeBootstrapPromise()}catch(e){}}makeBootstrapPromise(){this.bootstrapPromise=new Promise(e=>this.bootstrapPromiseResolve=e)}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(st.Z),s.LFG(s.R0b),s.LFG(wc.j),s.LFG(At.S),s.LFG(jo.Z))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Tc=n(75978),qc=n(13913),kc=n(18715),Mc=n(68756),Ic=n(82655);let Uc=(()=>{class e extends kc.c{constructor(){super(...arguments),this.DEFAULT_MAX_SIZE_MB=3}initValidations(){const e=[new Mc.p({maxSize:(0,ui.F)(this.DEFAULT_MAX_SIZE_MB,"MB")},this.i18n),new Ic.p({types:["image"]},this.i18n)];this.validations.push(...e)}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const Oc=["visualArea"],Dc=["sourceArea"];function Pc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",3),s.TgZ(1,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().openFileUploadDialog()}),s.ALo(2,"trans"),s._UZ(3,"mat-icon",19),s.qZA(),s.qZA()}2&e&&(s.xp6(1),s.Q6J("matTooltip",s.lcZ(2,1,"Add Attachment")))}function Sc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",3),s.TgZ(1,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("codesample")}),s.ALo(2,"trans"),s._UZ(3,"mat-icon",20),s.qZA(),s.qZA()}2&e&&(s.xp6(1),s.Q6J("matTooltip",s.lcZ(2,1,"Insert Code Sample")))}function Jc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",23),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).openInsertImageModal()}),s.ALo(1,"trans"),s._UZ(2,"mat-icon",24),s.qZA()}2&e&&s.Q6J("matTooltip",s.lcZ(1,1,"Insert Image"))}function Nc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",3),s.TgZ(1,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("mceLink")}),s.ALo(2,"trans"),s._UZ(3,"mat-icon",21),s.qZA(),s.YNc(4,Jc,3,3,"button",22),s.qZA()}if(2&e){const e=s.oxw();s.xp6(1),s.ekj("active",e.queryCommandState("link")),s.Q6J("matTooltip",s.lcZ(2,4,"Insert Link")),s.xp6(3),s.Q6J("ngIf",e.currentUser.hasPermission("files.create"))}}function Rc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",1),s.TgZ(1,"div",3),s.TgZ(2,"button",25),s.TgZ(3,"span",26),s._uU(4,"Insert"),s.qZA(),s._UZ(5,"mat-icon",27),s.qZA(),s.TgZ(6,"mat-menu",null,28),s.TgZ(8,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("InsertHorizontalRule")}),s._UZ(9,"mat-icon",30),s.TgZ(10,"span",26),s._uU(11,"Horizontal Line"),s.qZA(),s.qZA(),s.TgZ(12,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("mceLink")}),s._UZ(13,"mat-icon",21),s.TgZ(14,"span",26),s._uU(15,"Link"),s.qZA(),s.qZA(),s.TgZ(16,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("mceMedia")}),s._UZ(17,"mat-icon",31),s.TgZ(18,"span",26),s._uU(19,"Media"),s.qZA(),s.qZA(),s.TgZ(20,"div",32),s.NdJ("click",function(){return s.CHM(e),s.oxw().insertInfoContainer("important")}),s._UZ(21,"mat-icon",33),s.TgZ(22,"span",26),s._uU(23,"Important"),s.qZA(),s.qZA(),s.TgZ(24,"div",32),s.NdJ("click",function(){return s.CHM(e),s.oxw().insertInfoContainer("warning")}),s._UZ(25,"mat-icon",34),s.TgZ(26,"span",26),s._uU(27,"Warning"),s.qZA(),s.qZA(),s.TgZ(28,"div",32),s.NdJ("click",function(){return s.CHM(e),s.oxw().insertInfoContainer("note")}),s._UZ(29,"mat-icon",35),s.TgZ(30,"span",26),s._uU(31,"Note"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(32,"div",3),s.TgZ(33,"button",36),s.TgZ(34,"span",26),s._uU(35,"Format"),s.qZA(),s._UZ(36,"mat-icon",27),s.qZA(),s.TgZ(37,"mat-menu",37,38),s.TgZ(39,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("FormatBlock","h1")}),s.TgZ(40,"div",39),s._uU(41,"Heading 1"),s.qZA(),s.TgZ(42,"div",40),s._uU(43,"Alt+Shift+1"),s.qZA(),s.qZA(),s.TgZ(44,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("FormatBlock","h2")}),s.TgZ(45,"div",39),s._uU(46,"Heading 2"),s.qZA(),s.TgZ(47,"div",40),s._uU(48,"Alt+Shift+2"),s.qZA(),s.qZA(),s.TgZ(49,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("FormatBlock","h3")}),s.TgZ(50,"div",39),s._uU(51,"Heading 3"),s.qZA(),s.TgZ(52,"div",40),s._uU(53,"Alt+Shift+3"),s.qZA(),s.qZA(),s.TgZ(54,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("FormatBlock","h4")}),s.TgZ(55,"div",39),s._uU(56,"Heading 4"),s.qZA(),s.TgZ(57,"div",40),s._uU(58,"Alt+Shift+4"),s.qZA(),s.qZA(),s.TgZ(59,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("FormatBlock","code")}),s.TgZ(60,"div",39),s._uU(61,"Code"),s.qZA(),s.qZA(),s.TgZ(62,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("strikethrough")}),s.TgZ(63,"div",39),s._uU(64,"Strikethrough"),s.qZA(),s.qZA(),s.TgZ(65,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("superscript")}),s.TgZ(66,"div",39),s._uU(67,"Superscript"),s.qZA(),s.qZA(),s.TgZ(68,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("subscript")}),s.TgZ(69,"div",39),s._uU(70,"Subscript"),s.qZA(),s.qZA(),s.TgZ(71,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("mceBlockQuote")}),s.TgZ(72,"div",39),s._uU(73,"Blockquote"),s.qZA(),s.qZA(),s.TgZ(74,"div",29),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("FormatBlock","p")}),s.TgZ(75,"div",39),s._uU(76,"Paragraph"),s.qZA(),s.TgZ(77,"div",40),s._uU(78,"Ctrl+Shift+7"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(79,"div",3),s.TgZ(80,"button",41,42),s.TgZ(82,"span",26),s._uU(83,"Color"),s.qZA(),s._UZ(84,"mat-icon",27),s.qZA(),s.TgZ(85,"mat-menu",43,44),s.TgZ(87,"div",45),s.NdJ("click",function(){s.CHM(e);const t=s.MAs(81);return s.oxw().showColorPicker("ForeColor",t)}),s._UZ(88,"mat-icon",46),s.TgZ(89,"span",26),s._uU(90,"Text Color"),s.qZA(),s.qZA(),s.TgZ(91,"div",47),s.NdJ("click",function(){s.CHM(e);const t=s.MAs(81);return s.oxw().showColorPicker("HiliteColor",t)}),s._UZ(92,"mat-icon",48),s.TgZ(93,"span",26),s._uU(94,"Background Color"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(95,"div",3),s.TgZ(96,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("justifyLeft")}),s.ALo(97,"trans"),s._UZ(98,"mat-icon",49),s.qZA(),s.TgZ(99,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("justifyCenter")}),s.ALo(100,"trans"),s._UZ(101,"mat-icon",50),s.qZA(),s.TgZ(102,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("justifyRight")}),s.ALo(103,"trans"),s._UZ(104,"mat-icon",51),s.qZA(),s.qZA(),s.TgZ(105,"div",3),s.TgZ(106,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("Outdent")}),s.ALo(107,"trans"),s._UZ(108,"mat-icon",52),s.qZA(),s.TgZ(109,"button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().execCommand("Indent")}),s.ALo(110,"trans"),s._UZ(111,"mat-icon",53),s.qZA(),s.qZA(),s.TgZ(112,"div",54),s.TgZ(113,"button",55),s.NdJ("click",function(){return s.CHM(e),s.oxw().showVisualEditor()}),s._uU(114,"Visual "),s.qZA(),s.TgZ(115,"button",56),s.NdJ("click",function(){return s.CHM(e),s.oxw().showSourceEditor()}),s._uU(116,"Source "),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.MAs(7),t=s.MAs(38),n=s.MAs(86),i=s.oxw();s.xp6(2),s.Q6J("matMenuTriggerFor",e),s.xp6(31),s.Q6J("matMenuTriggerFor",t),s.xp6(47),s.Q6J("matMenuTriggerFor",n),s.xp6(16),s.ekj("active",i.queryCommandState("justifyLeft")),s.Q6J("matTooltip",s.lcZ(97,18,"Align Left")),s.xp6(3),s.ekj("active",i.queryCommandState("justifyCenter")),s.Q6J("matTooltip",s.lcZ(100,20,"Center")),s.xp6(3),s.ekj("active",i.queryCommandState("justifyRight")),s.Q6J("matTooltip",s.lcZ(103,22,"Align Right")),s.xp6(4),s.Q6J("matTooltip",s.lcZ(107,24,"Decrease Indent")),s.xp6(3),s.Q6J("matTooltip",s.lcZ(110,26,"Increase Indent")),s.xp6(4),s.ekj("active","visual"===i.activeEditor),s.xp6(2),s.ekj("active","source"===i.activeEditor)}}const Qc=[[["","customButtons",""]],[["","header",""]],[["","footer",""]]],Fc=["[customButtons]","[header]","[footer]"];let Ec=(()=>{class e{constructor(e,t,n,i,o,r,l,c){this.editor=e,this.currentUser=t,this.uploadQueue=n,this.settings=i,this.renderer=o,this.el=r,this.overlayPanel=l,this.imageValidator=c,this.sourceAreaControl=new a.NI,this.activeEditor="visual",this.showAdvancedControls=!1,this.basic=!1,this.minHeight=183,this.maxHeight=530,this.onChange=new s.vpe,this.onCtrlEnter=new s.vpe,this.onFileUpload=new s.vpe}ngAfterViewInit(){this.bootTextEditor()}ngOnDestroy(){this.destroyEditor()}reset(){this.editor.reset()}focus(){this.editor.focus()}hasUndo(){return this.editor.hasUndo()}hasRedo(){return this.editor.hasRedo()}queryCommandState(e){return this.editor.queryCommandState(e)}execCommand(e,t=null){this.editor.execCommand(e,t)}insertInfoContainer(e){this.insertContents(`<div class="widget widget-${e}"><div class="title">${(0,qc.z)(e)}:</div><br></div><br>`)}showColorPicker(e,t){return(0,Ac.mG)(this,void 0,void 0,function*(){const{BeColorPickerModule:i}=yield n.e(427).then(n.bind(n,75427));this.overlayPanel.open(i.components.panel,{origin:new s.SBq(t),position:Tc.x}).valueChanged().pipe((0,ul.b)(50)).subscribe(t=>{this.execCommand(e,t)})})}showVisualEditor(){this.editor.tinymceInstance.contentAreaContainer&&"visual"!==this.activeEditor&&(this.activeEditor="visual",this.renderer.setStyle(this.editor.tinymceInstance.contentAreaContainer,"display","block"),this.renderer.setStyle(this.sourceTextArea.nativeElement,"display","none"),this.editor.focus())}showSourceEditor(){this.editor.tinymceInstance.contentAreaContainer&&"source"!==this.activeEditor&&(this.activeEditor="source",this.renderer.setStyle(this.sourceTextArea.nativeElement,"height",this.editor.tinymceInstance.contentAreaContainer.offsetHeight+"px"),this.renderer.setStyle(this.sourceTextArea.nativeElement,"display","block"),this.renderer.setStyle(this.editor.tinymceInstance.contentAreaContainer,"display","none"),this.sourceAreaControl.setValue(this.editor.getContents({source_view:!0})))}openFileUploadDialog(){(0,ia.r)({multiple:!0}).then(e=>{this.onFileUpload.emit(e)})}openInsertImageModal(){const e={uri:ji.C.Image,validator:this.imageValidator,httpParams:{diskPrefix:this.inlineUploadPrefix}};(0,ia.r)({types:[na.j.image]}).then(t=>{this.uploadQueue.start(t,e).subscribe(e=>{this.insertImage(e.fileEntry.url)})})}getContents(){return this.editor.getContents()}setContents(e){this.editor.setContents(e)}insertContents(e){this.editor.insertContents(e)}insertImage(e){this.editor.insertImage(e)}insertLink(e){this.insertContents(`<a href="${e.href}" target="${e.target||"self"}">${e.text}</a>`)}destroyEditor(){this.editor.destroyEditor()}bootTextEditor(){this.editor.setConfig({textAreaEl:this.visualTextArea,editorEl:this.el,minHeight:this.minHeight,maxHeight:this.maxHeight,onChange:this.onChange,onCtrlEnter:this.onCtrlEnter,showAdvancedControls:this.showAdvancedControls})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Cc),s.Y36(Wi.I),s.Y36(ta.A),s.Y36(st.Z),s.Y36(s.Qsj),s.Y36(s.SBq),s.Y36(ao.T),s.Y36(Uc))},e.\u0275cmp=s.Xpm({type:e,selectors:[["text-editor"]],viewQuery:function(e,t){if(1&e&&(s.Gf(Oc,7),s.Gf(Dc,7)),2&e){let e;s.iGM(e=s.CRH())&&(t.visualTextArea=e.first),s.iGM(e=s.CRH())&&(t.sourceTextArea=e.first)}},inputs:{showAdvancedControls:"showAdvancedControls",basic:"basic",minHeight:"minHeight",maxHeight:"maxHeight",inlineUploadPrefix:"inlineUploadPrefix"},outputs:{onChange:"onChange",onCtrlEnter:"onCtrlEnter",onFileUpload:"onFileUpload"},features:[s._Bn([ta.A,Cc])],ngContentSelectors:Fc,decls:41,vars:47,consts:[[1,"editor-header"],[1,"toolbar-row"],["class","header-actions",4,"ngIf"],[1,"header-actions"],["type","button",1,"no-style","editor-button",3,"matTooltip","click"],["svgIcon","undo"],["svgIcon","redo"],["svgIcon","format-bold"],["svgIcon","format-italic"],["svgIcon","format-underlined"],["svgIcon","format-list-bulleted"],["svgIcon","format-list-numbered"],[1,"header-actions","last"],["svgIcon","format-clear"],["class","toolbar-row",4,"ngIf"],["rows","8",1,"source-textarea",2,"display","none",3,"formControl","blur"],["sourceArea",""],["rows","8",1,"visual-textarea"],["visualArea",""],["svgIcon","attachment"],["svgIcon","code"],["svgIcon","link"],["type","button","class","no-style editor-button image-modal-button",3,"matTooltip","click",4,"ngIf"],["type","button",1,"no-style","editor-button","image-modal-button",3,"matTooltip","click"],["svgIcon","image"],["type","button",1,"no-style","editor-button","text-button","insert-button",3,"matMenuTriggerFor"],["trans",""],["svgIcon","arrow-drop-down",1,"caret"],["insertMenu",""],["mat-menu-item","",3,"click"],["svgIcon","remove"],["svgIcon","videocam"],["mat-menu-item","","trans","",3,"click"],["svgIcon","star"],["svgIcon","warning"],["svgIcon","note"],["type","button",1,"no-style","editor-button","text-button","format-button",3,"matMenuTriggerFor"],[1,"format-menu","menu-with-alt-text"],["formatMenu",""],["trans","",1,"text"],[1,"alt-text"],["type","button",1,"no-style","editor-button","text-button","color-button",3,"matMenuTriggerFor"],["colorPickerOrigin",""],[1,"color-dropdown"],["colorMenu",""],["mat-menu-item","",1,"text-color-item",3,"click"],["svgIcon","format-color-text"],["mat-menu-item","",1,"bg-color-item",3,"click"],["svgIcon","format-color-fill"],["svgIcon","format-align-left"],["svgIcon","format-align-center"],["svgIcon","format-align-right"],["svgIcon","format-indent-decrease"],["svgIcon","format-indent-increase"],[1,"header-actions","editor-toggle-buttons"],["type","button","trans","",1,"no-style","editor-button","visual-mode-button",3,"click"],["type","button","trans","",1,"no-style","editor-button","source-mode-button",3,"click"]],template:function(e,t){1&e&&(s.F$t(Qc),s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.YNc(2,Pc,4,3,"div",2),s.YNc(3,Sc,4,3,"div",2),s.TgZ(4,"div",3),s.TgZ(5,"button",4),s.NdJ("click",function(){return t.execCommand("undo")}),s.ALo(6,"trans"),s._UZ(7,"mat-icon",5),s.qZA(),s.TgZ(8,"button",4),s.NdJ("click",function(){return t.execCommand("redo")}),s.ALo(9,"trans"),s._UZ(10,"mat-icon",6),s.qZA(),s.qZA(),s.TgZ(11,"div",3),s.TgZ(12,"button",4),s.NdJ("click",function(){return t.execCommand("bold")}),s.ALo(13,"trans"),s._UZ(14,"mat-icon",7),s.qZA(),s.TgZ(15,"button",4),s.NdJ("click",function(){return t.execCommand("italic")}),s.ALo(16,"trans"),s._UZ(17,"mat-icon",8),s.qZA(),s.TgZ(18,"button",4),s.NdJ("click",function(){return t.execCommand("underline")}),s.ALo(19,"trans"),s._UZ(20,"mat-icon",9),s.qZA(),s.qZA(),s.TgZ(21,"div",3),s.TgZ(22,"button",4),s.NdJ("click",function(){return t.execCommand("insertunorderedlist")}),s.ALo(23,"trans"),s._UZ(24,"mat-icon",10),s.qZA(),s.TgZ(25,"button",4),s.NdJ("click",function(){return t.execCommand("insertorderedlist")}),s.ALo(26,"trans"),s._UZ(27,"mat-icon",11),s.qZA(),s.qZA(),s.YNc(28,Nc,5,6,"div",2),s.Hsn(29),s.TgZ(30,"div",12),s.TgZ(31,"button",4),s.NdJ("click",function(){return t.execCommand("removeformat")}),s.ALo(32,"trans"),s._UZ(33,"mat-icon",13),s.qZA(),s.qZA(),s.Hsn(34,1),s.qZA(),s.YNc(35,Rc,117,28,"div",14),s.qZA(),s.TgZ(36,"textarea",15,16),s.NdJ("blur",function(){return t.setContents(t.sourceAreaControl.value)}),s.qZA(),s._UZ(38,"textarea",17,18),s.Hsn(40,2)),2&e&&(s.xp6(2),s.Q6J("ngIf",t.inlineUploadPrefix&&t.currentUser.hasPermission("files.create")&&t.onFileUpload.observers.length),s.xp6(1),s.Q6J("ngIf",!t.basic),s.xp6(2),s.ekj("disabled",!t.hasUndo()),s.Q6J("matTooltip",s.lcZ(6,31,"Undo")),s.xp6(3),s.ekj("disabled",!t.hasRedo()),s.Q6J("matTooltip",s.lcZ(9,33,"Redo")),s.xp6(4),s.ekj("active",t.queryCommandState("bold")),s.Q6J("matTooltip",s.lcZ(13,35,"Bold")),s.xp6(3),s.ekj("active",t.queryCommandState("italic")),s.Q6J("matTooltip",s.lcZ(16,37,"Italic")),s.xp6(3),s.ekj("active",t.queryCommandState("underline")),s.Q6J("matTooltip",s.lcZ(19,39,"Underline")),s.xp6(4),s.ekj("active",t.queryCommandState("unorderedlist")),s.Q6J("matTooltip",s.lcZ(23,41,"Unordered List")),s.xp6(3),s.ekj("active",t.queryCommandState("orderedlist")),s.Q6J("matTooltip",s.lcZ(26,43,"Ordered List")),s.xp6(3),s.Q6J("ngIf",!t.basic),s.xp6(3),s.Q6J("matTooltip",s.lcZ(32,45,"Remove Formatting")),s.xp6(4),s.Q6J("ngIf",t.showAdvancedControls),s.xp6(1),s.Udp("min-height",t.minHeight),s.Q6J("formControl",t.sourceAreaControl),s.xp6(2),s.Udp("min-height",t.minHeight))},directives:[i.O5,k.gM,P.Hw,a.Fj,a.JJ,a.oH,w.p6,Zt.P,w.VK,w.OP],pipes:[lt.R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:218px;max-height:600px;position:relative;border:1px solid var(--be-divider-default);border-radius:4px;overflow:hidden}[_nghost-%COMP%]     .editor-button{color:#788593;padding:7px;width:36px;height:36px}[_nghost-%COMP%]     .editor-button .mat-icon{height:22px;width:22px}[_nghost-%COMP%]     .editor-button .caret{display:inline-block;width:20px;height:20px;vertical-align:middle}[_nghost-%COMP%]     .editor-button.text-button{display:block;font-weight:300;font-size:1.5rem;width:auto}[_nghost-%COMP%]     .editor-button.disabled{opacity:.4}[_nghost-%COMP%]     .editor-button.active{background-color:rgba(0,0,0,.04)}[_nghost-%COMP%]     .editor-button.success{color:var(--be-accent-default)}[_nghost-%COMP%]     .editor-button:hover{background-color:rgba(0,0,0,.04)}[_nghost-%COMP%]     .editor-footer{position:relative;height:37px;flex-shrink:0;background-color:var(--be-background-alternative);border-top:1px solid var(--be-divider-default)}textarea[_ngcontent-%COMP%]{border:none;outline:none;resize:none;padding:15px}.editor-header[_ngcontent-%COMP%]{clear:both;flex:0 0 37px;background-color:var(--be-background-alternative)}.toolbar-row[_ngcontent-%COMP%]{display:flex;height:37px;border-bottom:1px solid var(--be-divider-default);overflow:hidden}  .header-actions{display:inline-block;border-right:1px solid var(--be-divider-default);height:100%;padding:0 4px}  .header-actions.right{margin-left:auto;margin-right:7px}  .header-actions.last{border-right:none}.editor-toggle-buttons[_ngcontent-%COMP%]{border-right:none;margin-left:auto;padding:0;display:flex}.editor-toggle-buttons[_ngcontent-%COMP%]   .editor-button[_ngcontent-%COMP%]{width:auto}@media only screen and (max-width:768px){.toolbar-row[_ngcontent-%COMP%]{overflow-x:auto}}"],changeDetection:0}),e})();var Yc=n(6966);function Lc(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",3),s._uU(2),s.qZA(),s.TgZ(3,"div",4),s._UZ(4,"input",5),s.qZA(),s.TgZ(5,"button",6),s.NdJ("click",function(){return s.CHM(e),s.oxw().save()}),s._uU(6," Save "),s.qZA(),s.BQk()}if(2&e){const e=s.oxw();s.xp6(2),s.Oqu(e.fullBaseUri+e.getPrefix()),s.xp6(2),s.Q6J("formControl",e.slugControl)}}function $c(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"a",8),s._uU(2),s.qZA(),s.BQk()),2&e){const e=t.ngIf;s.xp6(1),s.Q6J("href",e,s.LSH)("title",e),s.xp6(1),s.Oqu(e)}}function Vc(e,t){if(1&e){const e=s.EpF();s.YNc(0,$c,3,3,"ng-container",7),s.ALo(1,"async"),s.TgZ(2,"button",6),s.NdJ("click",function(){return s.CHM(e),s.oxw().startEditing()}),s._uU(3," Edit "),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("ngIf",e.fullBaseUri+e.getPrefix()+s.lcZ(1,1,e.slug$))}}let Hc=(()=>{class e{constructor(e){this.settings=e,this.slug$=new c.X(""),this.editing$=new c.X(!1),this.slugControl=new a.NI,this.defaultBaseUri=this.settings.getBaseUrl()+"/",this.fullBaseUri=this.defaultBaseUri}set baseUri(e){this.fullBaseUri=(e=e||this.defaultBaseUri).endsWith("/")?e:e+"/"}writeValue(e){this.slug$.next(e),this.slugControl.setValue(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}save(){this.slug$.next(this.slugControl.value),this.propagateChange(this.slug$.value),this.editing$.next(!1)}startEditing(){this.editing$.next(!0)}getPrefix(){return this.prefix?this.prefix+"/":""}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(st.Z))},e.\u0275cmp=s.Xpm({type:e,selectors:[["slug-control"]],inputs:{prefix:"prefix",baseUri:"baseUri"},features:[s._Bn([{provide:a.JU,useExisting:e,multi:!0}])],decls:5,vars:4,consts:[["svgIcon","link",1,"link-icon"],[4,"ngIf","ngIfElse"],["editButton",""],[1,"nowrap"],[1,"input-container"],["type","text",3,"formControl"],["type","button","mat-flat-button","","color","gray","trans","",1,"action-button",3,"click"],[4,"ngIf"],["target","_blank",1,"nowrap",3,"href","title"]],template:function(e,t){if(1&e&&(s._UZ(0,"mat-icon",0),s.YNc(1,Lc,7,2,"ng-container",1),s.ALo(2,"async"),s.YNc(3,Vc,4,3,"ng-template",null,2,s.W1O)),2&e){const e=s.MAs(4);s.xp6(1),s.Q6J("ngIf",s.lcZ(2,2,t.editing$))("ngIfElse",e)}},directives:[P.Hw,i.O5,a.Fj,a.JJ,a.oH,p.lW,Zt.P],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:flex;align-items:center}.input-container[_ngcontent-%COMP%]{margin-left:3px;width:auto;max-width:160px}.input-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{height:25px;padding:6px}.link-icon[_ngcontent-%COMP%]{margin-right:5px;flex-shrink:0}.action-button[_ngcontent-%COMP%]{margin-left:20px;line-height:25px}.nowrap[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),e})();function zc(e,t){if(1&e&&(s.TgZ(0,"div",19),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.title)}}function Bc(e,t){if(1&e&&(s.TgZ(0,"div",19),s._uU(1),s.qZA()),2&e){const e=s.oxw(2).ngIf;s.xp6(1),s.Oqu(e.slug)}}function jc(e,t){if(1&e&&(s.TgZ(0,"div",20),s._UZ(1,"slug-control",21),s.YNc(2,Bc,2,1,"div",6),s.qZA()),2&e){const e=s.oxw().ngIf,t=s.oxw();s.xp6(1),s.Q6J("prefix",t.slugPrefix()),s.xp6(1),s.Q6J("ngIf",e.slug)}}function Gc(e,t){1&e&&(s.TgZ(0,"span",10),s._uU(1,"Update"),s.qZA())}function Xc(e,t){1&e&&(s.TgZ(0,"span",10),s._uU(1,"Create"),s.qZA())}function Wc(e,t){if(1&e&&(s.TgZ(0,"div",19),s._uU(1),s.qZA()),2&e){const e=s.oxw().ngIf;s.xp6(1),s.Oqu(e.body)}}function Kc(e,t){if(1&e){const e=s.EpF();s.ynx(0,1),s.TgZ(1,"div",2),s.TgZ(2,"div",3),s.TgZ(3,"label",4),s._uU(4,"Page Title"),s.qZA(),s._UZ(5,"input",5),s.YNc(6,zc,2,1,"div",6),s.qZA(),s.YNc(7,jc,3,2,"div",7),s.TgZ(8,"div",8),s.TgZ(9,"mat-slide-toggle",9),s._uU(10,"Hide Navbar"),s.qZA(),s.TgZ(11,"p",10),s._uU(12,"Whether default site navbar should be hidden for this page."),s.qZA(),s.qZA(),s.qZA(),s.TgZ(13,"div",11),s.TgZ(14,"button",12),s.NdJ("click",function(){return s.CHM(e),s.oxw().crupdatePage()}),s.YNc(15,Gc,2,0,"span",13),s.YNc(16,Xc,2,0,"span",13),s.qZA(),s.TgZ(17,"a",14),s._uU(18,"Cancel"),s.qZA(),s.qZA(),s.TgZ(19,"div",15),s.YNc(20,Wc,2,1,"div",6),s.qZA(),s.TgZ(21,"div",16),s.TgZ(22,"text-editor",17),s.NdJ("onChange",function(t){return s.CHM(e),s.oxw().setBody(t)}),s.qZA(),s.qZA(),s._UZ(23,"loading-indicator",18),s.ALo(24,"async"),s.BQk()}if(2&e){const e=t.ngIf,n=s.oxw();s.Q6J("formGroup",n.form),s.xp6(6),s.Q6J("ngIf",e.title),s.xp6(1),s.Q6J("ngIf",!n.hideSlug),s.xp6(8),s.Q6J("ngIf",n.page),s.xp6(1),s.Q6J("ngIf",!n.page),s.xp6(1),s.Q6J("routerLink",n.backRoute()),s.xp6(3),s.Q6J("ngIf",e.body),s.xp6(2),s.Q6J("showAdvancedControls",!0),s.xp6(1),s.Q6J("isVisible",s.lcZ(24,9,n.loading$))}}let ed=(()=>{class e{constructor(e,t,n,i,a){this.pages=e,this.route=t,this.toast=n,this.router=i,this.fb=a,this.hideSlug=this.route.snapshot.data.hideSlug,this.endpoint=this.route.snapshot.data.endpoint,this.loading$=new c.X(!1),this.updating$=new c.X(!1),this.form=this.fb.group({title:[""],slug:[""],body:[""],type:[""],hide_nav:[!1]}),this.errors$=new c.X({})}ngOnInit(){var e;this.route.params.subscribe(e=>{this.getPage(e.id)}),this.route.snapshot.data.hideSlug||(e=this.form.get("title")).valueChanges.pipe((0,G.h)(e=>!!e),(0,Ho.x)()).subscribe(t=>{e.parent.get("slug").dirty||e.parent.get("slug").setValue((0,Yc.V)(t))})}crupdatePage(){this.loading$.next(!0),(this.updating$.value?this.pages.update(this.page.id,this.getPayload(),this.endpoint):this.pages.create(this.getPayload(),this.endpoint)).pipe((0,pt.x)(()=>this.loading$.next(!1))).subscribe(()=>{this.router.navigate(this.backRoute(),{relativeTo:this.route}),this.toast.open(this.updating$.value?"Page updated":"Page created")},e=>this.errors$.next(e.errors))}getPage(e){e&&(this.loading$.next(!0),this.pages.get(e).pipe((0,yc.g)(0)).subscribe(e=>{this.updating$.next(!0),this.page=e.page,this.form.patchValue(e.page),this.textEditor.setContents(e.page.body||""),this.loading$.next(!1)}))}getPayload(){return Object.assign({},this.form.value)}setBody(e){this.form.patchValue({body:e})}backRoute(){return this.page?["../../"]:["../"]}slugPrefix(){return"pages/"+(this.page?this.page.id:"*")}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(cc.i),s.Y36(r.gz),s.Y36(ht.F),s.Y36(r.F0),s.Y36(a.qu))},e.\u0275cmp=s.Xpm({type:e,selectors:[["crupdate-page"]],viewQuery:function(e,t){if(1&e&&s.Gf(Ec,5),2&e){let e;s.iGM(e=s.CRH())&&(t.textEditor=e.first)}},decls:2,vars:3,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"many-inputs","input-header"],[1,"input-container"],["for","page-title","trans",""],["type","text","id","page-title","formControlName","title"],["class","error",4,"ngIf"],["class","input-container slug-input-container",4,"ngIf"],[1,"setting-toggle-container"],["id","crupdate_custom_page.hideNav","formControlName","hide_nav","trans",""],["trans",""],[1,"actions"],["mat-raised-button","","color","accent",3,"click"],["trans","",4,"ngIf"],["mat-button","","trans","",3,"routerLink"],[1,"errors"],[1,"editor-container"],["inlineUploadPrefix","page_media","minHeight","auto",1,"text-editor",3,"showAdvancedControls","onChange"],[1,"overlay",3,"isVisible"],[1,"error"],[1,"input-container","slug-input-container"],["formControlName","slug",3,"prefix"]],template:function(e,t){1&e&&(s.YNc(0,Kc,25,11,"ng-container",0),s.ALo(1,"async")),2&e&&s.Q6J("ngIf",s.lcZ(1,1,t.errors$))},directives:[i.O5,a.JL,a.sg,Zt.P,a.Fj,a.JJ,a.u,T.Rr,p.lW,p.zs,r.yS,Ec,ka.Q,Hc],pipes:[i.Ov],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:calc(100vh - 120px);overflow:hidden}.input-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background-color:var(--be-background)}.actions[_ngcontent-%COMP%]{margin-bottom:25px;flex-shrink:0}.errors[_ngcontent-%COMP%]{color:#f44336;flex-shrink:0}.errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]{padding:5px 0}.editor-container[_ngcontent-%COMP%]{flex:1 1 auto}text-editor[_ngcontent-%COMP%]{max-height:none}"],changeDetection:0}),e})();function td(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",5),s.TgZ(1,"label",27),s._uU(2,"Mysql Mode"),s.qZA(),s.TgZ(3,"select",28),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.scout_mysql_mode=t})("ngModelChange",function(){return s.CHM(e),s.oxw().clearErrors()}),s.TgZ(4,"option",29),s._uU(5,"Basic"),s.qZA(),s.TgZ(6,"option",30),s._uU(7,"Extended"),s.qZA(),s.TgZ(8,"option",31),s._uU(9,"Fulltext"),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngModel",e.state.server.scout_mysql_mode)}}function nd(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.TgZ(1,"div",5),s.TgZ(2,"label",32),s._uU(3,"Algolia App ID"),s.qZA(),s.TgZ(4,"input",33),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.algolia_app_id=t}),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.TgZ(6,"label",34),s._uU(7,"Algolia Secret"),s.qZA(),s.TgZ(8,"input",35),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().state.server.algolia_secret=t}),s.qZA(),s.qZA(),s.BQk()}if(2&e){const e=s.oxw();s.xp6(4),s.Q6J("ngModel",e.state.server.algolia_app_id),s.xp6(4),s.Q6J("ngModel",e.state.server.algolia_secret)}}function id(e,t){1&e&&s._UZ(0,"p",36),2&e&&s.Q6J("innerHTML",t.ngIf,s.oJD)}function ad(e,t){1&e&&(s.TgZ(0,"div",37),s.TgZ(1,"div",1),s._uU(2,"Important!"),s.qZA(),s.TgZ(3,"p",13),s.TgZ(4,"a",38),s._uU(5,'"Meilisearch"'),s.qZA(),s._uU(6," needs to be installed and running for this method to work. "),s.qZA(),s.qZA())}function sd(e,t){1&e&&(s.TgZ(0,"div",37),s.TgZ(1,"div",1),s._uU(2,"Important!"),s.qZA(),s.TgZ(3,"p",13),s.TgZ(4,"a",39),s._uU(5,'"Elasticsearch"'),s.qZA(),s._uU(6," needs to be installed and running for this method to work. "),s.qZA(),s.qZA())}function od(e,t){if(1&e&&(s.TgZ(0,"option",22),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("ngValue",e.model),s.xp6(1),s.hij(" ",e.name," ")}}function rd(e,t){1&e&&s._UZ(0,"mat-progress-bar",40)}let ld=(()=>{class e extends vt{constructor(){super(...arguments),this.models$=new c.X([]),this.searchableModelControl=new a.NI(null)}importRecords(){this.state.loading$.next(!0),this.http.post("admin/search/import",{model:this.searchableModelControl.value,driver:this.state.server.scout_driver}).pipe((0,pt.x)(()=>this.state.loading$.next(!1))).subscribe(()=>{this.toast.open("Records imported")},e=>{this.state.errors$.next({search_group:"Could not import records: "+e.message}),gt(this.state.errors$.value)})}ngOnInit(){this.http.get("admin/search/models").subscribe(e=>{this.models$.next(e.models)})}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=s.n5z(e)))(n||e)}}(),e.\u0275cmp=s.Xpm({type:e,selectors:[["search-settings"]],hostAttrs:[1,"settings-panel"],features:[s.qOj],decls:53,vars:22,consts:[[1,"header"],["trans","",1,"title"],["trans","",1,"subtitle"],["ngNativeValidate","",1,"body","many-inputs",3,"submit"],["id","search_group",1,"error-group","many-inputs","no-border-top"],[1,"input-container"],["for","scout.driver","trans",""],["name","scout.driver","id","scout.driver",3,"ngModel","ngModelChange"],["value","mysql"],["value","meilisearch"],["value","tntsearch"],["value","Matchish\\ScoutElasticSearch\\Engines\\ElasticSearchEngine"],["value","algolia"],["trans",""],["class","input-container",4,"ngIf"],[4,"ngIf"],["class","error",3,"innerHTML",4,"ngIf"],["class","widget widget-info widget-important",4,"ngIf"],[1,"widget","widget-flat"],[1,"import-flex"],["for","searchable-model","trans","",1,"hidden"],["id","searchable-model",3,"formControl"],["trans","",3,"ngValue"],["trans","",3,"ngValue",4,"ngFor","ngForOf"],["type","button","mat-stroked-button","","color","accent","trans","",3,"disabled","click"],["mat-raised-button","","color","accent","type","submit","trans","",1,"update-button",3,"disabled"],["mode","indeterminate","color","accent",4,"ngIf"],["for","mysql-mode","trans",""],["name","mysql-mode","id","mysql-mode",3,"ngModel","ngModelChange"],["value","basic"],["value","extended"],["value","fulltext"],["for","scout.algolia_app_id","trans",""],["name","scout.algolia_app_id","id","scout.algolia_app_id","required","",3,"ngModel","ngModelChange"],["for","scout.algolia_secret","trans",""],["name","scout.algolia_secret","id","scout.algolia_secret","required","",3,"ngModel","ngModelChange"],[1,"error",3,"innerHTML"],[1,"widget","widget-info","widget-important"],["href","https://www.meilisearch.com","target","_blank"],["href","https://www.elastic.co/elasticsearch","target","_blank"],["mode","indeterminate","color","accent"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._uU(2,"Search"),s.qZA(),s.TgZ(3,"div",2),s._uU(4," Configure search method used on the site as well as related 3rd party integrations. "),s.qZA(),s.qZA(),s.TgZ(5,"form",3),s.NdJ("submit",function(){return t.saveSettings()}),s.TgZ(6,"div",4),s.TgZ(7,"div",5),s.TgZ(8,"label",6),s._uU(9,"Search Method"),s.qZA(),s.TgZ(10,"select",7),s.NdJ("ngModelChange",function(e){return t.state.server.scout_driver=e})("ngModelChange",function(){return t.clearErrors()}),s.TgZ(11,"option",8),s._uU(12,"Mysql"),s.qZA(),s.TgZ(13,"option",9),s._uU(14,"Meilisearch"),s.qZA(),s.TgZ(15,"option",10),s._uU(16,"TNTSearch"),s.qZA(),s.TgZ(17,"option",11),s._uU(18," Elasticsearch "),s.qZA(),s.TgZ(19,"option",12),s._uU(20,"Algolia"),s.qZA(),s.qZA(),s.TgZ(21,"p",13),s._uU(22,"Which method should be used for search related functionality across the site."),s.qZA(),s.qZA(),s.YNc(23,td,10,1,"div",14),s.YNc(24,nd,9,2,"ng-container",15),s.YNc(25,id,1,1,"p",16),s.ALo(26,"async"),s.qZA(),s.YNc(27,ad,7,0,"div",17),s.YNc(28,sd,7,0,"div",17),s.TgZ(29,"div",18),s.TgZ(30,"div",1),s._uU(31,"Import Records"),s.qZA(),s.TgZ(32,"p",13),s._uU(33," Whenever a new search method is enabled, records that already exist in database need to be imported into the index. All records created after search method is enabled will be imported automatically. "),s.qZA(),s.TgZ(34,"p"),s._uU(35," Depending on number of records in database, importing could take some time. Don't close this window while it is in progress. "),s.qZA(),s.TgZ(36,"div",19),s.TgZ(37,"div",5),s.TgZ(38,"label",20),s._uU(39,"Record Type"),s.qZA(),s.TgZ(40,"select",21),s.TgZ(41,"option",22),s._uU(42,"All"),s.qZA(),s.YNc(43,od,2,2,"option",23),s.ALo(44,"async"),s.qZA(),s.qZA(),s.TgZ(45,"button",24),s.NdJ("click",function(){return t.importRecords()}),s.ALo(46,"async"),s._uU(47," Import Now "),s.qZA(),s.qZA(),s.qZA(),s.TgZ(48,"button",25),s.ALo(49,"async"),s._uU(50," Update "),s.qZA(),s.YNc(51,rd,1,0,"mat-progress-bar",26),s.ALo(52,"async"),s.qZA()),2&e&&(s.xp6(10),s.Q6J("ngModel",t.state.server.scout_driver),s.xp6(13),s.Q6J("ngIf","mysql"===t.state.server.scout_driver),s.xp6(1),s.Q6J("ngIf","algolia"===t.state.server.scout_driver),s.xp6(1),s.Q6J("ngIf",s.lcZ(26,12,t.state.errors$).search_group),s.xp6(2),s.Q6J("ngIf","meilisearch"===t.state.server.scout_driver),s.xp6(1),s.Q6J("ngIf","elastic"===t.state.server.scout_driver),s.xp6(12),s.Q6J("formControl",t.searchableModelControl),s.xp6(1),s.Q6J("ngValue",null),s.xp6(2),s.Q6J("ngForOf",s.lcZ(44,14,t.models$)),s.xp6(2),s.Q6J("disabled",s.lcZ(46,16,t.state.loading$)),s.xp6(3),s.Q6J("disabled",s.lcZ(49,18,t.state.loading$)),s.xp6(3),s.Q6J("ngIf",s.lcZ(52,20,t.state.loading$)))},directives:[Zt.P,a.JL,a.F,a.EJ,a.JJ,a.On,a.YN,a.Kr,i.O5,a.oH,i.sg,p.lW,a.Fj,a.Q7,C.pW],pipes:[i.Ov],styles:[".import-flex[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:15px}.import-flex[_ngcontent-%COMP%]   .input-container[_ngcontent-%COMP%]{max-width:100px}.import-flex[_ngcontent-%COMP%]   .mat-stroked-button[_ngcontent-%COMP%]{line-height:46px;margin-top:0;margin-left:10px}"]}),e})(),cd=(()=>{class e{constructor(e){this.http=e}all(t){return this.http.get(e.BASE_URI,t)}forCommentable(e){return this.http.get("commentable/comments",e)}get(t){return this.http.get(`${e.BASE_URI}/${t}`)}create(t){return this.http.post(e.BASE_URI,t)}update(t,n){return this.http.put(`${e.BASE_URI}/${t}`,n)}delete(t){return this.http.delete(`${e.BASE_URI}/${t}`)}restore(t){return this.http.post(`${e.BASE_URI}/restore`,{commentIds:t})}}return e.BASE_URI="comment",e.\u0275fac=function(t){return new(t||e)(s.LFG(o.r))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const dd=[new ds.XQ({type:ds.Bq.Select,key:"deleted",label:"Type",defaultValue:!1,description:"Whether comment is active or deleted.",options:[{key:"Active",value:!1},{key:"Deleted",value:!0}]}),new ds.XQ({type:ds.Bq.SelectModel,key:"user_id",label:"User",description:"User comment was created by",component:Xs.y}),new us.T7({description:"Date comment was created"}),new us.yH({description:"Date comment was last updated"})];var ud=n(28842);function pd(e,t){1&e&&s._UZ(0,"mat-progress-bar",13)}function gd(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",18),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).maybeDeleteComments()}),s._uU(1," Delete "),s.qZA()}}const hd=function(e){return{count:e,resource:"comment(s)"}};function md(e,t){if(1&e&&(s.TgZ(0,"tr"),s.TgZ(1,"th",14),s.TgZ(2,"div",15),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",16),s.YNc(5,gd,2,0,"button",17),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.ngIf,n=s.oxw();s.xp6(2),s.Q6J("transValues",s.VKq(2,hd,e)),s.xp6(3),s.Q6J("ngIf",n.currentUser.hasPermission("comments.delete"))}}function fd(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",30),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().maybeDeleteComments(t)}),s._uU(1," Delete "),s.qZA()}}function _d(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",31),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().restoreComment(t)}),s._uU(1," Restore "),s.qZA()}}function bd(e,t){if(1&e&&(s.TgZ(0,"tr"),s._UZ(1,"td",19),s.TgZ(2,"td",20),s._uU(3),s.qZA(),s.TgZ(4,"td"),s.TgZ(5,"div",21),s._UZ(6,"img",22),s.TgZ(7,"a",23),s.TgZ(8,"div"),s._uU(9),s.qZA(),s.TgZ(10,"div",24),s._uU(11),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(12,"td"),s._UZ(13,"user-column",25),s.qZA(),s.TgZ(14,"td",26),s._uU(15),s.ALo(16,"formattedDate"),s.qZA(),s.TgZ(17,"td",27),s.YNc(18,fd,2,0,"button",28),s.YNc(19,_d,2,0,"button",29),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("table-body-checkbox",e.id),s.xp6(2),s.Oqu(e.content),s.xp6(3),s.Q6J("src",e.commentable.image,s.LSH),s.xp6(1),s.Q6J("routerLink",n.url.generate(e.commentable)),s.xp6(2),s.Oqu(e.commentable.name),s.xp6(2),s.Oqu(e.commentable.model_type),s.xp6(2),s.Q6J("user",e.user),s.xp6(2),s.Oqu(s.lcZ(16,10,e.created_at)),s.xp6(3),s.Q6J("ngIf",!e.deleted),s.xp6(1),s.Q6J("ngIf",e.deleted)}}function vd(e,t){1&e&&(s.TgZ(0,"no-results-message",32),s.TgZ(1,"span",33),s._uU(2,"No comments have been created yet"),s.qZA(),s.qZA())}const Zd=[{path:"",component:ct,canActivate:[dt.a,ut.d],canActivateChild:[dt.a,ut.d],data:{permissions:["admin.access"],adminRoot:!0},children:[{path:"",redirectTo:"analytics",pathMatch:"full"},{path:"analytics",loadChildren:()=>n.e(264).then(n.bind(n,30264)).then(e=>e.AnalyticsModule),canActivate:[dt.a],canActivateChild:[dt.a],data:{permissions:["reports.view"]}},{path:"users",component:Ss,data:{permissions:["users.view"]}},{path:"roles",component:Jo,data:{permissions:["roles.view"]}},{path:"translations",component:gr,data:{permissions:["localizations.view"]}},{path:"tags",component:lc,data:{permissions:["tags.view"]}},{path:"files",component:yr,data:{permissions:["files.view"]}},{path:"comments",component:(()=>{class e{constructor(e,t,n,i,a,s){this.comments=e,this.currentUser=t,this.settings=n,this.toast=i,this.datatable=a,this.url=s,this.comments$=this.datatable.data$,this.filters=dd}ngOnInit(){this.datatable.init({uri:cd.BASE_URI,staticParams:{with:["commentable"]}})}ngOnDestroy(){this.datatable.destroy()}makeRolesList(e){return e.slice(0,3).map(e=>e.name).join(", ")}maybeDeleteComments(e){this.datatable.confirmResourceDeletion("comments").subscribe(()=>{this.comments.delete(e?[e.id]:this.datatable.selectedRows$.value).subscribe(()=>{this.datatable.reset(),this.toast.open("Comments deleted")},e=>{this.toast.open(e.message||Gi.v.Default)})})}restoreComment(e){this.comments.restore([e.id]).subscribe(()=>{this.datatable.reset(),this.toast.open("Comment restored")})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(cd),s.Y36(Wi.I),s.Y36(st.Z),s.Y36(ht.F),s.Y36(cs.x),s.Y36(ud.o))},e.\u0275cmp=s.Xpm({type:e,selectors:[["user-index"]],features:[s._Bn([cs.x])],decls:28,vars:11,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","comments",3,"filters"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","user_id","trans",""],["table-sort-header","","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","public-discussion.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["colspan","6"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["mat-raised-button","","color","warn","trans","",3,"click",4,"ngIf"],["mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Content"],[1,"column-with-image"],["alt","",3,"src"],["target","_blank",1,"link",3,"routerLink"],[1,"secondary","capitalize"],[3,"user"],["data-label","Created At"],[1,"edit-column"],["mat-button","","color","warn","trans","",3,"click",4,"ngIf"],["mat-button","","color","accent","trans","",3,"click",4,"ngIf"],["mat-button","","color","warn","trans","",3,"click"],["mat-button","","color","accent","trans","",3,"click"],["svgImage","public-discussion.svg"],["primary-text","","trans",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s._uU(2,"Comments"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"datatable-filters",3),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.YNc(6,pd,1,0,"mat-progress-bar",5),s.ALo(7,"async"),s.TgZ(8,"table",6),s.TgZ(9,"thead"),s.TgZ(10,"tr"),s._UZ(11,"th",7),s.TgZ(12,"th",1),s._uU(13,"Content"),s.qZA(),s.TgZ(14,"th",1),s._uU(15,"Commentable"),s.qZA(),s.TgZ(16,"th",8),s._uU(17,"User"),s.qZA(),s.TgZ(18,"th",9),s._uU(19,"Created At"),s.qZA(),s._UZ(20,"th"),s.qZA(),s.YNc(21,md,6,4,"tr",10),s.qZA(),s.TgZ(22,"tbody"),s.YNc(23,bd,20,12,"tr",11),s.ALo(24,"async"),s.qZA(),s.qZA(),s.YNc(25,vd,3,0,"no-results-message",12),s.ALo(26,"async"),s._UZ(27,"datatable-footer"),s.qZA()),2&e&&(s.xp6(4),s.Q6J("filters",t.filters),s.xp6(2),s.Q6J("ngIf",s.lcZ(7,5,t.datatable.paginator&&t.datatable.paginator.loading$)),s.xp6(15),s.Q6J("ngIf",t.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(24,7,t.comments$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(26,9,t.datatable.paginator.noResults$)))},directives:[Zt.P,fs.h,i.O5,bs,vs.p,i.sg,Zs.V,C.pW,p.lW,ys,r.yS,As.r,ws.U],pipes:[i.Ov,mn.l],styles:[".mat-column-email[_ngcontent-%COMP%]{margin-right:15px}"],changeDetection:0}),e})(),data:{permissions:["comments.view"]}},{path:"ads",component:qr,data:{permissions:["ads.update"]}},{path:"custom-pages",component:xc,data:{permissions:["custom_pages.view"],name:"Custom Pages"}},{path:"custom-pages/new",component:ed,data:{permissions:["custom_pages.create"],name:"Add New Page"}},{path:"custom-pages/:id/edit",component:ed,data:{permissions:["custom_pages.update"],name:"Edit Page"}},{path:"plans",component:cl,canActivate:[dl.Y],data:{permissions:["plans.view"]}},{path:"subscriptions",component:Sl,canActivate:[dl.Y],data:{permissions:["subscriptions.view"]}},{path:"settings",component:Pt,resolve:{settings:l},data:{permissions:["settings.view"]},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Vt,pathMatch:"full"},{path:"authentication",component:an},{path:"cache",component:cn},{path:"analytics",component:hn},{path:"localization",component:xn},{path:"mail",component:Fn},{path:"logging",component:$n},{path:"queue",component:jn},{path:"billing",component:ri},{path:"uploading",component:Qi},{path:"recaptcha",component:Bi},{path:"gdpr",component:$l},{path:"search",component:ld},...yt]}]},{path:"appearance",loadChildren:()=>n.e(171).then(n.bind(n,46171)).then(e=>e.AppAppearanceModule),canActivate:[dt.a],canActivateChild:[dt.a],data:{permissions:["appearance.update"]}}];let xd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[r.Bz.forChild(Zd)],r.Bz]}),e})();var yd=n(43389);let Ad=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,a.UX,M.N,yd.p,P.Ps,m.Is]]}),e})();var wd=n(18295),Cd=n(4581),Td=n(95217),qd=n(66705),kd=n(68285);let Md=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,qd.z,kd.T,M.N,C.Cv,P.Ps,p.ot,w.Tx]]}),e})(),Id=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,m.Is,p.ot,P.Ps],P.Ps]}),e})(),Ud=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,a.UX,p.ot,M.N,P.Ps]]}),e})(),Od=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,M.N,p.ot,P.Ps,h.Hi]]}),e})();var Dd=n(58193);let Pd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,r.Bz,Dd.x,M.N,S.X,Td.u,Q,yd.p,a.u5,a.UX,Ud,P.Ps,p.ot,k.AV,T.rP,C.Cv]]}),e})(),Sd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,M.N,a.UX]]}),e})(),Jd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,p.ot,w.Tx,M.N,a.UX,P.Ps,yd.p]]}),e})();var Nd=n(87446);let Rd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,M.N,a.u5,a.UX],i.ez]}),e})();var Qd=n(26989),Fd=n(21023);let Ed=(()=>{class e{constructor(e){this.settings=e,this.settings.merge({vebto:et})}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(st.Z))},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({providers:[mt.u],imports:[[r.Bz,i.ez,a.u5,a.UX,Q,R,wd.l,Cd.N,tt.J,I,Dd.x,S.X,M.N,Td.u,yd.p,Md,Id,Ud,Od,xd,Pd,Rd,Qd.c,Fd.M,p.ot,P.Ps,k.AV,m.Is,w.Tx,T.rP,h.Hi,u.Bb,it._t,C.Cv,Ke.To,Z.us,We,Z.XK,Sd,Jd,nt,Z.si,Ad,Nd.m],r.Bz,i.ez,a.u5,a.UX,Q,R,M.N,S.X,Id,Dd.x,p.ot,P.Ps,q.ZX,g.p9,k.AV,m.Is,w.Tx,T.rP,h.Hi]}),e})(),Yd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[i.ez,a.UX,Ed,Id,U.G,C.Cv]]}),e})()},64563:function(e,t,n){"use strict";n.d(t,{G:function(){return l}});var i=n(18715),a=n(68756),s=n(16850),o=n(82655),r=n(37716);let l=(()=>{class e extends i.c{constructor(){super(...arguments),this.DEFAULT_MAX_SIZE_MB=5}initValidations(){const e=[new a.p({maxSize:(0,s.F)(this.DEFAULT_MAX_SIZE_MB,"MB")},this.i18n),new o.p({types:["image"]},this.i18n)];this.validations.push(...e)}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=r.n5z(e)))(n||e)}}(),e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},79893:function(e,t,n){"use strict";n.d(t,{M:function(){return o},b:function(){return r}});var i=n(83644),a=n(45418),s=n(35866);const o=new i.XQ({type:i.Bq.Select,key:"type",description:"Type of the file",defaultValue:"text",options:[{key:"Text",value:"text"},{key:"Audio",value:"audio"},{key:"Video",value:"video"},{key:"Image",value:"image"},{key:"PDF",value:"pdf"},{key:"Spreadsheet",value:"spreadsheet"},{key:"Word Document",value:"word"},{key:"Photoshop",value:"photoshop"},{key:"Archive",value:"archive"},{key:"Folder",value:"folder"}]}),r=[o,new i.XQ({type:i.Bq.Select,key:"public",label:"status",defaultValue:!1,description:"Whether file is publicly accessible",options:[{key:"Private",value:!1},{key:"Public",value:!0}]}),new a.T7({description:"Date file was uploaded"}),new a.yH({description:"Date file was last changed"}),new i.XQ({type:i.Bq.SelectModel,key:"owner_id",label:"Uploader",description:"User that this file was uploaded by",component:s.y})]},35866:function(e,t,n){"use strict";n.d(t,{y:function(){return b}});var i=n(3679),a=n(54395),s=n(87519),o=n(43190),r=n(5304),l=n(26215),c=n(25917),d=n(37716),u=n(22238),p=n(73429),g=n(15515),h=n(76627),m=n(20616),f=n(38583);function _(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",9),d.NdJ("click",function(){const t=d.CHM(e).$implicit;return d.oxw().close(t)}),d._UZ(1,"img",10),d.TgZ(2,"div",11),d.TgZ(3,"div",12),d._uU(4),d.qZA(),d.TgZ(5,"div",13),d._uU(6),d.qZA(),d.qZA(),d.qZA()}if(2&e){const e=t.$implicit;d.xp6(1),d.Q6J("src",e.avatar,d.LSH),d.xp6(3),d.Oqu(e.display_name),d.xp6(2),d.Oqu(e.email)}}let b=(()=>{class e{constructor(e,t){this.dialogRef=e,this.users=t,this.searchFormControl=new i.NI,this.loading$=new l.X(!1),this.users$=new l.X([])}ngOnInit(){this.searchFormControl.valueChanges.pipe((0,a.b)(250),(0,s.x)(),(0,o.w)(e=>this.searchUsers(e)),(0,r.K)(()=>(0,c.of)([]))).subscribe(e=>{this.users$.next(e),this.loading$.next(!1)})}close(e){this.dialogRef.close(this.normalizeUser(e))}searchUsers(e){return this.loading$.next(!0),e?this.users.getAll({query:e}):(0,c.of)([])}normalizeUser(e){return e?{id:e.id,name:e.display_name,image:e.avatar,model_type:e.model_type}:null}}return e.\u0275fac=function(t){return new(t||e)(d.Y36(u.so),d.Y36(p.Q))},e.\u0275cmp=d.Xpm({type:e,selectors:[["find-user-modal"]],decls:13,vars:7,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","tabindex","-1",1,"no-style","close-button",3,"click"],["svgIcon","close"],[1,"input-container","search-input-container"],["type","text","placeholder","Search for user by name or email...",3,"formControl"],[1,"small",3,"isVisible"],[1,"users"],["class","user",3,"click",4,"ngFor","ngForOf"],[1,"user",3,"click"],[3,"src"],[1,"meta","overflow-hidden"],[1,"name","overflow-hidden"],[1,"email","overflow-hidden"]],template:function(e,t){1&e&&(d.TgZ(0,"div",0),d.TgZ(1,"h2",1),d._uU(2,"Find User"),d.qZA(),d.TgZ(3,"button",2),d.NdJ("click",function(){return t.close()}),d._UZ(4,"mat-icon",3),d.qZA(),d.qZA(),d.TgZ(5,"mat-dialog-content"),d.TgZ(6,"div",4),d._UZ(7,"input",5),d._UZ(8,"loading-indicator",6),d.ALo(9,"async"),d.qZA(),d.TgZ(10,"div",7),d.YNc(11,_,7,3,"div",8),d.ALo(12,"async"),d.qZA(),d.qZA()),2&e&&(d.xp6(7),d.Q6J("formControl",t.searchFormControl),d.xp6(1),d.Q6J("isVisible",d.lcZ(9,3,t.loading$)),d.xp6(3),d.Q6J("ngForOf",d.lcZ(12,5,t.users$)))},directives:[u.uh,g.P,h.Hw,u.xY,i.Fj,i.JJ,i.oH,m.Q,f.sg],pipes:[f.Ov],styles:["[_nghost-%COMP%]{display:block;width:500px;max-width:100%}.modal-header[_ngcontent-%COMP%]{margin-bottom:15px}.search-input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px;position:relative}loading-indicator[_ngcontent-%COMP%]{top:12px;right:12px}.users[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -15px}.user[_ngcontent-%COMP%]{display:flex;align-items:center;width:calc(50% - 10px);flex-shrink:0;min-width:0;padding:12px;border-radius:4px;cursor:pointer}.user[_ngcontent-%COMP%]:hover{background-color:var(--be-hover)}.user[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:50px;height:50px;flex-shrink:0;margin-right:10px;border-radius:4px;overflow:hidden}.user[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{color:var(--be-text);font-size:1.5rem;margin-bottom:5px}.user[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.overflow-hidden[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),e})()},63868:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var i=(()=>(function(e){e[e.ENTER=13]="ENTER",e[e.SPACE=32]="SPACE",e[e.ESCAPE=27]="ESCAPE",e[e.DELETE=46]="DELETE",e[e.ARROW_UP=38]="ARROW_UP",e[e.ARROW_RIGHT=39]="ARROW_RIGHT",e[e.ARROW_DOWN=40]="ARROW_DOWN",e[e.ARROW_LEFT=37]="ARROW_LEFT",e[e.BACKSPACE=8]="BACKSPACE",e[e.TAB=9]="TAB",e[e.S=83]="S",e[e.N=78]="N",e[e.A=65]="A",e[e.T=84]="T",e[e.B=66]="B",e[e.C=67]="C",e[e.O=79]="O",e[e.P=80]="P",e[e.R=82]="R",e[e.F=70]="F",e[e.Y=89]="Y",e[e.Z=90]="Z"}(i||(i={})),i))(),a=n(22759),s=n(37716);let o=(()=>{class e{constructor(){this.bindings=[]}add(e,t){Array.isArray(e)||(e=[e]),e.forEach(e=>{this.bindings.push({keybind:this.parseKeybindString(e),keybindString:e,callback:t})})}addWithPreventDefault(e,t){this.bindings.push({keybind:this.parseKeybindString(e),keybindString:e,callback:t,preventDefault:!0})}listenOn(e,t={}){return(0,a.R)(e,"keydown").subscribe(e=>{!t.fireIfInputFocused&&["input","select"].includes(document.activeElement.nodeName.toLowerCase())||this.executeBindings(e)})}executeBindings(e){this.bindings.forEach(t=>{this.bindingMatches(t.keybind,e)&&(t.preventDefault&&e.preventDefault&&e.preventDefault(),t.callback(e))})}bindingMatches(e,t){return i[e.key.toUpperCase()]===t.keyCode&&(t.ctrlKey===e.ctrl||t.metaKey===e.ctrl)&&t.shiftKey===e.shift}parseKeybindString(e){const t=e.trim().split("+"),n={ctrl:!1,shift:!1,key:""};return t.forEach(e=>{"ctrl"===(e=e.trim().toLowerCase())?n.ctrl=!0:"shift"===e?n.shift=!0:n.key=e}),n}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},44666:function(e,t,n){"use strict";n.d(t,{S:function(){return T}});var i=n(3679),a=n(26215),s=n(25917),o=n(54395),r=n(87519),l=n(43190),c=n(5304),d=n(37716),u=n(58341),p=n(38583),g=n(21554),h=n(76627),m=n(72458),f=n(63297);const _=["auto"],b=["inputEl"],v=["selectModeTemplate"];function Z(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"mat-chip",8),d.NdJ("removed",function(){const t=d.CHM(e).index;return d.oxw().remove(t)}),d._uU(1),d._UZ(2,"mat-icon",9),d.qZA()}if(2&e){const e=t.$implicit,n=d.oxw();d.Q6J("selectable",!1)("removable",!n.selectMode),d.xp6(1),d.hij(" ",n.displayChipValue(e)," ")}}const x=function(e){return{elementRef:e}};function y(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"input",10,11),d.NdJ("matChipInputTokenEnd",function(t){return d.CHM(e),d.oxw().addFromChipInput(t.value)}),d.ALo(2,"trans"),d.qZA()}if(2&e){const e=d.oxw(),t=d.MAs(1),n=d.MAs(6);d.Q6J("placeholder",d.lcZ(2,7,e.placeholder))("type",e.type)("matChipInputFor",t)("matChipInputAddOnBlur",!0)("matAutocomplete",n)("matAutocompleteConnectedTo",d.VKq(9,x,e.el))("formControl",e.formControl)}}function A(e,t){if(1&e&&(d.TgZ(0,"mat-option",12),d._uU(1),d.qZA()),2&e){const e=t.$implicit,n=d.oxw();d.Q6J("value",e),d.xp6(1),d.Oqu(n.displayChipValue(e))}}function w(e,t){if(1&e&&(d.TgZ(0,"mat-option",12),d._uU(1),d.qZA()),2&e){const e=t.$implicit,n=d.oxw(2);d.Q6J("value",e),d.xp6(1),d.Oqu(n.displayChipValue(e))}}function C(e,t){1&e&&d.YNc(0,w,2,2,"mat-option",6),2&e&&d.Q6J("ngForOf",t.suggestions)}let T=(()=>{class e{constructor(e){this.el=e,this.type="text",this.emailsInput=!1,this.selectMode=!1,this.formControl=new i.NI,this.items$=new a.X([]),this.suggestedValues$=new a.X([])}set suggestedValues(e){this.suggestedValues$.next(e)}ngOnInit(){this.suggestFn&&this.bindToSearchControl()}ngAfterViewInit(){this.emailsInput&&this.parseEmailsOnPaste()}remove(e){const t=[...this.items$.value];t.splice(e,1),this.items$.next(t),this.propagateChange(this.items$.value)}addFromChipInput(e,t=!0){!e||this.matAutocomplete.isOpen||this.selectMode||this.add(e,t)}addFromAutocomplete(e,t=!0){this.add(e,t)}add(e,t=!0){e="string"==typeof e?e.trim():e;const n=this.findValueIndex(e)>-1;e&&!n&&(this.items$.next([...this.items$.value,e]),t&&this.propagateChange(this.items$.value)),this.inputEl&&(this.inputEl.nativeElement.value=""),this.formControl.setValue(null),this.suggestedValues$.next([])}findValueIndex(e){return"string"==typeof e?this.items$.value.indexOf(e):this.items$.value.findIndex(t=>t.id===e.id)}writeValue(e=[]){this.items$.next(e||[])}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}bindToSearchControl(){this.formControl.valueChanges.pipe((0,o.b)(150),(0,r.x)(),(0,l.w)(e=>e?this.suggestFn(e):(0,s.of)([])),(0,c.K)(()=>(0,s.of)([]))).subscribe(e=>{const t=e.filter(e=>-1===this.findValueIndex(e));this.suggestedValues$.next(t)})}displayChipValue(e){return"object"==typeof e?e.name:e}parseEmailsOnPaste(){this.inputEl.nativeElement.addEventListener("paste",e=>{const t=(e.clipboardData||window.clipboardData).getData("text").match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);if(t){e.preventDefault();const n=window.getSelection();n.rangeCount&&(n.deleteFromDocument(),t.forEach(e=>this.add(e)))}})}}return e.\u0275fac=function(t){return new(t||e)(d.Y36(d.SBq))},e.\u0275cmp=d.Xpm({type:e,selectors:[["chip-input"]],viewQuery:function(e,t){if(1&e&&(d.Gf(_,5),d.Gf(b,5),d.Gf(v,5)),2&e){let e;d.iGM(e=d.CRH())&&(t.matAutocomplete=e.first),d.iGM(e=d.CRH())&&(t.inputEl=e.first),d.iGM(e=d.CRH())&&(t.selectModeTemplate=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&d.ekj("select-mode",t.selectMode)},inputs:{placeholder:"placeholder",type:"type",emailsInput:"emailsInput",suggestFn:"suggestFn",selectMode:"selectMode",suggestedValues:"suggestedValues"},features:[d._Bn([{provide:i.JU,useExisting:e,multi:!0}])],decls:11,vars:9,consts:[[3,"selectable"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],["class","mat-chip-input mat-input-element",3,"placeholder","type","matChipInputFor","matChipInputAddOnBlur","matAutocomplete","matAutocompleteConnectedTo","formControl","matChipInputTokenEnd",4,"ngIf"],[1,"chip-input-autocomplete-panel",3,"autoActiveFirstOption","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["selectModeTemplate",""],[3,"selectable","removable","removed"],["matChipRemove","","svgIcon","cancel"],[1,"mat-chip-input","mat-input-element",3,"placeholder","type","matChipInputFor","matChipInputAddOnBlur","matAutocomplete","matAutocompleteConnectedTo","formControl","matChipInputTokenEnd"],["inputEl",""],[3,"value"]],template:function(e,t){1&e&&(d.TgZ(0,"mat-chip-list",0,1),d.YNc(2,Z,3,3,"mat-chip",2),d.ALo(3,"async"),d.YNc(4,y,3,11,"input",3),d.qZA(),d.TgZ(5,"mat-autocomplete",4,5),d.NdJ("optionSelected",function(e){return t.addFromAutocomplete(e.option.value)}),d.YNc(7,A,2,2,"mat-option",6),d.ALo(8,"async"),d.qZA(),d.YNc(9,C,1,1,"ng-template",null,7,d.W1O)),2&e&&(d.Q6J("selectable",!1),d.xp6(2),d.Q6J("ngForOf",d.lcZ(3,5,t.items$)),d.xp6(2),d.Q6J("ngIf",!t.selectMode),d.xp6(1),d.Q6J("autoActiveFirstOption",!0),d.xp6(2),d.Q6J("ngForOf",d.lcZ(8,7,t.suggestedValues$)))},directives:[u.qn,p.sg,p.O5,g.XC,u.HS,h.Hw,u.qH,u.oH,g.ZL,i.Fj,i.JJ,i.oH,m.ey],pipes:[p.Ov,f.R],styles:["chip-input{display:block;min-height:46px}chip-input .mat-chip-list-wrapper{width:100%;height:100%;color:inherit;border:1px solid var(--be-divider-default);padding:6px;line-height:normal;font-size:1.4rem;font-family:inherit;background-color:inherit;box-sizing:border-box;border-radius:2px;margin:0}chip-input .mat-chip-input{height:24px;font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:0;max-width:100%;vertical-align:bottom;text-align:inherit}chip-input .mat-chip-input:focus{outline:none;box-shadow:none}.chip-input-select-panel{background-color:var(--be-background);min-width:180px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}"],encapsulation:2,changeDetection:0}),e})()},87738:function(e,t,n){"use strict";n.d(t,{G:function(){return p}});var i=n(38583),a=n(58341),s=n(76627),o=n(3679),r=n(49866),l=n(21554),c=n(51095),d=n(72458),u=n(37716);let p=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=u.oAB({type:e}),e.\u0275inj=u.cJS({imports:[[i.ez,a.Hi,l.Bb,o.UX,r.N,c.ot,s.Ps,d.si]]}),e})()},6008:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var i=n(38583),a=n(76627),s=n(51095),o=n(37716);let r=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[i.ez,a.Ps,s.ot]]}),e})()},83326:function(e,t,n){"use strict";n.d(t,{B:function(){return a}});var i=n(17238);const a=[(0,i.X$)("fadeIn",[(0,i.eR)(":enter",[(0,i.oB)({opacity:0}),(0,i.jt)("325ms ease-in",(0,i.oB)({opacity:1}))])]),(0,i.X$)("fadeOut",[(0,i.eR)(":leave",[(0,i.oB)({opacity:1,position:"absolute",left:"0",right:"0"}),(0,i.jt)("325ms ease-out",(0,i.oB)({opacity:0}))])])]},64833:function(e,t,n){"use strict";n.d(t,{_:function(){return s}});var i=n(37716),a=n(84430);let s=(()=>{class e{constructor(e){this.theme=e,this.animation="wave",this.variant="text",this.dark=this.theme.isDarkMode()}get pulsate(){return"pulsate"===this.animation}get wave(){return"wave"===this.animation}get avatar(){return"avatar"===this.variant}get text(){return"text"===this.variant}get rect(){return"rect"===this.variant}get icon(){return"icon"===this.variant}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(a.f))},e.\u0275cmp=i.Xpm({type:e,selectors:[["skeleton"]],hostAttrs:["aria-busy","true","aria-valuemin","0","aria-valuemax","100","aria-valuetext","Loading...","role","progressbar"],hostVars:14,hostBindings:function(e,t){2&e&&i.ekj("dark",t.dark)("pulsate",t.pulsate)("wave",t.wave)("avatar",t.avatar)("text",t.text)("rect",t.rect)("icon",t.icon)},inputs:{animation:"animation",variant:"variant"},decls:0,vars:0,template:function(e,t){},styles:['@charset "UTF-8";[_nghost-%COMP%]{display:inline-block;overflow:hidden;position:relative;background-color:var(--be-divider-lighter);background-repeat:no-repeat;border-radius:4px;width:100%;height:100%;will-change:transform}.wave[_nghost-%COMP%]{-webkit-animation:wave 2s ease-in-out infinite;animation:wave 2s ease-in-out infinite;background-size:200px 100%;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.6),hsla(0,0%,100%,0))}.wave.dark[_nghost-%COMP%]{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.pulsate[_nghost-%COMP%]{-webkit-animation:pulse 1.5s ease-in-out infinite;animation:pulse 1.5s ease-in-out infinite;-webkit-animation-delay:.5s;animation-delay:.5s}.avatar[_nghost-%COMP%]{width:40px;height:40px;margin-right:10px;border-radius:4px;flex-shrink:0}.circle[_nghost-%COMP%]{border-radius:50%}.icon[_nghost-%COMP%]{width:24px;height:24px;margin-left:8px;margin-right:8px}.text[_nghost-%COMP%]{height:1.4rem;vertical-align:middle}.text[_nghost-%COMP%]:before{content:"\xa0"}@-webkit-keyframes wave{0%{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}@keyframes wave{0%{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}'],changeDetection:0}),e})()},87446:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var i=n(38583),a=n(37716);let s=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({imports:[[i.ez]]}),e})()},84889:function(e,t,n){"use strict";function i(e){const t=Object.assign({},e);return Object.keys(t).forEach(e=>{null!=t[e]&&""!==t[e]||delete t[e]}),t}n.d(t,{N:function(){return i}})},31176:function(e,t,n){"use strict";n.d(t,{r:function(){return d}});var i=n(37716),a=n(28842),s=n(38583),o=n(63423);function r(e,t){if(1&e&&(i.TgZ(0,"a",4),i.TgZ(1,"div"),i._uU(2),i.qZA(),i.TgZ(3,"div",5),i._uU(4),i.qZA(),i.qZA()),2&e){const e=i.oxw(2);i.Q6J("routerLink",e.url.generate(e.user)),i.xp6(2),i.Oqu(e.user.display_name),i.xp6(2),i.Oqu(e.user.email)}}function l(e,t){if(1&e&&(i.TgZ(0,"div",6),i.TgZ(1,"div"),i._uU(2),i.qZA(),i.TgZ(3,"div",5),i._uU(4),i.qZA(),i.qZA()),2&e){const e=i.oxw(2);i.xp6(2),i.Oqu(e.user.display_name),i.xp6(2),i.Oqu(e.user.email)}}function c(e,t){if(1&e&&(i.ynx(0),i._UZ(1,"img",1),i.YNc(2,r,5,3,"a",2),i.YNc(3,l,5,2,"div",3),i.BQk()),2&e){const e=i.oxw();i.xp6(1),i.Q6J("src",e.user.avatar,i.LSH),i.xp6(1),i.Q6J("ngIf",e.haveUrl),i.xp6(1),i.Q6J("ngIf",!e.haveUrl)}}let d=(()=>{class e{constructor(e){this.url=e,this.showEmail=!1,this.haveUrl=!!e.user}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(a.o))},e.\u0275cmp=i.Xpm({type:e,selectors:[["user-column"]],hostAttrs:[1,"column-with-image"],inputs:{user:"user",showEmail:"showEmail"},decls:1,vars:1,consts:[[4,"ngIf"],["alt","",3,"src"],["target","_blank","class","link content",3,"routerLink",4,"ngIf"],["class","content",4,"ngIf"],["target","_blank",1,"link","content",3,"routerLink"],[1,"email","secondary"],[1,"content"]],template:function(e,t){1&e&&i.YNc(0,c,4,3,"ng-container",0),2&e&&i.Q6J("ngIf",t.user)},directives:[s.O5,o.yS],styles:[""],changeDetection:0}),e})()},54262:function(e,t,n){"use strict";n.d(t,{h:function(){return o}});var i=n(37716),a=n(99883),s=n(75499);let o=(()=>{class e{constructor(e){this.datable=e}onFilterChange(e){this.datable.filters$.next({filters:e})}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(a.x))},e.\u0275cmp=i.Xpm({type:e,selectors:[["datatable-filters"]],inputs:{pluralName:"pluralName",filters:"filters"},decls:1,vars:3,consts:[[3,"searchControl","pluralName","filters","filterChange"]],template:function(e,t){1&e&&(i.TgZ(0,"search-input-with-filters",0),i.NdJ("filterChange",function(e){return t.onFilterChange(e)}),i.qZA()),2&e&&i.Q6J("searchControl",t.datable.searchControl)("pluralName",t.pluralName)("filters",t.filters)},directives:[s.k],styles:[""],changeDetection:0}),e})()},83644:function(e,t,n){"use strict";n.d(t,{XQ:function(){return i},Bq:function(){return a},pg:function(){return s},Hi:function(){return o}});class i{constructor(e){this.defaultValue=void 0!==e.defaultValue?e.defaultValue:"",this.key=e.key||"",this.label=e.label||e.key||"",this.description=e.description||"",this.defaultOperator=e.defaultOperator||s.eq,this.required=!!e.required,this.order=void 0===e.order?1:e.order,this.type=e.type||a.Select,this.inputType=e.inputType,this.options=e.options||[],this.operators=e.operators,this.component=e.component,this.componentData=e.componentData}}var a=(()=>(function(e){e.Select="select",e.DatePicker="datePicker",e.SelectModel="selectModel",e.Input="input",e.StaticValue="staticValue"}(a||(a={})),a))(),s=(()=>(function(e){e.eq="=",e.ne="!=",e.gt=">",e.gte=">=",e.lt="<",e.lte="<=",e.has="has",e.doesntHave="doesntHave"}(s||(s={})),s))();const o=[s.eq,s.ne,s.gt,s.gte,s.lt,s.lte]},45418:function(e,t,n){"use strict";n.d(t,{T7:function(){return s},yH:function(){return o}});var i=n(83644);class a extends i.XQ{constructor(){super(...arguments),this.type=i.Bq.DatePicker,this.operators=i.Hi,this.defaultOperator=i.pg.lte,this.defaultValue=(new Date).toISOString().split("T")[0]}}class s extends a{constructor(){super(...arguments),this.key="created_at",this.label="Created At"}}class o extends a{constructor(){super(...arguments),this.key="updated_at",this.label="Updated At"}}},75499:function(e,t,n){"use strict";n.d(t,{k:function(){return K}});var i=n(37716),a=n(39761),s=n(88002),o=n(87519),r=n(45435),l=n(26215),c=n(90739),d=n(66682),u=n(22759),p=n(15515),g=n(38583),h=n(76627);const m=["filterSuggestion"];function f(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",8,9),i.NdJ("click",function(){const t=i.CHM(e).$implicit;return i.oxw().filterSelected.emit(t.value)}),i.TgZ(2,"div",10),i._uU(3),i.qZA(),i.TgZ(4,"div",2),i._uU(5),i.qZA(),i.qZA()}if(2&e){const e=t.$implicit,n=t.index;i.uIk("data-filter-key",e.key)("data-index",n),i.xp6(3),i.Oqu(e.value.label),i.xp6(2),i.Oqu(e.value.description)}}let _=(()=>{class e{constructor(){this.filterSelected=new i.vpe,this.originalOrder=()=>0}anyFocused(){return document.activeElement.classList.contains("filter-suggestion-item")}focusItemAt(e){this.items.get(e).nativeElement.focus()}getFocusedFilter(){if(this.anyFocused()){const e=document.activeElement.dataset.filterKey;return this.filters[e]}}getFocusedIndex(){if(this.anyFocused()){const e=document.activeElement;return parseInt(e.dataset.index)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Xpm({type:e,selectors:[["filter-suggestions"]],viewQuery:function(e,t){if(1&e&&i.Gf(m,5),2&e){let e;i.iGM(e=i.CRH())&&(t.items=e)}},inputs:{filters:"filters"},outputs:{filterSelected:"filterSelected"},decls:13,vars:4,consts:[[1,"table"],[1,"filter-suggestion-header","row"],["trans","",1,"column"],["role","list",1,"body"],["role","listitem","class","row filter-suggestion-item","tabindex","0",3,"click",4,"ngFor","ngForOf"],[1,"help-container"],["svgIcon","info"],["trans",""],["role","listitem","tabindex","0",1,"row","filter-suggestion-item",3,"click"],["filterSuggestion",""],["trans","",1,"column","label-column"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.TgZ(1,"div",1),i.TgZ(2,"div",2),i._uU(3,"Field"),i.qZA(),i.TgZ(4,"div",2),i._uU(5,"Description"),i.qZA(),i.qZA(),i.TgZ(6,"div",3),i.YNc(7,f,6,4,"div",4),i.ALo(8,"keyvalue"),i.qZA(),i.qZA(),i.TgZ(9,"div",5),i._UZ(10,"mat-icon",6),i.TgZ(11,"div",7),i._uU(12," Use arrows, tab or mouse to navigate added filters. Backspace or delete key to remove them. "),i.qZA(),i.qZA()),2&e&&(i.xp6(7),i.Q6J("ngForOf",i.xi3(8,1,t.filters,t.originalOrder)))},directives:[p.P,g.sg,h.Hw],pipes:[g.Nd],styles:["[_nghost-%COMP%]{display:none;position:absolute;left:0;z-index:10;background-color:var(--be-background);width:100%;border-radius:4px;overflow:hidden;color:var(--be-text);box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.visible[_nghost-%COMP%]{display:block}.filter-suggestion-header[_ngcontent-%COMP%]{background-color:var(--be-background-alternative)}.row[_ngcontent-%COMP%]{display:flex;height:55px;padding:15px;border-bottom:1px solid var(--be-divider-lighter)}.row[_ngcontent-%COMP%]:not(.header){cursor:pointer}.row[_ngcontent-%COMP%]:not(.header):focus, .row[_ngcontent-%COMP%]:not(.header):hover{background-color:var(--be-hover)}.row[_ngcontent-%COMP%]:not(.header):focus{outline:none}.column[_ngcontent-%COMP%]{flex:0 0 48%}.label-column[_ngcontent-%COMP%]{text-transform:capitalize}.help-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:12px;background-color:var(--be-accent-emphasis)}.help-container[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:10px;color:var(--be-accent-default)}"],changeDetection:0}),e})();var b=n(58480),v=n(95439),Z=n(3679),x=n(15381);function y(e,t){if(1&e&&(i.ynx(0),i._UZ(1,"img",2),i.TgZ(2,"div",3),i._uU(3),i.qZA(),i.BQk()),2&e){const e=t.ngIf;i.xp6(1),i.Q6J("src",e.image,i.LSH),i.xp6(2),i.Oqu(e.name)}}function A(e,t){1&e&&(i.TgZ(0,"div",4),i._uU(1,"Click to select"),i.qZA())}let w=(()=>{class e{constructor(e){this.dialog=e,this.value$=new l.X(null)}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.value$.next(e)}onClick(){this.openSelectModelDialog()}openSelectModelDialog(){this.dialog.open(this.filter.component,this.filter.componentData).afterClosed().subscribe(e=>{e&&(this.value$.next(e),this.propagateChange(e))})}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(x.u))},e.\u0275cmp=i.Xpm({type:e,selectors:[["select-model-control"]],hostBindings:function(e,t){1&e&&i.NdJ("click",function(){return t.onClick()})},inputs:{filter:"filter"},features:[i._Bn([{provide:Z.JU,useExisting:e,multi:!0}])],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["defaultHint",""],[1,"image",3,"src"],[1,"name"],["trans",""]],template:function(e,t){if(1&e&&(i.YNc(0,y,4,2,"ng-container",0),i.ALo(1,"async"),i.YNc(2,A,2,0,"ng-template",null,1,i.W1O)),2&e){const e=i.MAs(3);i.Q6J("ngIf",i.lcZ(1,2,t.value$))("ngIfElse",e)}},directives:[g.O5,p.P],pipes:[g.Ov],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 8px;cursor:pointer}img[_ngcontent-%COMP%]{height:22px;width:22px;border-radius:4px;margin-right:8px;flex-shrink:0;-o-object-fit:cover;object-fit:cover}"],changeDetection:0}),e})();const C={"=":"is","!=":"is not",">":"is greater than",">=":"is greater than or equal to","<":"is less than","<=":"is less than or equal to",has:"Include",doesntHave:"Do not include"};var T=n(96605);let q=(()=>{class e{constructor(e){this.breakpoints=e}transform(e,t){return t||this.breakpoints.isMobile$.value?e:C[e]}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(T.S,16))},e.\u0275pipe=i.Yjl({name:"operatorDisplayName",type:e,pure:!0}),e})();const k=["select"];function M(e,t){if(1&e&&(i.TgZ(0,"option",4),i._uU(1),i.ALo(2,"operatorDisplayName"),i.qZA()),2&e){const e=t.$implicit,n=i.oxw();i.Q6J("value",e),i.xp6(1),i.hij(" ",i.xi3(2,2,e,n.compact)," ")}}let I=(()=>{class e{ngAfterViewInit(){this.resizeSelect()}resizeSelect(){var e;const t=null===(e=this.select)||void 0===e?void 0:e.nativeElement;t&&t.selectedIndex>-1&&(t.style.width=`${t.options[t.selectedIndex].label.length+5}ch`)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Xpm({type:e,selectors:[["operator-select"]],viewQuery:function(e,t){if(1&e&&i.Gf(k,5),2&e){let e;i.iGM(e=i.CRH())&&(t.select=e.first)}},inputs:{compact:"compact",formGroup:"formGroup",operators:"operators"},decls:4,vars:2,consts:[[3,"formGroup"],["formControlName","operator",1,"operator-select",3,"ngModelChange"],["select",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(e,t){1&e&&(i.ynx(0,0),i.TgZ(1,"select",1,2),i.NdJ("ngModelChange",function(){return t.resizeSelect()}),i.YNc(3,M,3,5,"option",3),i.qZA(),i.BQk()),2&e&&(i.Q6J("formGroup",t.formGroup),i.xp6(3),i.Q6J("ngForOf",t.operators))},directives:[Z.JL,Z.sg,Z.EJ,Z.JJ,Z.u,g.sg,Z.YN,Z.Kr],pipes:[q],styles:['[_nghost-%COMP%]{display:flex;align-items:center;position:relative;height:100%}[_nghost-%COMP%]:before{content:"";position:absolute;top:0;bottom:0;width:50%;left:0;background-color:var(--be-chip)}[_nghost-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;width:50%;right:0;background-color:var(--be-accent-default)}.operator-select[_ngcontent-%COMP%]{transition:width .1s ease-in-out 0s;padding:2px 8px;min-width:60px;max-width:200px;height:27px;color:var(--be-accent-default);z-index:10;background-color:var(--be-accent-contrast);text-overflow:ellipsis;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;-moz-text-align-last:center;text-align-last:center;border:1px solid transparent}.operator-select[_ngcontent-%COMP%]:focus-visible{outline:0;border-color:var(--be-accent-default);box-shadow:0 0 0 1px #fff}'],changeDetection:0}),e})();const U=["valueInput"];function O(e,t){if(1&e&&i._UZ(0,"operator-select",8),2&e){const e=i.oxw().ngIf,t=i.oxw();i.Q6J("compact",t.compact)("formGroup",e)("operators",t.filter.operators)}}function D(e,t){if(1&e&&(i.TgZ(0,"option",16),i._uU(1),i.qZA()),2&e){const e=t.$implicit;i.Q6J("ngValue",e.value),i.xp6(1),i.hij(" ",e.key||e.value," ")}}function P(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",9),i.TgZ(1,"select",10,11),i.NdJ("ngModelChange",function(){return i.CHM(e),i.oxw(2).resizeInput()}),i.YNc(3,D,2,2,"option",12),i.qZA(),i.O4$(),i.TgZ(4,"svg",13),i._UZ(5,"path",14),i._UZ(6,"path",15),i.qZA(),i.qZA()}if(2&e){const e=i.oxw(2);i.xp6(1),i.Q6J("id",e.key)("compareWith",e.compareFilterValueFn),i.xp6(2),i.Q6J("ngForOf",e.filter.options)}}function S(e,t){if(1&e&&(i.TgZ(0,"div",17),i._UZ(1,"input",18,11),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.Q6J("id",e.key)}}function J(e,t){if(1&e&&i._UZ(0,"select-model-control",19,11),2&e){const e=i.oxw(2);i.Q6J("filter",e.filter)("id",e.key)}}function N(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",9),i.TgZ(1,"input",20,11),i.NdJ("ngModelChange",function(){return i.CHM(e),i.oxw(2).resizeInput()}),i.qZA(),i.qZA()}if(2&e){const e=i.oxw(2);i.xp6(1),i.Q6J("id",e.key)("type",e.filter.inputType||"text")}}function R(e,t){if(1&e){const e=i.EpF();i.ynx(0,1),i.TgZ(1,"div",2),i.NdJ("click",function(){return i.CHM(e),i.oxw().el.nativeElement.focus()}),i._uU(2),i.qZA(),i.YNc(3,O,1,3,"operator-select",3),i.ynx(4,4),i.YNc(5,P,7,3,"div",5),i.YNc(6,S,3,1,"div",6),i.YNc(7,J,2,2,"select-model-control",7),i.YNc(8,N,3,2,"div",5),i.BQk(),i.BQk()}if(2&e){const e=t.ngIf,n=i.oxw();i.Q6J("formGroup",e),i.xp6(2),i.Oqu(n.filter.label),i.xp6(1),i.Q6J("ngIf",n.filter.operators),i.xp6(1),i.Q6J("ngSwitch",n.filter.type),i.xp6(1),i.Q6J("ngSwitchCase","select"),i.xp6(1),i.Q6J("ngSwitchCase","datePicker"),i.xp6(1),i.Q6J("ngSwitchCase","selectModel"),i.xp6(1),i.Q6J("ngSwitchCase","input")}}let Q=(()=>{class e{constructor(e){this.el=e,this.compareFilterValueFn=(e,t)=>v(e,t)}ngAfterViewInit(){this.resizeInput()}focus(){this.el.nativeElement.focus()}focusValueInput(){var e;this.valueInput instanceof w?this.valueInput.openSelectModelDialog():(null===(e=this.valueInput)||void 0===e?void 0:e.nativeElement)&&this.valueInput.nativeElement.focus()}resizeInput(){var e;const t=null===(e=this.valueInput)||void 0===e?void 0:e.nativeElement;if("SELECT"===(null==t?void 0:t.nodeName)){const e=t;e.selectedIndex>-1&&(e.style.width=`${e.options[e.selectedIndex].label.length+5}ch`)}else"INPUT"===(null==t?void 0:t.nodeName)&&"date"!==t.type&&(t.style.width=`${t.value.length+7}ch`)}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq))},e.\u0275cmp=i.Xpm({type:e,selectors:[["active-filter"]],viewQuery:function(e,t){if(1&e&&i.Gf(U,5),2&e){let e;i.iGM(e=i.CRH())&&(t.valueInput=e.first)}},hostAttrs:["tabIndex","0","role","button"],hostVars:1,hostBindings:function(e,t){2&e&&i.uIk("data-control-key",t.key)},inputs:{key:"key",compact:"compact",form:"form",filter:"filter"},decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],["trans","",1,"filter-label",3,"click"],[3,"compact","formGroup","operators",4,"ngIf"],[3,"ngSwitch"],["class","filter-input-container",4,"ngSwitchCase"],["class","date-picker-container",4,"ngSwitchCase"],["formControlName","value","class","filter-value select-model-input",3,"filter","id",4,"ngSwitchCase"],[3,"compact","formGroup","operators"],[1,"filter-input-container"],["formControlName","value",1,"filter-input","filter-value",3,"id","compareWith","ngModelChange"],["valueInput",""],["trans","",3,"ngValue",4,"ngFor","ngForOf"],["viewBox","0 0 24 24",1,"caret-svg"],["d","M7 10l5 5 5-5z"],["d","M0 0h24v24H0z","fill","none"],["trans","",3,"ngValue"],[1,"date-picker-container"],["type","date","formControlName","value",1,"date-input","filter-value",3,"id"],["formControlName","value",1,"filter-value","select-model-input",3,"filter","id"],["formControlName","value","min","1","required","",1,"filter-input","filter-value",3,"id","type","ngModelChange"]],template:function(e,t){1&e&&i.YNc(0,R,9,8,"ng-container",0),2&e&&i.Q6J("ngIf",t.form.controls[t.key])},directives:[g.O5,Z.JL,Z.sg,p.P,g.RF,g.n9,I,Z.EJ,Z.JJ,Z.u,g.sg,Z.YN,Z.Kr,Z.Fj,w,Z.Q7],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:flex-start;border-radius:4px;height:37px;background-color:var(--be-chip);margin:3px 5px 3px 0}[_nghost-%COMP%]:focus{outline:none;box-shadow:var(--be-accent-default) 0 0 0 1px}.filter-label[_ngcontent-%COMP%]{color:var(--be-text);line-height:37px;cursor:pointer;padding:0 12px;text-transform:capitalize;white-space:nowrap;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filter-input-container[_ngcontent-%COMP%]{position:relative;height:100%;overflow:hidden;border-radius:0 4px 4px 0}.caret-svg[_ngcontent-%COMP%]{position:absolute;top:9.5px;right:5px;z-index:11;fill:var(--be-accent-contrast);width:18px;height:18px;pointer-events:none}.filter-input[_ngcontent-%COMP%]{border:0;transition:width .1s ease-in-out 0s;padding:0 12px;min-width:60px;max-width:200px;z-index:10;text-overflow:ellipsis;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;font-weight:500}select.filter-select[_ngcontent-%COMP%]{padding:0 25px 0 12px}.date-input[_ngcontent-%COMP%]{position:relative;max-width:30ch;line-height:37px;height:37px;font-size:inherit;border:none;margin:0;padding:0 12px;width:20ch;font-weight:500}.select-model-input[_ngcontent-%COMP%]{min-width:76px;height:100%}.filter-value[_ngcontent-%COMP%]{background-color:var(--be-accent-default);color:var(--be-accent-contrast);border-radius:0 4px 4px 0}"],changeDetection:0}),e})();function F(e,t){if(1&e&&i._UZ(0,"active-filter",2),2&e){const e=t.ngIf,n=i.oxw(),a=n.$implicit,s=n.index,o=i.oxw();i.Q6J("compact",o.compact)("key",a.key)("form",o.form)("filter",e),i.uIk("data-index",s)}}function E(e,t){if(1&e&&(i.ynx(0),i.YNc(1,F,1,5,"active-filter",1),i.BQk()),2&e){const e=t.$implicit,n=i.oxw();i.xp6(1),i.Q6J("ngIf",n.config[e.value.value.key])}}const Y=["*"];let L=(()=>{class e{constructor(e,t,n){this.fb=e,this.cd=t,this.el=n}add(e,t={}){const n=void 0!==t.value?t.value:e.defaultValue,i=this.fb.group({key:e.key,value:n,operator:t.operator||e.defaultOperator}),a=Object.keys(this.form.controls).length+(0,b.O)(8);this.form.addControl(a,i,{emitEvent:""!==n}),this.cd.detectChanges(),t.focus&&this.filters.last.focusValueInput()}removeByKey(e){this.form.removeControl(e),this.cd.markForCheck()}removeCurrentlyFocused(){const e=document.activeElement;this.removeByKey(e.dataset.controlKey)}anyFocused(){return"ACTIVE-FILTER"===document.activeElement.nodeName}focusLast(){this.filters.last&&this.filters.last.focus()}focusPrevious(){const e=this.getFocusedIndex(),t=this.filters.get(e-1);t&&t.focus()}getByIndex(e){return this.filters.get(e)}lastIsFocused(){return this.getFocusedIndex()===this.filters.length-1}getFocusedIndex(){const e=document.activeElement.dataset.index;return e?parseInt(e):null}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(Z.qu),i.Y36(i.sBO),i.Y36(i.SBq))},e.\u0275cmp=i.Xpm({type:e,selectors:[["active-filters"]],viewQuery:function(e,t){if(1&e&&i.Gf(Q,5),2&e){let e;i.iGM(e=i.CRH())&&(t.filters=e)}},inputs:{compact:"compact",form:"form",config:"config"},ngContentSelectors:Y,decls:3,vars:3,consts:[[4,"ngFor","ngForOf"],[3,"compact","key","form","filter",4,"ngIf"],[3,"compact","key","form","filter"]],template:function(e,t){1&e&&(i.F$t(),i.YNc(0,E,2,1,"ng-container",0),i.ALo(1,"keyvalue"),i.Hsn(2)),2&e&&i.Q6J("ngForOf",i.lcZ(1,1,t.form.controls))},directives:[g.sg,g.O5,Q],pipes:[g.Nd],styles:["[_nghost-%COMP%]{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center}"],changeDetection:0}),e})();var $=n(63423),V=n(63868),H=n(51095),z=n(63297);const B=["searchInput"],j=["filterSuggestion"];function G(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"button",8),i.NdJ("click",function(){return i.CHM(e),i.oxw().clearSearch()}),i._UZ(1,"mat-icon",9),i.qZA()}}function X(e,t){1&e&&(i.TgZ(0,"span",13),i._uU(1,"Filter"),i.qZA())}function W(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"button",10),i.NdJ("click",function(){return i.CHM(e),i.oxw().toggleFilterDropdown()}),i._UZ(1,"mat-icon",11),i.YNc(2,X,2,0,"span",12),i.qZA()}if(2&e){const e=i.oxw();i.xp6(2),i.Q6J("ngIf",!e.compact)}}let K=(()=>{class e{constructor(e,t,n,a,s,o){this.fb=e,this.route=t,this.el=n,this.keybinds=a,this.cd=s,this.router=o,this.filterChange=new i.vpe,this.inputFocus=new i.vpe,this.form=this.fb.group({}),this.filterBarHeight=0,this.filterDropdownVisible$=new l.X(!1)}set filters(e){e?(this.keyedFilters={},(e||[]).forEach(e=>{this.keyedFilters[e.key]=e})):this.keyedFilters=null}ngOnInit(){this.haveFiltersOrQuery$=(0,c.aj)([this.searchControl.valueChanges.pipe((0,a.O)(null)),this.form.valueChanges.pipe((0,a.O)(null))]).pipe((0,s.U)(([e,t])=>e||t&&0!==Object.keys(t).length))}ngAfterViewInit(){this.watchForSizeChanges(),this.setFiltersFromQuery(),this.setupKeybinds(),this.subscribeToCloseActions(),this.bindToFormValueChange()}onClick(e){e.target!==this.el.nativeElement&&e.target!==this.activeFilters.el.nativeElement||this.searchInput.nativeElement.focus()}ngOnDestroy(){var e;null===(e=this.closeActionsStream$)||void 0===e||e.unsubscribe()}clearSearch(){Object.keys(this.form.controls).forEach(e=>{this.activeFilters.removeByKey(e)}),this.searchControl.reset(null,{emitEvent:!1}),this.form.reset()}toggleFilterDropdown(){this.filterDropdownVisible$.next(!this.filterDropdownVisible$.value)}addFilterFromDropdownClick(e){this.activeFilters.add(e,{focus:!0}),this.filterDropdownVisible$.next(!1)}searchInputIsFocused(){return document.activeElement===this.searchInput.nativeElement}cursorAtStartOfSearchInput(){return this.searchInputIsFocused()&&0===this.searchInput.nativeElement.selectionStart}cursorAtEndOfSearchInput(){return this.searchInputIsFocused()&&this.searchInput.nativeElement.selectionStart===this.searchInput.nativeElement.value.length}bindToFormValueChange(){this.form.valueChanges.pipe((0,s.U)(e=>Object.keys(e).length?e:null),(0,o.x)()).subscribe(e=>{this.filterChange.emit(e?ee(e):null)})}watchForSizeChanges(){new ResizeObserver(e=>{this.filterBarHeight=e[0].contentRect.height}).observe(this.el.nativeElement,{box:"border-box"})}setFiltersFromQuery(){const e=this.router.routerState.root.snapshot.queryParams;e.filters&&te(e.filters).forEach(e=>{this.activeFilters.add(this.keyedFilters[e.key],e)}),e.query&&this.searchControl.setValue(e.query)}setupKeybinds(){this.keybinds.add(["backspace","delete"],()=>this.cursorAtStartOfSearchInput()?this.activeFilters.focusLast():this.activeFilters.anyFocused()?(this.activeFilters.removeCurrentlyFocused(),this.searchInput.nativeElement.focus()):void 0),this.keybinds.add("arrow_left",e=>{this.cursorAtStartOfSearchInput()?(this.activeFilters.focusLast(),e.preventDefault()):this.activeFilters.anyFocused()&&(this.activeFilters.focusPrevious(),e.preventDefault())}),this.keybinds.add("arrow_right",e=>{if(this.activeFilters.anyFocused()){e.preventDefault();const t=this.activeFilters.getFocusedIndex(),n=this.activeFilters.getByIndex(t+1);n?n.focus():this.activeFilters.lastIsFocused()&&this.searchInput.nativeElement.focus()}}),this.keybinds.add(["arrow_down","tab"],e=>{if(this.cursorAtEndOfSearchInput()||this.suggestions.anyFocused()){e.preventDefault(),this.filterDropdownVisible$.value||this.toggleFilterDropdown();const t=this.suggestions.getFocusedIndex();let n=t>-1?t:0;this.suggestions.anyFocused()&&(n+=1),n>=this.suggestions.items.length&&(n=0),this.suggestions.focusItemAt(n)}}),this.keybinds.add(["arrow_up","shift+tab"],e=>{if(this.suggestions.anyFocused()){e.preventDefault();const t=this.activeFilters.getFocusedIndex();let n=t>-1?t:0;n-=1,-1===n?this.searchInput.nativeElement.focus():this.suggestions.focusItemAt(n)}}),this.keybinds.add("enter",e=>{const t=this.suggestions.getFocusedFilter();t&&(e.preventDefault(),this.activeFilters.add(t,{focus:!0}),this.filterDropdownVisible$.next(!1))}),this.keybinds.add("esc",e=>{this.filterDropdownVisible$.value&&(e.preventDefault(),this.filterDropdownVisible$.next(!1))}),this.keybinds.listenOn(document,{fireIfInputFocused:!0})}subscribeToCloseActions(){this.closeActionsStream$=(0,d.T)((0,u.R)(document,"click"),(0,u.R)(document,"auxclick"),(0,u.R)(document,"touchend")).pipe((0,r.h)(e=>{const t=e.target;return t!==this.el.nativeElement&&!this.el.nativeElement.contains(t)})).subscribe(()=>{this.filterDropdownVisible$.next(!1)})}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(Z.qu),i.Y36($.gz),i.Y36(i.SBq),i.Y36(V.C),i.Y36(i.sBO),i.Y36($.F0))},e.\u0275cmp=i.Xpm({type:e,selectors:[["search-input-with-filters"]],viewQuery:function(e,t){if(1&e&&(i.Gf(B,5),i.Gf(_,5),i.Gf(L,5),i.Gf(j,5)),2&e){let e;i.iGM(e=i.CRH())&&(t.searchInput=e.first),i.iGM(e=i.CRH())&&(t.suggestions=e.first),i.iGM(e=i.CRH())&&(t.activeFilters=e.first),i.iGM(e=i.CRH())&&(t.filterContainers=e)}},hostBindings:function(e,t){1&e&&i.NdJ("click",function(e){return t.onClick(e)})},inputs:{compact:"compact",searchControl:"searchControl",pluralName:"pluralName",filters:"filters"},outputs:{filterChange:"filterChange",inputFocus:"inputFocus"},decls:11,vars:18,consts:[[3,"form","config","compact"],[1,"input-container","search-input-container"],["svgIcon","search",1,"search-icon"],["type","text",1,"search-input",3,"placeholder","formControl","focus"],["searchInput",""],["type","button","class","clear-button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-button","","class","filter-button",3,"click",4,"ngIf"],[3,"filters","filterSelected"],["type","button","mat-icon-button","",1,"clear-button",3,"click"],["svgIcon","close"],["type","button","mat-button","",1,"filter-button",3,"click"],["svgIcon","filter-list",1,"filter-button-icon"],["class","filter-button-text","trans","",4,"ngIf"],["trans","",1,"filter-button-text"]],template:function(e,t){1&e&&(i.TgZ(0,"active-filters",0),i.TgZ(1,"div",1),i._UZ(2,"mat-icon",2),i.TgZ(3,"input",3,4),i.NdJ("focus",function(){return t.inputFocus.emit()}),i.ALo(5,"trans"),i.qZA(),i.qZA(),i.qZA(),i.YNc(6,G,2,0,"button",5),i.ALo(7,"async"),i.YNc(8,W,3,1,"button",6),i.TgZ(9,"filter-suggestions",7),i.NdJ("filterSelected",function(e){return t.addFilterFromDropdownClick(e)}),i.ALo(10,"async"),i.qZA()),2&e&&(i.Q6J("form",t.form)("config",t.keyedFilters)("compact",t.compact),i.xp6(3),i.Q6J("placeholder",i.lcZ(5,12,"Type to search for "+t.pluralName))("formControl",t.searchControl),i.xp6(3),i.Q6J("ngIf",i.lcZ(7,14,t.haveFiltersOrQuery$)),i.xp6(2),i.Q6J("ngIf",t.keyedFilters),i.xp6(1),i.Udp("top",t.filterBarHeight+5+"px"),i.ekj("visible",i.lcZ(10,16,t.filterDropdownVisible$)),i.Q6J("filters",t.keyedFilters))},directives:[L,h.Hw,Z.Fj,Z.JJ,Z.oH,g.O5,_,H.lW,p.P],pipes:[z.R,g.Ov],styles:["[_nghost-%COMP%]{display:flex;background-color:var(--be-background);border:1px solid var(--be-divider-default);height:45px;border-radius:4px;position:relative;padding-left:3px;overflow:hidden;width:100%}@media only screen and (max-width:768px){[_nghost-%COMP%]{flex-wrap:wrap;justify-content:center}}[_nghost-%COMP%]:focus-within{outline:none;border-color:var(--be-accent-lighter);box-shadow:0 0 0 2px var(--be-accent-lighter);z-index:3;overflow:visible;height:auto!important}.search-input-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1 1 auto;width:auto;height:43px;padding-left:8px}.search-icon[_ngcontent-%COMP%]{display:block;color:var(--be-secondary-text);margin-right:5px}.search-input[_ngcontent-%COMP%]{border:none;height:100%;padding:0}.search-input[_ngcontent-%COMP%]:focus{box-shadow:none;z-index:1}.filter-button[_ngcontent-%COMP%]{min-width:auto;padding:0 14px}.clear-button[_ngcontent-%COMP%], .filter-button[_ngcontent-%COMP%]{color:var(--be-accent-default);height:43px}.clear-button[_ngcontent-%COMP%]{width:43px;line-height:43px}.filter-button-text[_ngcontent-%COMP%]{margin-left:10px}"],changeDetection:0}),e})();const ee=e=>{const t=[];return Object.values(e).forEach(e=>{""!==e.value&&t.push(e)}),t.length?encodeURIComponent(btoa(JSON.stringify(t))):""},te=e=>{let t=[];try{t=JSON.parse(atob(decodeURIComponent(e)))}catch(n){}return t}},6253:function(e,t,n){"use strict";n.d(t,{B:function(){return u}});var i=n(38583),a=n(49866),s=n(3679),o=n(76627),r=n(51095),l=n(22238),c=n(43389),d=n(37716);let u=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=d.oAB({type:e}),e.\u0275inj=d.cJS({imports:[[i.ez,a.N,s.UX,o.Ps,r.ot,l.Is,c.p]]}),e})()},32141:function(e,t,n){"use strict";n.d(t,{V:function(){return m}});var i=n(3679),a=n(45435),s=n(88002),o=n(37716),r=n(99883),l=n(38583),c=n(51095),d=n(76627),u=n(15515),p=n(63297);function g(e,t){if(1&e&&(o.TgZ(0,"div",6),o.TgZ(1,"div",7),o._uU(2,"Items per page"),o.qZA(),o.TgZ(3,"div",8),o.TgZ(4,"select",9),o.TgZ(5,"option",10),o._uU(6,"10"),o.qZA(),o.TgZ(7,"option",10),o._uU(8,"15"),o.qZA(),o.TgZ(9,"option",10),o._uU(10,"20"),o.qZA(),o.TgZ(11,"option",10),o._uU(12,"50"),o.qZA(),o.TgZ(13,"option",10),o._uU(14,"100"),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(4),o.Q6J("formControl",e.perPageControl),o.xp6(1),o.Q6J("ngValue",10),o.xp6(2),o.Q6J("ngValue",15),o.xp6(2),o.Q6J("ngValue",20),o.xp6(2),o.Q6J("ngValue",50),o.xp6(2),o.Q6J("ngValue",100)}}function h(e,t){if(1&e&&(o.TgZ(0,"div",11),o._uU(1),o.ALo(2,"trans"),o.ALo(3,"number"),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.HOy(" ",e.from," - ",e.to," ",o.lcZ(2,4,"of")," ",o.lcZ(3,6,e.totalRecords)," ")}}let m=(()=>{class e{constructor(e,t){this.datable=e,this.cd=t,this.hidePerPage=!1,this.perPageControl=new i.NI(15)}ngOnInit(){this.changeRef=this.datable.paginator.response$.pipe((0,a.h)(e=>!!(null==e?void 0:e.pagination)),(0,s.U)(e=>e.pagination)).subscribe(e=>{this.totalRecords=e.total,this.to=Math.min(e.per_page*e.current_page,this.totalRecords),this.from=Math.max(this.to-e.per_page,1),this.havePrevious=this.datable.paginator.canLoadPrevPage(),this.haveNext=this.datable.paginator.canLoadNextPage(),this.perPageControl.setValue(parseInt(""+e.per_page),{emitEvent:!1}),this.cd.markForCheck()}),this.perPageControl.valueChanges.subscribe(e=>{this.datable.paginator.changePerPage(e)})}ngOnDestroy(){this.changeRef.unsubscribe(),this.datable.destroy()}previousPage(){this.datable.paginator.previousPage()}nextPage(){this.datable.paginator.nextPage()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(r.x),o.Y36(o.sBO))},e.\u0275cmp=o.Xpm({type:e,selectors:[["datatable-footer"]],inputs:{hidePerPage:"hidePerPage"},decls:9,vars:8,consts:[["class","page-size",4,"ngIf"],[1,"range-actions"],["class","range-label",4,"ngIf"],["type","button","mat-icon-button","",1,"range-button",3,"disabled","click"],["svgIcon","chevron-left"],["svgIcon","chevron-right"],[1,"page-size"],["trans","",1,"page-size-label"],[1,"input-container"],[1,"page-size-input",3,"formControl"],[3,"ngValue"],[1,"range-label"]],template:function(e,t){1&e&&(o.YNc(0,g,15,6,"div",0),o.TgZ(1,"div",1),o.YNc(2,h,4,8,"div",2),o.TgZ(3,"button",3),o.NdJ("click",function(){return t.previousPage()}),o.ALo(4,"async"),o._UZ(5,"mat-icon",4),o.qZA(),o.TgZ(6,"button",3),o.NdJ("click",function(){return t.nextPage()}),o.ALo(7,"async"),o._UZ(8,"mat-icon",5),o.qZA(),o.qZA()),2&e&&(o.Q6J("ngIf",!t.hidePerPage),o.xp6(2),o.Q6J("ngIf",t.from&&t.to&&t.totalRecords),o.xp6(1),o.Q6J("disabled",!t.havePrevious||o.lcZ(4,4,t.datable.paginator.loading$)),o.xp6(3),o.Q6J("disabled",!t.haveNext||o.lcZ(7,6,t.datable.paginator.loading$)))},directives:[l.O5,c.lW,d.Hw,u.P,i.EJ,i.JJ,i.oH,i.YN,i.Kr],pipes:[l.Ov,p.R,l.JJ],styles:["[_nghost-%COMP%]{display:flex;padding:0 8px;align-items:center;justify-content:flex-end;flex-wrap:wrap-reverse;width:100%;height:56px}.page-size[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:8px}.page-size-label[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--be-secondary-text);margin:0 4px}.input-container[_ngcontent-%COMP%]{width:auto}.page-size-input[_ngcontent-%COMP%]{width:60px;height:33px;padding:4px;margin:0 4px}.range-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.range-label[_ngcontent-%COMP%]{margin:0 32px 0 24px;font-size:1.2rem}.range-button[_ngcontent-%COMP%], .range-label[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.range-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}"],changeDetection:0}),e})()},58193:function(e,t,n){"use strict";n.d(t,{x:function(){return _}});var i=n(38583),a=n(76627),s=n(49866),o=n(7539),r=n(3679),l=n(51095),c=n(58341),d=n(12178),u=n(87738),p=n(95217),g=n(98097),h=n(6253),m=n(63423),f=n(37716);let _=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=f.oAB({type:e}),e.\u0275inj=f.cJS({imports:[[i.ez,s.N,r.UX,r.u5,u.G,p.u,g.X,h.B,m.Bz,l.ot,a.Ps,o.p9,c.Hi,d.Cv],o.p9]}),e})()},99883:function(e,t,n){"use strict";n.d(t,{x:function(){return k}});var i=n(26215),a=n(90739),s=n(61927),o=n(25917),r=n(88002),l=n(43190),c=n(93342),d=n(37716),u=n(63423),p=n(90299),g=n(90962);let h=(()=>{class e{constructor(e,t,n){this.router=e,this.http=t,this.localStorage=n,this.params$=new i.X({}),this.paginatedOnce$=new i.X(!1),this.loading$=new i.X(!1),this.response$=new i.X(null),this.dontUpdateQueryParams=!1,this.perPageCacheKey=null,this.noResults$=this.response$.pipe((0,r.U)(e=>this.paginatedOnce$.value&&0===e.pagination.data.length))}get params(){return this.params$.value}get currentPage(){var e,t;return null===(t=null===(e=this.response$.value)||void 0===e?void 0:e.pagination)||void 0===t?void 0:t.current_page}paginate(e={},t,n){const i=this.subscription?{}:this.currentQueryParams();this.params$.next(Object.assign(Object.assign(Object.assign({},this.response$.value?{perPage:this.response$.value.pagination.per_page,page:this.response$.value.pagination.current_page}:{}),i),e)),this.subscription||this.init(t,n)}nextPage(){const e=this.response$.value.pagination.current_page||0;this.paginate(Object.assign(Object.assign({},this.params$.value),{page:e+1,cursor:this.response$.value.pagination.next_cursor}))}previousPage(){const e=this.response$.value.pagination.current_page;this.paginate(Object.assign(Object.assign({},this.params$.value),{page:e-1||1,cursor:this.response$.value.pagination.prev_cursor}))}changePerPage(e){var t;e!==(null===(t=this.params$.value)||void 0===t?void 0:t.perPage)&&(this.perPageCacheKey&&this.localStorage.set(this.perPageCacheKey,e),this.paginate(Object.assign(Object.assign({},this.params$.value),{perPage:e})))}currentQueryParams(){return this.router.routerState.root.snapshot.queryParams}init(e,t){this.subscription=this.params$.pipe((0,l.w)(n=>{this.loading$.next(!0);const i=!this.paginatedOnce$.value;return i&&this.perPageCacheKey&&this.localStorage.get(this.perPageCacheKey)&&(n=Object.assign({perPage:this.localStorage.get(this.perPageCacheKey)},n)),(i&&t?(0,o.of)({pagination:t}):this.http.get(e,n)).pipe((0,c.b)(()=>{this.updateQueryParams(n),this.loading$.next(!1),this.paginatedOnce$.next(!0)},()=>{this.loading$.next(!1),this.paginatedOnce$.next(!0)}))})).subscribe(e=>{this.response$.next(e)})}updateQueryParams(e={}){if(!this.dontUpdateQueryParams){for(const t in e)Array.isArray(e[t])&&(e[t]=e[t].join(","));this.router.navigate([],{queryParams:e,replaceUrl:!0})}}canLoadNextPage(){var e;const t=null===(e=this.response$.value)||void 0===e?void 0:e.pagination;return!!t&&(!!t.next_cursor||this.currentPage<t.last_page)}canLoadPrevPage(){var e;const t=null===(e=this.response$.value)||void 0===e?void 0:e.pagination;return!!t&&(!!t.prev_cursor||this.currentPage>1)}}return e.\u0275fac=function(t){return new(t||e)(d.LFG(u.F0),d.LFG(p.r),d.LFG(g.m))},e.\u0275prov=d.Yz7({token:e,factory:e.\u0275fac}),e})();var m=n(54395),f=n(59328),_=n(45435),b=n(84889),v=n(8208),Z=n(48358),x=n(80970),y=n(39490);function A(e,t){const n=x.pick(t,e);if((0,y.t6)(n)){const e=Number(n);return e<9007199254740991?e:n}return n}function w(e,t){return e.filter(e=>function(e,t){const n="string"==typeof e?e:C(e),i=t.trim().toLowerCase();return-1!==n.indexOf(i)}(e,t))}function C(e){return Object.keys(e).reduce((t,n)=>t+(e[n]&&"object"==typeof e[n]?C(e[n]):e[n])+"\u25ec","").toLowerCase()}var T=n(3679),q=n(15381);let k=(()=>{class e{constructor(e,t,n,a){this.modal=e,this.router=t,this.http=n,this.localStorage=a,this.sort$=new i.X({}),this.filters$=new i.X({}),this.searchControl=new T.NI,this.searchTerm$=new i.X(null),this.staticParams$=new i.X({}),this.paginator=new h(this.router,this.http,this.localStorage),this.ignoreNextParamChange=!1,this.originalData$=new i.X([]),this.data$=new i.X([]),this.selectedRows$=new i.X([])}get data(){return this.data$.value}set data(e){const t=[...e];this.originalData$.next(t),this.data$.next(t),this.ignoreNextParamChange=!0,this.reset()}init(e={}){if(this.config=e,this.staticParams$.next(Object.assign(Object.assign({},this.staticParams$.value),e.staticParams)),e.uri?this.connectToPaginator():e.initialData&&(this.data=e.initialData),e.uri){const e=this.router.routerState.root.snapshot.queryParams,t=e.query;this.searchControl.setValue(t),this.searchTerm$.next(t),this.sort$.next({orderBy:e.orderBy,orderDir:e.orderDir})}return this.searchControlSub=this.searchControl.valueChanges.pipe((0,m.b)(300)).subscribe(e=>{this.searchTerm$.next(e)}),this.mainSub=(0,a.aj)([this.sort$,this.filters$,this.searchTerm$.pipe((0,r.U)(e=>({query:e}))),this.staticParams$]).pipe((0,m.b)(0,s.Z),(0,r.U)(e=>Object.assign({},...e))).subscribe(e=>{if(this.ignoreNextParamChange)return this.ignoreNextParamChange=!1;e=(0,b.N)(e),Object.entries(e).forEach(([t,n])=>{"object"==typeof n&&n.id&&(e[`${t}Id`]=n.id,delete e[t])}),this.config.uri?this.paginator.paginate(e,this.config.uri,this.config.initialData):Object.keys(e).length&&this.data.length&&this.applyLocalTransforms(e)}),this}connectToPaginator(){this.paginatorSub=this.paginator.response$.pipe((0,f.G)()).subscribe(([e,t])=>{var n;const i=this.config.infiniteScroll&&(null===(n=null==e?void 0:e.pagination)||void 0===n?void 0:n.current_page)!==t.pagination.current_page?[...this.data$.value,...t.pagination.data]:t.pagination.data;this.data$.next(i)})}applyLocalTransforms(e){let t=[...this.originalData$.value];e.query&&(t=w(t,e.query)),e.orderBy&&e.orderDir&&(t=function(e,t,n){return e.sort((e,i)=>{let a=A(e,t),s=A(i,t);const o=typeof a,r=typeof s;o!==r&&("number"===o&&(a+=""),"number"===r&&(s+=""));let l=0;return null!=a&&null!=s?a>s?l=1:a<s&&(l=-1):null!=a?l=1:null!=s&&(l=-1),l*("asc"===n?1:-1)})}(t,e.orderBy,e.orderDir)),this.data$.next(t)}addFilter(e,t){this.filters$.next(Object.assign(Object.assign({},this.filters$.value),{[e]:t}))}removeFilter(e){const t=Object.assign({},this.filters$.value);delete t[e],this.filters$.next(t)}reset(e=null){this.filters$.next({}),this.sort$.next({}),this.selectedRows$.next([]),e&&this.staticParams$.next(e)}openCrupdateResourceModal(e,t,n){return this.modal.open(e,t,n).beforeClosed().pipe((0,_.h)(e=>!!e),(0,c.b)(()=>this.reset()))}confirmResourceDeletion(e){const t=Object.assign(Object.assign({},Z.M),{replacements:{resource:e}});return this.modal.open(v.z,t).afterClosed().pipe((0,_.h)(e=>e))}getCurrentParams(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.sort$.value),this.filters$.value),this.staticParams$.value),this.paginator.params)}destroy(){var e,t,n;null===(e=this.paginatorSub)||void 0===e||e.unsubscribe(),null===(t=this.mainSub)||void 0===t||t.unsubscribe(),null===(n=this.searchControlSub)||void 0===n||n.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(d.LFG(q.u),d.LFG(u.F0),d.LFG(p.r),d.LFG(g.m))},e.\u0275prov=d.Yz7({token:e,factory:e.\u0275fac}),e})()},48358:function(e,t,n){"use strict";n.d(t,{M:function(){return i}});const i={title:"Delete :resource",body:"Are you sure you want to delete selected :resource?",ok:"Delete"}},1303:function(e,t,n){"use strict";n.d(t,{p:function(){return h}});var i=n(45435),a=n(36461),s=n(6966),o=n(37716),r=n(99883),l=n(19238),c=n(38583),d=n(76627);const u=["columnName"],p=["table-sort-header",""],g=["*"];let h=(()=>{class e{constructor(e,t,n,i){this.datable=e,this.cd=t,this.focusMonitor=n,this.el=i,this.orderDir=null,this.arrowVisible=!1,this.arrowDirection="down"}get sortDisabled(){var e;return null===(e=this.datable.config)||void 0===e?void 0:e.disableSort}ngOnInit(){this.orderBy||(this.orderBy=(0,s.V)(this.columnName.nativeElement.textContent,"_")),this.sortSub=this.datable.sort$.pipe((0,i.h)(e=>e.orderBy!==this.orderBy)).subscribe(()=>{this.orderDir=null,this.onMouseLeave(),this.cd.markForCheck()})}ngAfterViewInit(){this.focusMonitor.monitor(this.el).subscribe()}ngOnDestroy(){this.sortSub.unsubscribe(),this.focusMonitor.stopMonitoring(this.el)}changeSort(){this.datable.sort$.next({orderBy:this.orderBy,orderDir:this.getDirection(this.orderDir)})}getDirection(e){switch(e){case"asc":return this.arrowVisible=!1,this.orderDir=null;case"desc":return this.arrowVisible=!0,this.arrowDirection="up",this.orderDir="asc";default:return this.arrowVisible=!0,this.arrowDirection="down",this.orderDir="desc"}}onMouseEnter(){var e;(null===(e=this.datable.config)||void 0===e?void 0:e.disableSort)||(this.arrowVisible=!0)}onMouseLeave(){this.arrowVisible=!1,this.orderDir||(this.arrowDirection="down")}handleClick(){var e;(null===(e=this.datable.config)||void 0===e?void 0:e.disableSort)||this.changeSort()}handleKeydown(e){var t;(null===(t=this.datable.config)||void 0===t?void 0:t.disableSort)||e.keyCode!==a.L_&&e.keyCode!==a.K5||(e.preventDefault(),this.changeSort())}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(r.x),o.Y36(o.sBO),o.Y36(l.tE),o.Y36(o.SBq))},e.\u0275cmp=o.Xpm({type:e,selectors:[["","table-sort-header",""]],viewQuery:function(e,t){if(1&e&&o.Gf(u,7),2&e){let e;o.iGM(e=o.CRH())&&(t.columnName=e.first)}},hostAttrs:["tabindex","0"],hostVars:4,hostBindings:function(e,t){1&e&&o.NdJ("click",function(){return t.handleClick()})("keydown",function(e){return t.handleKeydown(e)})("mouseenter",function(){return t.onMouseEnter()})("mouseleave",function(){return t.onMouseLeave()}),2&e&&o.ekj("active",t.orderDir)("sort-disabled",t.sortDisabled)},inputs:{orderBy:["table-sort-header","orderBy"]},attrs:p,ngContentSelectors:g,decls:5,vars:3,consts:[[1,"text"],["columnName",""],[1,"icon-wrapper",3,"ngClass"],["svgIcon","arrow-downward",1,"sort-icon"]],template:function(e,t){1&e&&(o.F$t(),o.TgZ(0,"span",0,1),o.Hsn(2),o.qZA(),o.TgZ(3,"span",2),o._UZ(4,"mat-icon",3),o.qZA()),2&e&&(o.xp6(3),o.Q6J("ngClass",t.arrowDirection),o.xp6(1),o.ekj("hint-visible",t.arrowVisible))},directives:[c.mk,d.Hw],styles:["[_nghost-%COMP%]{outline:none}[_nghost-%COMP%]:not(.sort-disabled){cursor:pointer}.active[_nghost-%COMP%]   .sort-icon[_ngcontent-%COMP%]{color:var(--be-text);opacity:1;transform:translate(0)}.cdk-keyboard-focused[_nghost-%COMP%]   .text[_ngcontent-%COMP%]{border-bottom:1px solid}.text[_ngcontent-%COMP%]{display:inline-block;text-transform:capitalize}.sort-icon[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{vertical-align:middle}.sort-icon[_ngcontent-%COMP%]{width:15px;height:15px;transition:all 225ms cubic-bezier(.4,0,.2,1);transform:translateY(25%);opacity:0}.icon-wrapper[_ngcontent-%COMP%]{display:inline-block;margin-left:4px;transition:transform 225ms cubic-bezier(.4,0,.2,1)}.icon-wrapper[_ngcontent-%COMP%]:not(.down){transform:rotate(180deg)}.hint-visible[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}"],changeDetection:0}),e})()},80551:function(e,t,n){"use strict";n.d(t,{T:function(){return o}});var i=n(13913),a=n(37716),s=n(19244);let o=(()=>{class e{constructor(e){this.i18n=e}getFullPlanName(){if(!this.plan)return;let e=this.plan.parent?this.plan.parent.name:this.plan.name;return e=(0,i.z)(this.i18n.t(e)),e+=" "+this.i18n.t("Plan"),this.plan.parent&&(e+=": "+this.plan.name),e}}return e.\u0275fac=function(t){return new(t||e)(a.Y36(s.Z))},e.\u0275cmp=a.Xpm({type:e,selectors:[["full-plan-name"]],inputs:{plan:"plan"},decls:1,vars:1,template:function(e,t){1&e&&a._uU(0),2&e&&a.Oqu(t.getFullPlanName())},encapsulation:2,changeDetection:0}),e})()},27673:function(e,t,n){"use strict";n.d(t,{J:function(){return a}});var i=n(37716);let a=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e}),e.\u0275inj=i.cJS({}),e})()},53410:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var i=n(37716),a=n(34673),s=n(63423);let o=(()=>{class e{constructor(e,t){this.settings=e,this.router=t}canActivate(e,t){return this.handle()}canActivateChild(e,t){return this.handle()}handle(){return!(!this.settings.get("billing.integrated")||!this.settings.get("billing.enable"))||(this.router.navigate(["/"]),!1)}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(a.Z),i.LFG(s.F0))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},24284:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var i=n(37716),a=n(90299);let s=(()=>{class e{constructor(e){this.http=e}all(t){return this.http.get(e.BASE_URI,t)}get(t){return this.http.get(`${e.BASE_URI}/${t}`)}create(t){return this.http.post(e.BASE_URI,t)}update(t,n){return this.http.put(`${e.BASE_URI}/${t}`,n)}delete(t){return this.http.delete(`${e.BASE_URI}/${t}`)}sync(){return this.http.post(`${e.BASE_URI}/sync`)}}return e.BASE_URI="billing-plan",e.\u0275fac=function(t){return new(t||e)(i.LFG(a.r))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},3543:function(e,t,n){"use strict";n.d(t,{_:function(){return f}});var i=n(26215),a=n(79765),s=n(46782),o=n(13653),r=n(15257),l=n(45435),c=n(63423),d=n(37716),u=n(96605),p=n(90962),g=n(34673),h=n(38583);const m=["*"];let f=(()=>{class e{constructor(e,t,n,s,o){this.breakpoints=e,this.localStorage=t,this.settings=n,this.el=s,this.router=o,this.navIsOpen$=new i.X(!1),this.isCompact$=new i.X(!1),this.onDestroy$=new a.xQ}ngOnInit(){this.navIsOpen$.next(!this.breakpoints.isMobile$.value),this.isCompact$.pipe((0,s.R)(this.onDestroy$)).subscribe(e=>{e?this.el.nativeElement.style.setProperty("--nav-width","80px"):this.el.nativeElement.style.removeProperty("--nav-width")}),this.navIsOpen$.pipe((0,o.T)(1),(0,r.q)(1)).subscribe(()=>{this.el.nativeElement.classList.add("enable-transitions")}),this.navIsOpen$.pipe((0,s.R)(this.onDestroy$)).subscribe(e=>{e?this.el.nativeElement.classList.remove("nav-closed"):this.el.nativeElement.classList.add("nav-closed")}),this.router.events.pipe((0,l.h)(e=>e instanceof c.m2),(0,s.R)(this.onDestroy$)).subscribe(()=>{this.navIsOpen$.next(!this.breakpoints.isMobile$.value)})}ngOnDestroy(){this.onDestroy$.next()}toggleSidebarMode(){this.breakpoints.isMobile$.value?this.navIsOpen$.next(!this.navIsOpen$.value):(this.isCompact$.next(!this.isCompact$.value),this.localStorage.set(this.storageSelector(),this.isCompact$.value))}storageSelector(){return`${this.settings.get("branding.site_name")}.sidebarCompact`}}return e.\u0275fac=function(t){return new(t||e)(d.Y36(u.S),d.Y36(p.m),d.Y36(g.Z),d.Y36(d.SBq),d.Y36(c.F0))},e.\u0275cmp=d.Xpm({type:e,selectors:[["sidenav"]],ngContentSelectors:m,decls:3,vars:4,consts:[[1,"backdrop",3,"click"]],template:function(e,t){1&e&&(d.F$t(),d.Hsn(0),d.TgZ(1,"div",0),d.NdJ("click",function(){return t.navIsOpen$.next(!1)}),d.ALo(2,"async"),d.qZA()),2&e&&(d.xp6(1),d.ekj("visible",d.lcZ(2,2,t.navIsOpen$)))},pipes:[h.Ov],styles:["[_nghost-%COMP%]{display:flex;padding-top:var(--top-offset);--nav-width:225px;--top-offset:70px}.no-navbar[_nghost-%COMP%]{--top-offset:0px}.nav-closed[_nghost-%COMP%]     nav{transform:translate3d(-100%,0,0);box-shadow:none}.enable-transitions[_nghost-%COMP%]     nav{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform}[_nghost-%COMP%]     nav{width:var(--nav-width);overflow:auto;padding:26px 8px 16px;border-right:1px solid var(--be-divider-default);display:flex;flex-direction:column;position:fixed;top:var(--top-offset);bottom:0;z-index:4;background-color:var(--be-background)}@media only screen and (max-width:768px){[_nghost-%COMP%]     nav{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}}[_nghost-%COMP%]   .backdrop[_ngcontent-%COMP%]{display:block;top:0;left:0;right:0;bottom:0;position:absolute;z-index:1;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility;visibility:hidden}[_nghost-%COMP%]   .backdrop.visible[_ngcontent-%COMP%]{visibility:visible;background-color:var(--be-backdrop);opacity:.6}@media only screen and (min-width:768px){[_nghost-%COMP%]   .backdrop[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]     main{min-width:0;flex:1 1 auto;background-color:var(--be-background-alternative);min-height:calc(100vh - 0px);min-height:calc(100vh - var(--top-offset, 0px));display:flex;flex-direction:column}@media only screen and (min-width:768px){[_nghost-%COMP%]     main{margin-left:var(--nav-width)}}"],changeDetection:0}),e})()},26989:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var i=n(38583),a=n(37716);let s=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({imports:[[i.ez]]}),e})()},52781:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var i=n(37716),a=n(41880);let s=(()=>{class e{constructor(e){this.el=e,this.config={},this.filesSelected=new i.vpe}ngOnInit(){this.el.nativeElement.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),(0,a.r)(this.config).then(e=>{e&&e.length&&this.filesSelected.emit(e)})})}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq))},e.\u0275dir=i.lG2({type:e,selectors:[["","uploadButton",""]],inputs:{config:["uploadButton","config"]},outputs:{filesSelected:"filesSelected"}}),e})()},52644:function(e,t,n){"use strict";n.d(t,{y:function(){return s}});var i=n(1796),a=n(37716);let s=(()=>{class e{transform(e=0,t){return isNaN(parseFloat(String(e)))||!isFinite(e)?"-":(0,i.H)(e,t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=a.Yjl({name:"formattedFileSize",type:e,pure:!0}),e})()},48976:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var i=(()=>(function(e){e.Image="uploads/images"}(i||(i={})),i))()},56456:function(e,t,n){"use strict";n.d(t,{A:function(){return M}});var i=n(79765),a=n(26215),s=n(82298),o=n(58480);class r{constructor(e,t){this.canceled$=new i.xQ,this.processing$=new a.X(!1),this.uploadedResponse$=new s.t(1),this.progress$=new a.X({percentage:0}),this.error$=new a.X(null),this.customData={},this.uploadedFile=e,this.id=t||(0,o.O)()}get completed(){return!this.processing$.value&&100===this.progress$.value.percentage}get inProgress(){return!this.error$.value&&!this.completed}cancel(){this.canceled$.next(!0),this.finalize()}complete(){this.setProgress({percentage:100,eta:null}),this.finalize()}finalize(){this.uploadedResponse$.complete(),this.canceled$.complete(),this.progress$.complete()}finishProcessing(){this.processing$.next(!1),this.processing$.complete()}addError(e){this.error$.next(e)}setProgress(e){this.progress$.next(Object.assign(Object.assign({},this.progress$.value),e))}}var l=n(94402),c=n(40205),d=n(59193),u=n(19773),p=n(5304),g=n(46782),h=n(88002),m=n(45435),f=n(66421),_=n(81769),b=n(37716),v=n(97312),Z=n(18715),x=n(68756),y=n(45746),A=n(43256),w=n(16850);let C=(()=>{class e extends Z.c{constructor(){super(...arguments),this.DEFAULT_MAX_FILE_SIZE_MB=8,this.showToast=!0}initValidations(){this.validations.push(new x.p({maxSize:this.getMaxFileSize()},this.i18n));const e=this.getAllowedExtensions(),t=this.getBlockedExtensions();e&&e.length&&this.validations.push(new y.G({extensions:e},this.i18n)),t&&t.length&&this.validations.push(new A.u({extensions:t},this.i18n))}getMaxFileSize(){return this.settings.get("uploads.max_size",(0,w.F)(this.DEFAULT_MAX_FILE_SIZE_MB,"MB"))}getAllowedExtensions(){return this.settings.getJson("uploads.allowed_extensions")}getBlockedExtensions(){return this.settings.getJson("uploads.blocked_extensions")}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=b.n5z(e)))(n||e)}}(),e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var T=n(35718),q=n(24688),k=n(34673);let M=(()=>{class e{constructor(e,t,n,o,r){this.api=e,this.defaultValidator=t,this.toast=n,this.currentUser=o,this.settings=r,this.uploads$=new a.X([]),this.totalProgress$=new s.t(1),this.uploadsAdded$=new i.xQ,this.count$=new a.X({pending:0,completed:0})}isEmpty(){return!this.uploads$.value.length}getAllCompleted(){return this.uploads$.value.filter(e=>e.completed).map(e=>e.fileEntry)}updateTotalProgress(){const e=this.uploads$.value.map(e=>e.progress$.value.percentage||0);this.totalProgress$.next(e.reduce((e,t)=>e+t,0)/e.length)}totalProgress(){return this.totalProgress$.asObservable()}start(e,t={}){const n=t.validator||this.defaultValidator;let i=[];if(Array.isArray(e))i=this.transformUploads(e,n),this.uploads$.next(this.uploads$.value.concat(i)),this.uploadsAdded$.next(i);else{const t=this.uploads$.value.map(t=>{if(e[t.id]){const a=this.transformUploads([e[t.id]],n,t.id)[0];return i.push(a),a}return t});this.uploads$.next(t)}return this.updateCount(),(0,l.D)(i.filter(e=>!e.error$.value)).pipe((0,u.zg)(e=>this.api.upload(e.uploadedFile,t).pipe((0,p.K)(i=>(this.handleUploadFailure(i,e,n),t.bubbleError?(0,c._)(i):d.E)),(0,g.R)(e.canceled$),(0,h.U)(n=>(this.handleUploadEvent(n,e,t.willProcessFiles),n.name===f.b.COMPLETED&&(n.body.queueItemId=e.id),n))),1),(0,m.h)(e=>e.name===f.b.COMPLETED),(0,h.U)(e=>e.body))}updateProgress(e,t){const n=this.find(e);n&&(n.setProgress({eta:t.eta,speed:t.speed,percentage:t.progress,totalBytes:t.totalBytes,completedBytes:t.completedBytes}),this.updateTotalProgress())}completeUpload(e,t){const n=this.find(e);n&&(n.uploadedResponse$.next(t),n.fileEntry=t.fileEntry,n.complete(),this.updateTotalProgress())}errorUpload(e,t){this.find(e).addError(t)}reset(){this.uploads$.value.forEach(e=>e.cancel()),this.uploads$.next([])}remove(e){const t=this.uploads$.value.findIndex(t=>t.id===e),n=this.uploads$.value[t];n.completed?n.finalize():n.cancel(),this.uploads$.value.splice(t,1),this.uploads$.next(this.uploads$.value)}find(e){return this.uploads$.value.find(t=>t.id===e)}transformUploads(e,t,n){return e.map(e=>{const i=new r(e,n);if(t){const n=t.validate(e);n.failed&&i.addError(n.errorMessage)}return i})}handleUploadEvent(e,t,n=!1){e.name===f.b.PROGRESS?(100===e.progress&&(e=Object.assign(Object.assign({},e),{progress:99}),n&&t.processing$.next(!0)),this.updateProgress(t.id,e)):e.name===f.b.COMPLETED&&(this.completeUpload(t.id,e.body),this.updateCount())}handleUploadFailure(e,t,n){var i;let a=null===(i=null==e?void 0:e.errors)||void 0===i?void 0:i.file,s=null;a||(a=_.v.DefaultUpload,s=this.currentUser.isAdmin()&&!this.settings.get("site.hide_docs_buttons")),this.errorUpload(t.id,a),this.updateCount(),this.updateTotalProgress(),n.showToast&&this.toast.open(a,{action:s?"Learn More":null}).onAction().subscribe(()=>{window.open(_.h)})}updateCount(){const e=this.uploads$.value.filter(e=>e.inProgress).length;this.count$.next({pending:e,completed:this.uploads$.value.length-e})}}return e.\u0275fac=function(t){return new(t||e)(b.LFG(v.f),b.LFG(C),b.LFG(T.F),b.LFG(q.I),b.LFG(k.Z))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},66705:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var i=n(38583),a=n(51095),s=n(76627),o=n(12178),r=n(37716);let l=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=r.oAB({type:e}),e.\u0275inj=r.cJS({imports:[[i.ez,a.ot,o.Cv,s.Ps]]}),e})()},63412:function(e,t,n){"use strict";function i(e,t){const n=document.createElement("a");n.href=e,t&&(n.download=t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}n.d(t,{k:function(){return i}})},45746:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var i=n(26232);class a extends i.y{constructor(e,t){super(),this.params=e,this.i18n=t,this.errorMessage=this.i18n.t("Only these file types are allowed: :extensions",{extensions:this.params.extensions.join(", ")})}fails(e){return!this.params.extensions.some(t=>t.toLowerCase()===e.extension.toLowerCase())}}},43256:function(e,t,n){"use strict";n.d(t,{u:function(){return a}});var i=n(26232);class a extends i.y{constructor(e,t){super(),this.params=e,this.i18n=t,this.errorMessage=this.i18n.t("These file types are not allowed: :extensions",{extensions:this.params.extensions.join(", ")})}fails(e){return this.params.extensions.some(t=>t===e.extension)}}}}]);
//# sourceMappingURL=123-es2015.724b3495d392b469a4af.js.map

Zerion Mini Shell 1.0