PageSourceSearch

https://minasidor.k2a.se/692.792d4d348f75b90a.js

js k2a.se collected 2026-09-24 20:00:12 UTC 310,738 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktaiga=self.webpackChunktaiga||[]).push([[692],{1580:(Vt,rt,m)=>{m.d(rt,{E:()=>tt});var u=m(1360),Y=m(5850);let tt=(()=>{class N{constructor(I){this.requestService=I}saveBlob(I,P){const g=new Blob([I],{type:P});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(g);else{const E=window.URL.createObjectURL(g);window.open(E,"_blank"),setTimeout(()=>{window.URL.revokeObjectURL(E)},100)}}saveBlobWithFilename(I,P){const g=P.split(".").pop(),E=this.getMimeType(g),$=new Blob([I],{type:E});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob($,P);else{const y=window.URL.createObjectURL($),t=document.createElement("a");typeof t.download>"u"?window.open(y,"_blank"):(t.href=y,t.download=P,document.body.appendChild(t),t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))),setTimeout(()=>{window.URL.revokeObjectURL(y),t&&t.remove()},100)}}getMimeType(I){switch(I=I.replace(".","")){case"3g2":return"video/3gpp2";case"3gp":return"video/3gpp";case"au":return"audio/basic";case"avi":return"video/x-msvideo";case"bmp":return"image/bmp";case"doc":return"application/msword";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"eps":case"ps":return"application/postscript";case"gif":return"image/gif";case"h264":return"video/h264";case"htm":case"html":return"text/html";case"ico":return"image/x-icon";case"jpe":case"jpeg":case"jpg":return"image/jpeg";case"m4v":return"video/x-m4v";case"mkv":return"video/x-matroska";case"mov":case"qt":return"video/quicktime";case"mp3":case"mpga":return"audio/mpeg";case"mp4":case"mpg4":return"video/mp4";case"mpe":case"mpeg":case"mpg":return"video/mpeg";case"ogg":return"application/ogg";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"ra":case"ram":return"audio/x-pn-realaudio";case"rm":return"application/vnd.rn-realmedia";case"rtf":return"text/rtf";case"rtx":return"text/richtext";case"svg":return"image/svg+xml";case"swf":return"application/x-shockwave-flash";case"tif":case"tiff":return"image/tiff";case"txt":return"text/plain";case"wav":return"audio/x-wav";case"wbmp":return"image/vnd.wap.wbmp";case"wmv":return"video/x-ms-wmv";case"xhtml":return"application/xhtml+xml";case"xls":return"application/vnd.ms-excel";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"application/xml";default:return""}}getValidMediaType(I){switch(I){case"application/pdf":case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getValidImageMediaType(I){switch(I){case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getBlobFromUrl(I){return this.requestService.getBlobFromUrl(I)}static{this.\u0275fac=function(P){return new(P||N)(u.KVO(Y.B))}}static{this.\u0275prov=u.jDH({token:N,factory:N.\u0275fac,providedIn:"root"})}}return N})()},2692:(Vt,rt,m)=>{m.r(rt),m.d(rt,{MarketModule:()=>Lo});var u=m(2881),Y=m(5207),tt=m(3687),N=m(7052),X=m(7468),I=m(274),P=m(7586),g=m.n(P),E=m(8709),$=m(6090),y=m(44),t=m(1360),w=m(3718),lt=m(6354),Yt=m(980),Xt=m(5850),Bt=m(7456),et=m(9297);let F=(()=>{class n{constructor(e,i,a){this.request=e,this.appConfigService=i,this.menuService=a}getMarketObjects(e,i,a,s,o,l,c,h,_,d,M,C,A,v,H){const T={type:e};return i&&(T.sizeRoomsMin=i),a&&(T.sizeRoomsMax=a),s&&(T.sizeAreaMin=s),o&&(T.sizeAreaMax=o),l&&(T.priceMin=l),c&&(T.priceMax=c),h&&(T.limit=h),_&&(T.offset=_),d&&(T.order=d),M&&(T.orderReverse=M),C&&(T.locationAreaId=C),A&&(T.includedDisplayName=A),v&&(T.locationAreaDisplayName=v),H&&(T.attribute=H),this.request.get("v2/market/objects",T,{cache:!1})}getMarketObject(e){return this.request.get(`v2/market/objects/${e}`,null,{cache:!1})}saveMarketObjectsFilterSettings(e,i,a,s,o,l,c,h,_,d){const M={sizeRoomsMin:i,sizeRoomsMax:a,locationAreaMin:s,locationAreaMax:o,priceMin:l,priceMax:c,areas:h,includes:_,attributes:d};localStorage.setItem(`${e.toUpperCase()}_SEARCH_FILTERS`,JSON.stringify(M)),this.setPageYOffset(null)}getMarketObjectsFilterSettings(e){const i=localStorage.getItem(`${e.toUpperCase()}_SEARCH_FILTERS`),a=JSON.parse(i);return{sizeRoomsMin:a?.sizeRoomsMin??null,sizeRoomsMax:a?.sizeRoomsMax??null,locationAreaMin:a?.locationAreaMin??null,locationAreaMax:a?.locationAreaMax??null,priceMin:a?.priceMin??null,priceMax:a?.priceMax??null,areas:a?.areas??null,includes:a?.includes??null,attributes:a?.attributes??null}}clearMarketObjectsFilterSettings(e){localStorage.removeItem(`${e.toUpperCase()}_SEARCH_FILTERS`),this.setPageYOffset(null)}setPageYOffset(e){this.pageYOffset=e}getPageYOffset(){return this.pageYOffset}
1getMarketObjectStatus(e){return this.request.get(`v2/market/objects/${e}/status`,{removedApplications:!0},{cache:!1})}postMarketApplication(e){return this.request.postOnce(`v2/market/${e}/applications`,{command:{type:"apply"},contact:null})}postMarketApplicationsItemPost(e,i,a,s){return this.request.postOnce(`v2/market/${e}/applications/${i}`,{command:a,etag:s})}getMarketApplications(e){return this.request.get("v2/market/applications",{queueType:e,removed:!0,closed:!0},{cache:!1})}getMarketObjectImage(e,i){return this.appConfigService.apiBaseUrl+`/v2/market/objects/${e}/images/${i}?width=1024&height=1024`}getMarketObjectThumbnail(e,i){return this.appConfigService.apiBaseUrl+`v2/market/objects/${e}/thumbnail?width=660&height=440&version=${i}`}getMarketObjectsTypesItem(e){return this.request.get(`v2/market/objects/types/${e}`,null,{cache:!1}).pipe((0,lt.T)(i=>(i.maxPrice=i?.maxPrice?i.maxPrice:"100000",i.maxSize=i?.maxSize?i.maxSize:"500",i.maxNumberOfRooms=i?.maxNumberOfRooms?i.maxNumberOfRooms:"20",i)))}getMarketApplicantProfileOptions(){return this.request.get("v2/market/applicant/profile/options")}getMarketApplicantProfile(){return this.request.get("v2/market/applicant/profile")}patchMarketApplicantProfile(e){return this.request.patchOnce("v2/market/applicant/profile",e).pipe((0,Yt.j)(()=>{this.menuService.refreshMenu(3e3)}))}getMarketSubscriptions(){return this.request.get("v2/market/subscriptions")}putMarketSubscriptions(e){return e?.id||(e.id=w.Q.generateUniqueId()),this.request.putOnce(`v2/market/subscriptions/${e.id}`,e)}deleteMarketSubscriptions(e){return this.request.delete(`v2/market/subscriptions/${e}`)}getMarketObjectsTypesItemSubscriptionsSetting(e){return this.request.get(`v2/market/objects/types/${e}/subscriptions/setting`)}getMarketCoApplicants(){return this.request.get("v2/market/applicant/coApplicants",{includeStatusDraft:!0})}patchMarketApplicantCoApplicantsItem(e,i){return this.request.patchOnce(`v2/market/applicant/coApplicants/${e}`,{accept:i})}getMarketObjectsAreas(){return this.request.get("v2/market/objects/areas")}getMarketObjectsTypesAreas(e){return this.request.get(`v2/market/objects/types/${e}/areas`).pipe((0,lt.T)(i=>{const a=JSON.parse(JSON.stringify(i));let s=[];return function o(l,c){for(const h of l){let _=h.displayName,d={id:"",displayName:"",sortName:""};d.id=h.id,c?(d.displayName=`${h.displayName}, ${c}`,d.sortName=c):d.displayName=h.displayName,s.push(d),h?.areas&&o(h.areas,_)}}(a.items,null),a.items=s.sort((l,c)=>l?.sortName<c?.sortName?-1:l?.sortName>c?.sortName?1:0),a}))}deleteMarketApplicantCoApplicantsItem(e){return this.request.delete(`v2/market/applicant/coApplicants/${e}`)}getMarketSubscriptionsMarketObjectsTypes(){return this.request.get("v2/market/subscriptions/marketobjects/types")}getMarketObjectsIncludes(){return this.request.get("v2/market/objects/includes")}putMarketApplicantCoApplicantsItem(e){const i=w.Q.generateUniqueId();return this.request.putOnce(`v2/market/applicant/coApplicants/${i}`,{applicantIdentifier:e})}getMarketApplicationsItem(e,i=!0){return this.request.get(`v2/market/applications/${e}`,null,{cache:i})}postSystemFilesItem(e){const i=new FormData;return i.append("file",e),this.request.postObserveEvents("v2/system/files?ngsw-bypass=true",i,null,!0)}static{this.\u0275fac=function(i){return new(i||n)(t.KVO(Xt.B),t.KVO(Bt.R),t.KVO(et.$))}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=m(2043),j=m(2155),q=m(666),ct=m(7356),b=m(8018),z=m(7342),It=m(8875),R=m(5565),G=m(9213),x=m(8834),it=m(4506),nt=m(100),S=m(2928),V=m(3069),mt=m(5380),dt=m(1396),pt=m(2765),p=m(9417),ut=m(3881),Ut=m(1845),_t=m(9536),at=m(8512),Lt=m(4790),zt=m(4667),Ct=m(1413),Qt=m(777),Ht=m(8296);const qt=["knob"],Jt=["valueIndicatorContainer"];function Wt(n,r){if(1&n&&(t.j41(0,"div",2,1)(2,"div",5)(3,"span",6),t.EFF(4),t.k0s()()()),2&n){const e=t.XpG();t.R7$(4),t.JRh(e.valueIndicatorText)}}const Kt=["trackActive"],Zt=["*"];function te(n,r){if(1&n&&t.nrm(0,"div"),2&n){const e=r.$implicit,i=r.$index,a=t.XpG(3);t.HbH(0===e?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),t.xc7("transform",a._calcTickMarkTransform(i))}}function ee(n,r){if(1&n&&t.Z7z(0,te,1,4,"div",8,t.Vm6),2&n){const e=t.XpG(2);t.Dyx(e._tickMarks)}}function ie(n,r){if(1&n&&(t.j41(0,"div",6,1),t.DNE(2,ee,2,0),t.k0s()),2&n){const e=t.XpG();t.R7$(2),t.vxM(e._cachedWidth?2:-1)}}function ne(n,r){if(1&n&&t.nrm(0,"mat-slider-visual-thumb",7),2&n){const e=t.XpG();t.Y8G("discrete",e.discrete)("thumbPosition",1)("valueIndicatorText",e.startValueIndicatorText)}}var f=function(n){return n[n.START=1]="START",n[n.END=2]="END",n}(f||{}),J=function(n){return n[n.ACTIVE=0]="ACTIVE",n[n.INACTIVE=1]="INACTIVE",n}(J||{});const ht=new t.nKC("_MatSlider"),St=new t.nKC("_MatSliderThumb"),xt=new t.nKC("_MatSliderRangeThumb"),Ot=new t.nKC("_MatSliderVisualThumb");let ae=(()=>{class n{_cdr=(0,t.WQX)(t.gRc);_ngZone=(0,t.WQX)(t.SKi);_slider=(0,t.WQX)(ht);_renderer=(0,t.WQX)(t.sFG);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=(0,t.WQX)(t.aKT).nativeElement;_platform=(0,t.WQX)(_t.P);constructor(){}ngAfterViewInit(){const e=this._slider._getInput(this.thumbPosition);e&&(this._ripple.radius=24,this._sliderInput=e,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{const i=this._sliderInputEl,a=this._renderer;this._listenerCleanups=[a.listen(i,"pointermove",this._onPointerMove),a.listen(i,"pointerdown",this._onDragStart),a.listen(i,"pointerup",this._onDragEnd),a.listen(i,"pointerleave",this._onMouseLeave),a.listen(i,"focus",this._onFocus),a.listen(i,"blur",this._onBlur)]}))}
1ngOnDestroy(){this._listenerCleanups?.forEach(e=>e())}_onPointerMove=e=>{if(this._sliderInput._isFocused)return;const i=this._hostElement.getBoundingClientRect(),a=this._slider._isCursorOnSliderThumb(e,i);this._isHovered=a,a?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=e=>{0===e.button&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(e){return e?.state===at.b.FADING_IN||e?.state===at.b.VISIBLE}_showRipple(e,i){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===f.START?f.END:f.START)._showValueIndicator(),!this._slider._globalRippleOptions?.disabled||i))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:e,centered:!0,persistent:!0})}_hideRipple(e){if(e?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();const i=this._getSibling();i._isShowingAnyRipple()||(this._hideValueIndicator(),i._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===f.START?f.END:f.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=t.VBU({type:n,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(i,a){if(1&i&&(t.GBs(at.M,5),t.GBs(qt,5),t.GBs(Jt,5)),2&i){let s;t.mGM(s=t.lsd())&&(a._ripple=s.first),t.mGM(s=t.lsd())&&(a._knob=s.first),t.mGM(s=t.lsd())&&(a._valueIndicatorContainer=s.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[t.Jv_([{provide:Ot,useExisting:n}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(i,a){1&i&&(t.DNE(0,Wt,5,1,"div",2),t.nrm(1,"div",3,0)(3,"div",4)),2&i&&(t.vxM(a.discrete?0:-1),t.R7$(3),t.Y8G("matRippleDisabled",!0))},dependencies:[at.M],styles:[".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;
1left:2px}\n"],encapsulation:2,changeDetection:0})}return n})(),jt=(()=>{class n{_ngZone=(0,t.WQX)(t.SKi);_cdr=(0,t.WQX)(t.gRc);_elementRef=(0,t.WQX)(t.aKT);_dir=(0,t.WQX)(Ut.D,{optional:!0});_globalRippleOptions=(0,t.WQX)(at.a,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled}set disabled(e){this._disabled=e;const i=this._getInput(f.END),a=this._getInput(f.START);i&&(i.disabled=this._disabled),a&&(a.disabled=this._disabled)}_disabled=!1;get discrete(){return this._discrete}set discrete(e){this._discrete=e,this._updateValueIndicatorUIs()}_discrete=!1;showTickMarks=!1;get min(){return this._min}set min(e){const i=isNaN(e)?this._min:e;this._min!==i&&this._updateMin(i)}_min=0;color;disableRipple=!1;_updateMin(e){const i=this._min;this._min=e,this._isRange?this._updateMinRange({old:i,new:e}):this._updateMinNonRange(e),this._onMinMaxOrStepChange()}_updateMinRange(e){const i=this._getInput(f.END),a=this._getInput(f.START),s=i.value,o=a.value;a.min=e.new,i.min=Math.max(e.new,a.value),a.max=Math.min(i.max,i.value),a._updateWidthInactive(),i._updateWidthInactive(),e.new<e.old?this._onTranslateXChangeBySideEffect(i,a):this._onTranslateXChangeBySideEffect(a,i),s!==i.value&&this._onValueChange(i),o!==a.value&&this._onValueChange(a)}_updateMinNonRange(e){const i=this._getInput(f.END);if(i){const a=i.value;i.min=e,i._updateThumbUIByValue(),this._updateTrackUI(i),a!==i.value&&this._onValueChange(i)}}get max(){return this._max}set max(e){const i=isNaN(e)?this._max:e;this._max!==i&&this._updateMax(i)}_max=100;_updateMax(e){const i=this._max;this._max=e,this._isRange?this._updateMaxRange({old:i,new:e}):this._updateMaxNonRange(e),this._onMinMaxOrStepChange()}_updateMaxRange(e){const i=this._getInput(f.END),a=this._getInput(f.START),s=i.value,o=a.value;i.max=e.new,a.max=Math.min(e.new,i.value),i.min=a.value,i._updateWidthInactive(),a._updateWidthInactive(),e.new>e.old?this._onTranslateXChangeBySideEffect(a,i):this._onTranslateXChangeBySideEffect(i,a),s!==i.value&&this._onValueChange(i),o!==a.value&&this._onValueChange(a)}_updateMaxNonRange(e){const i=this._getInput(f.END);if(i){const a=i.value;i.max=e,i._updateThumbUIByValue(),this._updateTrackUI(i),a!==i.value&&this._onValueChange(i)}}get step(){return this._step}set step(e){const i=isNaN(e)?this._step:e;this._step!==i&&this._updateStep(i)}_step=1;_updateStep(e){this._step=e,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){const e=this._getInput(f.END),i=this._getInput(f.START),a=e.value,s=i.value,o=i.value;e.min=this._min,i.max=this._max,e.step=this._step,i.step=this._step,this._platform.SAFARI&&(e.value=e.value,i.value=i.value),e.min=Math.max(this._min,i.value),i.max=Math.min(this._max,e.value),i._updateWidthInactive(),e._updateWidthInactive(),e.value<o?this._onTranslateXChangeBySideEffect(i,e):this._onTranslateXChangeBySideEffect(e,i),a!==e.value&&this._onValueChange(e),s!==i.value&&this._onValueChange(i)}_updateStepNonRange(){const e=this._getInput(f.END);if(e){const i=e.value;e.step=this._step,this._platform.SAFARI&&(e.value=e.value),e._updateThumbUIByValue(),i!==e.value&&this._onValueChange(e)}}displayWith=e=>`${e}`;_tickMarks;_noopAnimations;_dirChangeSubscription;_resizeObserver;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=!1;_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=(0,t.WQX)(_t.P);constructor(){(0,t.WQX)(Lt._).load(zt._);const e=(0,t.WQX)(t.bc$,{optional:!0});this._noopAnimations="NoopAnimations"===e,this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl="rtl"===this._dir.value)}_knobRadius=8;_inputPadding;ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();const e=this._getInput(f.END),i=this._getInput(f.START);this._isRange=!!e&&!!i,this._cdr.detectChanges();const a=this._getThumb(f.END);this._rippleRadius=a._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(e,i):this._initUINonRange(e),this._updateTrackUI(e),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}
1_initUINonRange(e){e.initProps(),e.initUI(),this._updateValueIndicatorUI(e),this._hasViewInitialized=!0,e._updateThumbUIByValue()}_initUIRange(e,i){e.initProps(),e.initUI(),i.initProps(),i.initUI(),e._updateMinMax(),i._updateMinMax(),e._updateStaticStyles(),i._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,e._updateThumbUIByValue(),i._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl="rtl"===this._dir?.value,this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){const e=this._getInput(f.END),i=this._getInput(f.START);e._setIsLeftThumb(),i._setIsLeftThumb(),e.translateX=e._calcTranslateXByValue(),i.translateX=i._calcTranslateXByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateWidthInactive(),i._updateWidthInactive(),e._updateThumbUIByValue(),i._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(f.END)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb(f.START)._isActive||this._getThumb(f.END)._isActive}_getValue(e=f.END){const i=this._getInput(e);return i?i.value:this.min}_skipUpdate(){return!(!this._getInput(f.START)?._skipUIUpdate&&!this._getInput(f.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(e){const i=this._trackActive.nativeElement.style;i.left=e.left,i.right=e.right,i.transformOrigin=e.transformOrigin,i.transform=e.transform}_calcTickMarkTransform(e){const i=e*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl?this._cachedWidth-6-i:i}px`}_onTranslateXChange(e){this._hasViewInitialized&&(this._updateThumbUI(e),this._updateTrackUI(e),this._updateOverlappingThumbUI(e))}_onTranslateXChangeBySideEffect(e,i){this._hasViewInitialized&&(e._updateThumbUIByValue(),i._updateThumbUIByValue())}_onValueChange(e){this._hasViewInitialized&&(this._updateValueIndicatorUI(e),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){const e=this._getInput(f.END),i=this._getInput(f.START);e._updateThumbUIByValue(),i._updateThumbUIByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateMinMax(),i._updateMinMax(),e._updateWidthInactive(),i._updateWidthInactive()}else{const e=this._getInput(f.END);e&&e._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_thumbsOverlap=!1;_areThumbsOverlapping(){const e=this._getInput(f.START),i=this._getInput(f.END);return!(!e||!i)&&i.translateX-e.translateX<20}_updateOverlappingThumbClassNames(e){const i=e.getSibling(),a=this._getThumb(e.thumbPosition);this._getThumb(i.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),a._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap)}_updateOverlappingThumbUI(e){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(e))}_updateThumbUI(e){this._skipUpdate()||(this._getThumb(e.thumbPosition===f.END?f.END:f.START)._hostElement.style.transform=`translateX(${e.translateX}px)`)}_updateValueIndicatorUI(e){if(this._skipUpdate())return;const i=this.displayWith(e.value);if(this._hasViewInitialized?e._valuetext.set(i):e._hostElement.setAttribute("aria-valuetext",i),this.discrete){e.thumbPosition===f.START?this.startValueIndicatorText=i:this.endValueIndicatorText=i;const a=this._getThumb(e.thumbPosition);i.length<3?a._hostElement.classList.add("mdc-slider__thumb--short-value"):a._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){const e=this._getInput(f.END),i=this._getInput(f.START);
1e&&this._updateValueIndicatorUI(e),i&&this._updateValueIndicatorUI(i)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;const e=this._step&&this._step>0?this._step:1,a=(Math.floor(this.max/e)*e-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*a}_updateTrackUI(e){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(e):this._updateTrackUINonRange(e))}_updateTrackUIRange(e){const i=e.getSibling();if(!i||!this._cachedWidth)return;const a=Math.abs(i.translateX-e.translateX)/this._cachedWidth;this._setTrackActiveStyles(e._isLeftThumb&&this._cachedWidth?{left:"auto",right:this._cachedWidth-i.translateX+"px",transformOrigin:"right",transform:`scaleX(${a})`}:{left:`${i.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${a})`})}_updateTrackUINonRange(e){this._setTrackActiveStyles(this._isRtl?{left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-e.fillPercentage})`}:{left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${e.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||void 0===this.step||void 0===this.min||void 0===this.max)return;const e=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(e):this._updateTickMarkUINonRange(e)}_updateTickMarkUINonRange(e){const i=this._getValue();let a=Math.max(Math.round((i-this.min)/e),0)+1,s=Math.max(Math.round((this.max-i)/e),0)-1;this._isRtl?a++:s++,this._tickMarks=Array(a).fill(J.ACTIVE).concat(Array(s).fill(J.INACTIVE))}_updateTickMarkUIRange(e){const i=this._getValue(),a=this._getValue(f.START),s=Math.max(Math.round((a-this.min)/e),0),o=Math.max(Math.round((i-a)/e)+1,0),l=Math.max(Math.round((this.max-i)/e),0);this._tickMarks=Array(s).fill(J.INACTIVE).concat(Array(o).fill(J.ACTIVE),Array(l).fill(J.INACTIVE))}_getInput(e){return e===f.END&&this._input?this._input:this._inputs?.length?e===f.START?this._inputs.first:this._inputs.last:void 0}_getThumb(e){return e===f.END?this._thumbs?.last:this._thumbs?.first}_setTransition(e){this._hasAnimation=!this._platform.IOS&&e&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}_isCursorOnSliderThumb(e,i){const a=i.width/2,c=e.clientY-(i.y+a);return Math.pow(e.clientX-(i.x+a),2)+Math.pow(c,2)<Math.pow(a,2)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=t.VBU({type:n,selectors:[["mat-slider"]],contentQueries:function(i,a,s){if(1&i&&(t.wni(s,St,5),t.wni(s,xt,4)),2&i){let o;t.mGM(o=t.lsd())&&(a._input=o.first),t.mGM(o=t.lsd())&&(a._inputs=o)}},viewQuery:function(i,a){if(1&i&&(t.GBs(Kt,5),t.GBs(Ot,5)),2&i){let s;t.mGM(s=t.lsd())&&(a._trackActive=s.first),t.mGM(s=t.lsd())&&(a._thumbs=s)}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:12,hostBindings:function(i,a){2&i&&(t.HbH("mat-"+(a.color||"primary")),t.AVh("mdc-slider--range",a._isRange)("mdc-slider--disabled",a.disabled)("mdc-slider--discrete",a.discrete)("mdc-slider--tick-marks",a.showTickMarks)("_mat-animation-noopable",a._noopAnimations))},inputs:{disabled:[2,"disabled","disabled",t.L39],discrete:[2,"discrete","discrete",t.L39],showTickMarks:[2,"showTickMarks","showTickMarks",t.L39],min:[2,"min","min",t.Udg],color:"color",disableRipple:[2,"disableRipple","disableRipple",t.L39],max:[2,"max","max",t.Udg],step:[2,"step","step",t.Udg],displayWith:"displayWith"},exportAs:["matSlider"],features:[t.Jv_([{provide:ht,useExisting:n}])],ngContentSelectors:Zt,decls:9,vars:5,consts:[["trackActive",""],["tickMarkContainer",""],[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],[1,"mdc-slider__tick-marks"],[3,"discrete","thumbPosition","valueIndicatorText"],[3,"class","transform"]],template:function(i,a){1&i&&(t.NAR(),t.SdG(0),t.j41(1,"div",2),t.nrm(2,"div",3),t.j41(3,"div",4),t.nrm(4,"div",5,0),t.k0s(),t.DNE(6,ie,3,1,"div",6),t.k0s(),t.DNE(7,ne,1,3,"mat-slider-visual-thumb",7),t.nrm(8,"mat-slider-visual-thumb",7)),2&i&&(t.R7$(6),t.vxM(a.showTickMarks?6:-1),t.R7$(),t.vxM(a._isRange?7:-1),t.R7$(),t.Y8G("discrete",a.discrete)("thumbPosition",2)("valueIndicatorText",a.endValueIndicatorText))}
1,dependencies:[ae],styles:['.mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mdc-slider-inactive-track-height, 4px)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mdc-slider-active-track-shape, var(--mat-sys-corner-full));height:var(--mdc-slider-active-track-height, 4px);top:calc((var(--mdc-slider-inactive-track-height, 4px) - var(--mdc-slider-active-track-height, 4px))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mdc-slider-active-track-color, var(--mat-sys-primary));border-top-width:var(--mdc-slider-active-track-height, 4px)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mat-sys-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mdc-slider-inactive-track-color, var(--mat-sys-surface-variant));height:var(--mdc-slider-inactive-track-height, 4px);border-radius:var(--mdc-slider-inactive-track-shape, var(--mat-sys-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mat-sys-on-surface));opacity:.24}.mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%);transform:var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg))}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;border-radius:4px;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom;opacity:1;transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary));color:var(--mdc-slider-label-label-text-color, var(--mat-sys-on-primary));width:var(--mat-slider-value-indicator-width, 28px);height:var(--mat-slider-value-indicator-height, 28px);padding:var(--mat-slider-value-indicator-padding, 0);opacity:var(--mat-slider-value-indicator-opacity, 1);border-radius:var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display, none);border-top-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary))}.mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width, 28px);transform:var(--mat-slider-value-indicator-text-transform, rotate(45deg));font-family:var(--mdc-slider-label-label-text-font, var(--mat-sys-label-medium-font));font-size:var(--mdc-slider-label-label-text-size, var(--mat-sys-label-medium-size));font-weight:var(--mdc-slider-label-label-text-weight, var(--mat-sys-label-medium-weight));line-height:var(--mdc-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height));letter-spacing:var(--mdc-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}
1.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-width:calc(var(--mdc-slider-handle-height, 20px)/2) calc(var(--mdc-slider-handle-width, 20px)/2);box-shadow:var(--mdc-slider-handle-elevation, var(--mat-sys-level1));background-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-radius:var(--mdc-slider-handle-shape, var(--mat-sys-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface));border-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mdc-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary));border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mdc-slider-with-tick-marks-container-size, 2px);height:var(--mdc-slider-with-tick-marks-container-size, 2px);border-radius:var(--mdc-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-sl
1ider-ripple-color, var(--mat-sys-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-focus-indicator::before{content:""}\n'],encapsulation:2,changeDetection:0})}return n})();const re={provide:p.kq,useExisting:(0,t.Rfq)(()=>Tt),multi:!0},oe={provide:p.kq,useExisting:(0,t.Rfq)(()=>gt),multi:!0};let Tt=(()=>{class n{_ngZone=(0,t.WQX)(t.SKi);_elementRef=(0,t.WQX)(t.aKT);_cdr=(0,t.WQX)(t.gRc);_slider=(0,t.WQX)(ht);_platform=(0,t.WQX)(_t.P);_listenerCleanups;get value(){return(0,t.Udg)(this._hostElement.value,0)}set value(e){const i=(e=isNaN(e)?0:e)+"";this._hasSetInitialValue?this._isActive||this._setValue(i):this._initialValue=i}_setValue(e){this._hostElement.value=e,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck()}valueChange=new t.bkB;dragStart=new t.bkB;dragEnd=new t.bkB;get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(void 0===this._translateX&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(e){this._translateX=e}_translateX;thumbPosition=f.END;get min(){return(0,t.Udg)(this._hostElement.min,0)}set min(e){this._hostElement.min=e+"",this._cdr.detectChanges()}get max(){return(0,t.Udg)(this._hostElement.max,0)}set max(e){this._hostElement.max=e+"",this._cdr.detectChanges()}get step(){return(0,t.Udg)(this._hostElement.step,0)}set step(e){this._hostElement.step=e+"",this._cdr.detectChanges()}get disabled(){return(0,t.L39)(this._hostElement.disabled)}set disabled(e){this._hostElement.disabled=e,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?0===this._translateX?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_hostElement=this._elementRef.nativeElement;_valuetext=(0,t.vPA)("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(e){this._isFocused=e}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new Ct.B;_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){const e=(0,t.WQX)(t.sFG);this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[e.listen(this._hostElement,"pointerdown",this._onPointerDown.bind(this)),e.listen(this._hostElement,"pointermove",this._onPointerMove.bind(this)),e.listen(this._hostElement,"pointerup",this._onPointerUp.bind(this))]})}ngOnDestroy(){this._listenerCleanups.forEach(e=>e()),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,void 0===this._initialValue?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0)}
1_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(e){if(!this.disabled&&0===e.button){if(this._platform.IOS){const i=this._slider._isCursorOnSliderThumb(e,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());return this._isActive=i,this._updateWidthActive(),void this._slider._updateDimensions()}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(e,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(e),this.dragStart.emit({source:this,parent:this._slider,value:this.value}))}}_handleValueCorrection(e){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(e)},0)}_fixValue(e){const i=e.clientX-this._slider._cachedLeft,a=this._slider._cachedWidth,s=0===this._slider.step?1:this._slider.step,o=Math.floor((this._slider.max-this._slider.min)/s),h=Math.round((this._slider._isRtl?1-i/a:i/a)*o)/o*(this._slider.max-this._slider.min)+this._slider.min,_=Math.round(h/s)*s;if(_===this.value)return this._slider._onValueChange(this),void(this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation}));this.value=_,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation})}_onPointerMove(e){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(e)}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0))}_clamp(e){const i=this._tickMarkOffset;return Math.max(Math.min(e,this._slider._cachedWidth-this._tickMarkOffset),i)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*(this._slider._cachedWidth-2*this._tickMarkOffset)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-2*this._tickMarkOffset)+this._tickMarkOffset}_calcTranslateXByPointerEvent(e){return e.clientX-this._slider._cachedLeft}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-2*this._tickMarkOffset}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`}_updateThumbUIByValue(e){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(e)}_updateThumbUIByPointerEvent(e,i){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(e)),this._updateThumbUI(i)}_updateThumbUI(e){this._slider._setTransition(!!e?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(e){(this._isControlInitialized||null!==e)&&(this.value=e)}registerOnChange(e){this._onChangeFn=e,this._isControlInitialized=!0}registerOnTouched(e){this._onTouchedFn=e}setDisabledState(e){this.disabled=e}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}static \u0275fac=function(i){return new(i||n)};static \u0275dir=t.FsC({type:n,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(i,a){1&i&&t.bIt("change",function(){return a._onChange()})("input",function(){return a._onInput()})("blur",function(){return a._onBlur()})("focus",function(){return a._onFocus()}),2&i&&t.BMQ("aria-valuetext",a._valuetext())},inputs:{value:[2,"value","value",t.Udg]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[t.Jv_([re,{provide:St,useExisting:n}])]})}return n})(),gt=(()=>{class n extends Tt{_cdr=(0,t.WQX)(t.gRc);getSibling(){return this._sibling||(this._sibling=this._slider._getInput(this._isEndThumb?f.START:f.END)),this._sibling}_sibling;getMinPos(){const e=this.getSibling();return!this._isLeftThumb&&e?e.translateX:this._tickMarkOffset}getMaxPos(){const e=this.getSibling();return this._isLeftThumb&&e?e.translateX:this._slider._cachedWidth-this._tickMarkOffset}_setIsLeftThumb(){this._isLeftThumb=this._isEndThumb&&this._slider._isRtl||!this._isEndThumb&&!this._slider._isRtl}_isLeftThumb;_isEndThumb;constructor(){super(),this._isEndThumb=this._hostElement.hasAttribute("matSliderEndThumb"),this._setIsLeftThumb(),this.thumbPosition=this._isEndThumb?f.END:f.START}_getDefaultValue(){return this._isEndThumb&&this._slider._isRange?this.max:this.min}_onInput(){super._onInput(),this._updateSibling(),this._isActive||this._updateWidthInactive()}_onNgControlValueChange(){super._onNgControlValueChange(),this.get
1Sibling()?._updateMinMax()}_onPointerDown(e){this.disabled||0!==e.button||(this._sibling&&(this._sibling._updateWidthActive(),this._sibling._hostElement.classList.add("mat-mdc-slider-input-no-pointer-events")),super._onPointerDown(e))}_onPointerUp(){super._onPointerUp(),this._sibling&&setTimeout(()=>{this._sibling._updateWidthInactive(),this._sibling._hostElement.classList.remove("mat-mdc-slider-input-no-pointer-events")})}_onPointerMove(e){super._onPointerMove(e),!this._slider.step&&this._isActive&&this._updateSibling()}_fixValue(e){super._fixValue(e),this._sibling?._updateMinMax()}_clamp(e){return Math.max(Math.min(e,this.getMaxPos()),this.getMinPos())}_updateMinMax(){const e=this.getSibling();e&&(this._isEndThumb?(this.min=Math.max(this._slider.min,e.value),this.max=this._slider.max):(this.min=this._slider.min,this.max=Math.min(this._slider.max,e.value)))}_updateWidthActive(){const e=2*this._slider._rippleRadius-2*this._slider._inputPadding;this._hostElement.style.width=`${(this._slider._cachedWidth+this._slider._inputPadding-e-2*this._tickMarkOffset)*(this._slider.min<this._slider.max?(this.max-this.min)/(this._slider.max-this._slider.min):1)+e}px`,this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`}_updateWidthInactive(){const e=this.getSibling();if(!e)return;const a=this._isEndThumb?this.value-(this.value-e.value)/2:this.value+(e.value-this.value)/2,o=this._slider.min<this._slider.max?this._isEndThumb?(this.max-a)/(this._slider.max-this._slider.min):(a-this.min)/(this._slider.max-this._slider.min):1;let l=this._slider._rippleRadius;1===o?l=48:0===o&&(l=0),this._hostElement.style.width=`${(this._slider._cachedWidth-2*this._tickMarkOffset)*o+l}px`,this._hostElement.style.padding="0px",this._isLeftThumb?(this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`,this._hostElement.style.right="auto"):(this._hostElement.style.left="auto",this._hostElement.style.right=`-${this._slider._rippleRadius-this._tickMarkOffset}px`)}_updateStaticStyles(){this._hostElement.classList.toggle("mat-slider__right-input",!this._isLeftThumb)}_updateSibling(){const e=this.getSibling();e&&(e._updateMinMax(),this._isActive?e._updateWidthActive():e._updateWidthInactive())}writeValue(e){(this._isControlInitialized||null!==e)&&(this.value=e,this._updateWidthInactive(),this._updateSibling())}_setValue(e){super._setValue(e),this._updateWidthInactive(),this._updateSibling()}static \u0275fac=function(i){return new(i||n)};static \u0275dir=t.FsC({type:n,selectors:[["input","matSliderStartThumb",""],["input","matSliderEndThumb",""]],exportAs:["matSliderRangeThumb"],features:[t.Jv_([oe,{provide:xt,useExisting:n}]),t.Vt3]})}return n})(),le=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=t.$C({type:n});static \u0275inj=t.G2t({imports:[Qt.M,Ht.M]})}return n})();const ce=n=>({invalidChars:n}),me=n=>({item:n});function de(n,r){if(1&n&&(t.j41(0,"span",28),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Lme(": ",e.sizeRoomsMin," - ",e.sizeRoomsMax,"")}}function pe(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend",20),t.EFF(3),t.nI1(4,"translate"),t.DNE(5,de,2,2,"span",21),t.k0s(),t.j41(6,"div",22)(7,"label",23),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",24),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",25)(12,"input",26),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.sizeRoomsMin,a)||(s.sizeRoomsMin=a),t.Njj(a)}),t.k0s(),t.j41(13,"input",27),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.sizeRoomsMax,a)||(s.sizeRoomsMax=a),t.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,6,"NUMBEROFROOMS")),t.R7$(2),t.Y8G("ngIf",e.sizeRoomsMax||e.sizeRoomsMin),t.R7$(6),t.Y8G("min",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.minNumberOfRooms)("max",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxNumberOfRooms),t.R7$(),t.R50("ngModel",e.sizeRoomsMin),t.R7$(),t.R50("ngModel",e.sizeRoomsMax)}}function ue(n,r){if(1&n&&(t.j41(0,"span",36),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Lme(": ",e.locationAreaMin," - ",e.locationAreaMax," kvm")}}function _e(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend",29),t.EFF(3),t.nI1(4,"translate"),t.DNE(5,ue,2,2,"span",30),t.k0s(),t.j41(6,"div",22)(7,"label",31),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",32),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",33)(12,"input",34),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.locationAreaMin,a)||(s.locationAreaMin=a),t.Njj(a)}),t.k0s(),t.j41(13,"input",35),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.locationAreaMax,a)||(s.locationAreaMax=a),t.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.SpI("",t.bMT(4,7,"SIZESQM")," "),t.R7$(2),t.Y8G("ngIf",e.locationAreaMin||e.locationAreaMax),t.R7$(6),t.Y8G("step",10)("min",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.minSize)("max",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxSize),t.R7$(),t.R50("ngModel",e.locationAreaMin),t.R7$(),t.R50("ngModel",e.locationAreaMax)}}function he(n,r){if(1&n&&(t.j41(0,"span",43),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.Lme(": ",e.priceMin," - ",e.priceMax,":-")}}function ge(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend",37),t.EFF(3),t.nI1(4,"translate"),t.DNE(5,he,2,2,"span",38),t.k0s(),t.j41(6,"div",22)(7,"label",39),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",40),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",33)(12,"input",41),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.priceMin,a)||(s.priceMin=a),t.Njj(a)}),t.k0s(),t.j41(13,"input",42),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.priceMax,a)||(s.priceMax=a),t.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.SpI("",t.bMT(4,7,"PRICE")," "),t.R7$(2),t.Y8G("ngIf",e.priceMin||e.priceMax),t.R7$(6),t.Y8G("step",(null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxPrice)>2e3?1e3:100)("min",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.minPrice)("max",null==e.marketObjectsTypesItem?null:e.marketObjectsTypesItem.maxPrice),t.R7$(),t.R50("ngModel",e.priceMin),t.R7$(),t.R50("ngModel",e.priceMax)}}function fe(n,r){if(1&n&&(t.j41(0,"mat-option",47),t.EFF(1),t.k0s()),2&n){const e=r.$implicit,i=t.XpG(3);t.Y8G("value",i.areaUseGeographicRentalArea?e.id:e.displayName),t.BMQ("data-mom-test","Market_Filter_District_Option_"+e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function be(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label",44),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-select",45),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.areas,a)||(s.areas=a),t.Njj(a)}),t.DNE(6,fe,2,3,"mat-option",46),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,3,"DISTRICT")),t.R7$(2),t.R50("ngModel",e.areas),t.R7$(),t.Y8G("ngForOf",e.marketObjectsAreas.items)}}function ke(n,r){if(1&n&&(t.j41(0,"mat-option",47),t.EFF(1),t.k0s()),2&n){const e=r.$implicit;t.Y8G("value",e.displayName),t.BMQ("data-mom-test","Market_Filter_Wishes_Option_"+e.displayName),t.R7$(),t.SpI(" ",e.displayName," ")}}function Me(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field",48)(2,"mat-label",49),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-select",50),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG(2);return t.DH7(s.includes,a)||(s.includes=a),t.Njj(a)}),t.DNE(6,ke,2,3,"mat-option",46),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,3,"WISHES")),t.R7$(2),t.R50("ngModel",e.includes),t.R7$(),t.Y8G("ngForOf",e.marketObjectsIncludes.items)}}function ve(n,r){if(1&n&&(t.j41(0,"mat-option",47),t.EFF(1),t.k0s()),2&n){const e=r.$implicit,i=t.XpG().$implicit;t.Y8G("value",e.id),t.BMQ("data-mom-test","Market_Filter_Alternative_Option_"+i.type+"_"+e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function Re(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-form-field",48)(1,"mat-label"),t.EFF(2),t.k0s(),t.j41(3,"mat-select",52),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].values,a)||(o.attributesModels[s.type].values=a),t.Njj(a)}),t.DNE(4,ve,2,3,"mat-option",46),t.k0s()()}if(2&n){const e=r.$implicit,i=t.XpG(3);t.R7$(),t.BMQ("data-mom-test","Market_Filter_Alternative_Label_"+e.type),t.R7$(),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",i.attributesModels[e.type].values),t.Y8G("name",e.type),t.BMQ("data-mom-test","Market_Filter_Alternative_Select_"+e.type),t.R7$(),t.Y8G("ngForOf",e.alternatives)}}function Ie(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,Re,5,6,"mat-form-field",51),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.attributesAlternatives)}}function Ce(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label"),t.EFF(3),t.k0s(),t.j41(4,"input",55,1),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].value,a)||(o.attributesModels[s.type].value=a),t.Njj(a)}),t.k0s(),t.j41(6,"mat-error"),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()}if(2&n){const e=r.$implicit,i=t.sdS(5),a=t.XpG(3);t.R7$(2),t.BMQ("data-mom-test","Market_Filter_Text_Label_"+e.type),t.R7$(),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",a.attributesModels[e.type].value),t.Y8G("name",e.type),t.BMQ("data-mom-test","Market_Filter_Text_Input_"+e.type),t.R7$(2),t.BMQ("data-mom-test","Market_Filter_Text_Error_"+e.type),t.R7$(),t.JRh(t.i5U(8,7,"INVALIDCHARACTERS",t.eq3(10,ce,null==i.errors||null==i.errors.allowedCharacters?null:i.errors.allowedCharacters.invalidChars)))}}function Se(n,r){if(1&n&&(t.j41(0,"div",53),t.DNE(1,Ce,9,12,"div",54),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.attributesTexts)}}function xe(n,r){if(1&n){const e=t.RV6();t.qex(0),t.j41(1,"div",57)(2,"mat-label"),t.EFF(3),t.k0s()(),t.j41(4,"div")(5,"mat-form-field")(6,"mat-label",58),t.EFF(7,"Min"),t.k0s(),t.j41(8,"input",59),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].minValue,a)||(o.attributesModels[s.type].minValue=a),t.Njj(a)}),t.k0s(),t.j41(9,"mat-error"),t.EFF(10),t.nI1(11,"translate"),t.k0s()(),t.j41(12,"span",60),t.EFF(13,"-"),t.k0s(),t.j41(14,"mat-form-field")(15,"mat-label",61),t.EFF(16,"Max"),t.k0s(),t.j41(17,"input",62),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].maxValue,a)||(o.attributesModels[s.type].maxValue=a),t.Njj(a)}),t.k0s(),t.j41(18,"mat-error"),t.EFF(19),t.nI1(20,"translate"),t.k0s()()(),t.bVm()}if(2&n){let e;const i=r.$implicit,a=t.XpG(3);t.R7$(2),t.BMQ("data-mom-test","Market_Filter_NumberRange_Label_"+i.type),t.R7$(),t.JRh(i.typeDisplayName),t.R7$(5),t.Y8G("max",a.attributesModels[i.type].maxValue),t.R50("ngModel",a.attributesModels[i.type].minValue),t.Y8G("name",i.type+"Min"),t.BMQ("data-mom-test","Market_Filter_NumberRange_Min_Input_"+i.type),t.R7$(),t.BMQ("data-mom-test","Market_Filter_NumberRange_Min_Error_"+i.type),t.R7$(),t.JRh(t.bMT(11,15,"CANNOTBEMORETHANMAX")),t.R7$(2),t.BMQ("data-mom-test","Market_Filter_NumberRange_Hyphen_"+i.type),t.R7$(5),t.Y8G("min",null!==(e=a.attributesModels[i.type].minValue)&&void 0!==e?e:1),t.R50("ngModel",a.attributesModels[i.type].maxValue),t.Y8G("name",i.type+"Max"),t.BMQ("data-mom-test","Market_Filter_NumberRange_Max_Input_"+i.type),t.R7$(),t.BMQ("data-mom-test","Market_Filter_NumberRange_Max_Error_"+i.type),t.R7$(),t.JRh(t.bMT(20,17,"CANNOTBELESSTHANMIN"))}}function Oe(n,r){if(1&n&&(t.j41(0,"div",56),t.DNE(1,xe,21,19,"ng-container",54),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.attributesNumbers)}}function je(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",69),t.nI1(1,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG(3);return s.attributesModels[a.type].minValue="",t.Njj(s.attributesModels[a.type].maxValue="")}
1),t.j41(2,"mat-icon"),t.EFF(3,"cancel"),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.BMQ("aria-label",t.i5U(1,3,"RESETITEM",t.eq3(6,me,e.typeDisplayName)))("data-mom-test","Market_Filter_DateRange_ResetButton_"+e.type),t.R7$(2),t.BMQ("data-mom-test","Market_Filter_DateRange_ResetIcon_"+e.type)}}function Te(n,r){if(1&n){const e=t.RV6();t.qex(0),t.j41(1,"div",57)(2,"mat-label"),t.EFF(3),t.k0s(),t.DNE(4,je,4,8,"button",64),t.k0s(),t.j41(5,"div")(6,"mat-form-field",65),t.bIt("click",function(){t.eBV(e);const a=t.sdS(13);return t.Njj(a.open())}),t.j41(7,"mat-label"),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.j41(10,"input",66),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].minValue,a)||(o.attributesModels[s.type].minValue=a),t.Njj(a)}),t.k0s(),t.nrm(11,"mat-datepicker-toggle",67)(12,"mat-datepicker",null,2),t.k0s(),t.j41(14,"span",60),t.EFF(15,"-"),t.k0s(),t.j41(16,"mat-form-field",65),t.bIt("click",function(){t.eBV(e);const a=t.sdS(23);return t.Njj(a.open())}),t.j41(17,"mat-label"),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"input",68),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].maxValue,a)||(o.attributesModels[s.type].maxValue=a),t.Njj(a)}),t.k0s(),t.nrm(21,"mat-datepicker-toggle",67)(22,"mat-datepicker",null,3),t.k0s()(),t.bVm()}if(2&n){let e;const i=r.$implicit,a=t.sdS(13),s=t.sdS(23),o=t.XpG(3);t.R7$(2),t.BMQ("data-mom-test","Market_Filter_DateRange_Label_"+i.type),t.R7$(),t.JRh(i.typeDisplayName),t.R7$(),t.Y8G("ngIf",o.attributesModels[i.type].minValue||o.attributesModels[i.type].maxValue),t.R7$(3),t.BMQ("data-mom-test","Market_Filter_DateRange_From_Label_"+i.type),t.R7$(),t.JRh(t.bMT(9,22,"FROM")),t.R7$(2),t.Y8G("matDatepicker",a),t.R50("ngModel",o.attributesModels[i.type].minValue),t.Y8G("name",i.type+"Min")("max",o.attributesModels[i.type].maxValue),t.BMQ("data-mom-test","Market_Filter_DateRange_From_Input_"+i.type),t.R7$(),t.Y8G("for",a),t.BMQ("data-mom-test","Market_Filter_DateRange_From_Toggle_"+i.type),t.R7$(3),t.BMQ("data-mom-test","Market_Filter_DateRange_Hyphen_"+i.type),t.R7$(3),t.BMQ("data-mom-test","Market_Filter_DateRange_To_Label_"+i.type),t.R7$(),t.JRh(t.bMT(19,24,"TO")),t.R7$(2),t.Y8G("matDatepicker",s),t.R50("ngModel",o.attributesModels[i.type].maxValue),t.Y8G("name",i.type+"Max")("min",null!==(e=o.attributesModels[i.type].minValue)&&void 0!==e?e:1),t.BMQ("data-mom-test","Market_Filter_DateRange_To_Input_"+i.type),t.R7$(),t.Y8G("for",s),t.BMQ("data-mom-test","Market_Filter_DateRange_To_Toggle_"+i.type)}}function Fe(n,r){if(1&n&&(t.j41(0,"div",63),t.DNE(1,Te,24,26,"ng-container",54),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.attributesDates)}}function ye(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-checkbox",71),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(3);return t.DH7(o.attributesModels[s.type].value,a)||(o.attributesModels[s.type].value=a),t.Njj(a)}),t.EFF(2),t.k0s()()}if(2&n){const e=r.$implicit,i=t.XpG(3);t.R7$(),t.R50("ngModel",i.attributesModels[e.type].value),t.Y8G("name",e.type),t.BMQ("data-mom-test","Market_Filter_Checkbox_"+e.type),t.R7$(),t.SpI(" ",e.typeDisplayName," ")}}function Ee(n,r){if(1&n&&(t.j41(0,"div",70),t.DNE(1,ye,3,4,"div",54),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.attributesBools)}}function Ae(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",72),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.saveSubscription(!1))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){t.XpG(2);const e=t.sdS(1);t.Y8G("disabled",!(null!=e&&e.valid)),t.R7$(),t.JRh(t.bMT(2,2,"SAVESUBSCRIPTION"))}}function $e(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",73),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.close())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("routerLink",e.marketSubscriptionsLink),t.R7$(),t.JRh(t.bMT(2,2,"MYMARKETSUBSCRIPTIONS"))}}function Ne(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",5)(1,"div",6)(2,"mat-icon",7),t.EFF(3,"filter_alt"),t.k0s()(),t.j41(4,"div",8),t.DNE(5,pe,14,8,"div",9)(6,_e,14,9,"div",9)(7,ge,14,9,"div",9),t.k0s(),t.j41(8,"div",10),t.DNE(9,be,7,5,"div",9)(10,Me,7,5,"div",9)(11,Ie,2,1,"div",9),t.k0s(),t.DNE(12,Se,2,1,"div",11)(13,Oe,2,1,"div",12)(14,Fe,2,1,"div",13)(15,Ee,2,1,"div",14),t.j41(16,"button",15),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.close())}),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"button",16),t.nI1(20,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.clear())}),t.EFF(21),t.nI1(22,"translate"),t.k0s(),t.j41(23,"button",17),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.saveFilter())}),t.EFF(24),t.nI1(25,"translate"),t.k0s(),t.DNE(26,Ae,3,4,"button",18)(27,$e,3,4,"button",19),t.k0s()}if(2&n){const e=t.XpG(),i=t.sdS(1);t.R7$(5),t.Y8G("ngIf",null==e.marketObjectsTypesSubscriptionsSetting?null:e.marketObjectsTypesSubscriptionsSetting.numberOfRoomsMin),t.R7$(),t.Y8G("ngIf",null==e.marketObjectsTypesSubscriptionsSetting?null:e.marketObjectsTypesSubscriptionsSetting.areaMin),t.R7$(),t.Y8G("ngIf",null==e.marketObjectsTypesSubscriptionsSetting?null:e.marketObjectsTypesSubscriptionsSetting.priceMax),t.R7$(2),t.Y8G("ngIf",(null==e.marketObjectsTypesSubscriptionsSetting?null:e.marketObjectsTypesSubscriptionsSetting.areas)&&(null==e.marketObjectsAreas.items?null:e.marketObjectsAreas.items.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.marketObjectsIncludes||null==e.marketObjectsIncludes.items?null:e.marketObjectsIncludes.items.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.attributesAlternatives?null:e.attributesAlternatives.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.attributesTexts?null:e.attributesTexts.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.attributesNumbers?null:e.attributesNumbers.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.attributesDates?null:e.attributesDates.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.attributesBools?null:e.attributesBools.length)>0),t.R7$(2),t.JRh(t.bMT(18,17,"CLOSE")),t.R7$(2),t.BMQ("aria-label",t.bMT(20,19,"RESETFILTER")),t.R7$(2),t.JRh(t.bMT(22,21,"CLEAR")),t.R7$(2),t.Y8G("disabled",!(null!=i&&i.valid)),t.R7$(),t.JRh(t.bMT(25,23,"SAVE")),t.R7$(2),t.Y8G("ngIf",e.showSaveSubscription),t.R7$(),t.Y8G("ngIf",e.marketSubscriptionsLink)}}let Ge=(()=>{class n{constructor(e,i,a,s,o,l,c,h,_,d,M,C,A){if(this.marketService=e,this.mediaQueryService=i,this.injector=a,this.router=s,this.route=o,this.changeDetectorRef=l,this.data=c,this.clientConfigurationService=h,this.adapter=_,this.translate=d,this.snackBarService=M,this.signinService=C,this.dialog=A,this.filters=[],this.rightSheetRef=null,this.attributesModels={},this.marketSubscriptionsPutAttributes=[],this.adapter.setLocale("sv"),this.marketObjectsTypeId=c.marketObjectsTypeId,this.rightSheetRef=this.injector.get(tt.rH,null),
1c.saveSubscriptionFromSessionStorage){const v=JSON.parse(sessionStorage.getItem("SUBSCRIPTION_TO_SAVE"));if(this.sizeRoomsMin=v.sizeRoomsMin,this.sizeRoomsMax=v.sizeRoomsMax,this.locationAreaMin=v.sizeAreaMin,this.locationAreaMax=v.sizeAreaMax,this.priceMin=v.priceMin,this.priceMax=v.priceMax,this.areas=v.areas?.split(","),v.attributes?.length>0){let H={};for(const T of v.attributes)H[T.type]={values:T.value.replaceAll(";",":")};this.attributesString=JSON.stringify(H)}}else{const v=this.marketService.getMarketObjectsFilterSettings(this.marketObjectsTypeId);this.sizeRoomsMin=this.route.snapshot.queryParams.sizeRoomsMin?this.route.snapshot.queryParams.sizeRoomsMin:v.sizeRoomsMin,this.sizeRoomsMax=this.route.snapshot.queryParams.sizeRoomsMax?this.route.snapshot.queryParams.sizeRoomsMax:v.sizeRoomsMax,this.locationAreaMin=this.route.snapshot.queryParams.locationAreaMin?this.route.snapshot.queryParams.locationAreaMin:v.locationAreaMin,this.locationAreaMax=this.route.snapshot.queryParams.locationAreaMax?this.route.snapshot.queryParams.locationAreaMax:v.locationAreaMax,this.priceMin=this.route.snapshot.queryParams.priceMin?this.route.snapshot.queryParams.priceMin:v.priceMin,this.priceMax=this.route.snapshot.queryParams.priceMax?this.route.snapshot.queryParams.priceMax:v.priceMax,this.areas=this.route.snapshot.queryParams.areas?this.route.snapshot.queryParams.areas.split(","):v.areas,this.includes=this.route.snapshot.queryParams.includes?this.route.snapshot.queryParams.includes.split(","):v.includes,this.attributesString=this.route.snapshot.queryParams.attributes?this.route.snapshot.queryParams.attributes:v.attributes}}ngOnInit(){this.data.saveSubscriptionFromSessionStorage&&this.saveSubscription(!0),this.clientConfigurationService.getClientConfigurationFeatures().pipe((0,I.H)(e=>(e?.subscription?.enabled&&(this.marketSubscriptionsLink=N.t.MARKETSUBSCRIPTIONS),this.areaUseGeographicRentalArea=e?.areaUseGeographicRentalArea?.enabled,(0,X.p)([this.marketService.getMarketObjectsTypesItem(this.marketObjectsTypeId),this.areaUseGeographicRentalArea?this.marketService.getMarketObjectsTypesAreas(this.marketObjectsTypeId):this.marketService.getMarketObjectsAreas(),this.marketService.getMarketObjectsTypesItemSubscriptionsSetting(this.marketObjectsTypeId),this.marketService.getMarketSubscriptionsMarketObjectsTypes()])))).subscribe(e=>{this.marketObjectsTypesItem=e[0],this.marketSubscriptionsMarketObjectsTypes=e[3],this.sizeRoomsMin=this.sizeRoomsMin?this.sizeRoomsMin:this.marketObjectsTypesItem.minNumberOfRooms?+this.marketObjectsTypesItem.minNumberOfRooms:0,this.sizeRoomsMax=this.sizeRoomsMax?this.sizeRoomsMax:+this.marketObjectsTypesItem.maxNumberOfRooms,this.locationAreaMin=this.locationAreaMin?this.locationAreaMin:this.marketObjectsTypesItem.minSize?+this.marketObjectsTypesItem.minSize:0,this.locationAreaMax=this.locationAreaMax?this.locationAreaMax:+this.marketObjectsTypesItem.maxSize,this.priceMin=this.priceMin?this.priceMin:this.marketObjectsTypesItem.minPrice?+this.marketObjectsTypesItem.minPrice:0,this.priceMax=this.priceMax?this.priceMax:+this.marketObjectsTypesItem.maxPrice,this.marketObjectsAreas=e[1];const i=e[0].attributes?.filter(a=>a.canHaveFilter);this.marketObjectsTypesSubscriptionsSetting=e[2],i?.length>0?(this.attributesAlternatives=i.filter(a=>a.isAlternative&&a.alternatives.filter(s=>s.id)?.length>0),this.buildAttributeModels(this.attributesAlternatives,"isAlternative"),this.attributesBools=i.filter(a=>a.isBool),this.buildAttributeModels(this.attributesBools,"isBool"),this.attributesDates=i.filter(a=>a.isDate),this.buildAttributeModels(this.attributesDates,"isDate"),this.attributesNumbers=i.filter(a=>a.isNumber),this.buildAttributeModels(this.attributesNumbers,"isNumber"),this.attributesTexts=i.filter(a=>a.isText),this.buildAttributeModels(this.attributesTexts,"isText"),this.setAttributeModelsValues(),this.setShowSaveSubscription()):this.marketService.getMarketObjectsIncludes().subscribe(a=>{this.marketObjectsIncludes=a,this.changeDetectorRef.detectChanges(),this.setShowSaveSubscription()}),this.changeDetectorRef.detectChanges()})}formatLabel(e){return e>=1e3?Math.round(e/1e3)+"k":e}close(){this.rightSheetRef.dismiss("cancel")}saveFilter(e){const i=this.sizeRoomsMin&&+this.sizeRoomsMin!=+this.marketObjectsTypesItem.minNumberOfRooms?+this.sizeRoomsMin:void 0,a=this.sizeRoomsMax&&+this.sizeRoomsMax!=+this.marketObjectsTypesItem.maxNumberOfRooms?+this.sizeRoomsMax:void 0,s=this.locationAreaMin&&+this.locationAreaMin!=+this.marketObjectsTypesItem.minSize?+this.locationAreaMin:void 0,o=this.locationAreaMax&&+this.locationAreaMax!=+this.marketObjectsTypesItem.maxSize?+this.locationAreaMax:void 0,l=this.priceMin&&+this.priceMin!=+this.marketObjectsTypesItem.minPrice?+this.priceMin:void 0,c=this.priceMax&&+this.priceMax!=+this.marketObjectsTypesItem.maxPrice?+this.priceMax:void 0;this.rightSheetRef.dismiss();const h={sizeRoomsMin:i,sizeRoomsMax:a,locationAreaMin:s,locationAreaMax:o,priceMin:l,priceMax:c,clear:e,areas:this.areas&&this.areas.length>0?this.areas?.join(","):null,includes:this.includes&&this.includes.length>0?this.includes?.join(","):null,attributes:null,page:null};if(!e){let _={};this.attributesString=null,Object.keys(this.attributesModels).forEac
1h(d=>{switch(this.attributesModels[d].type){case"isAlternative":this.attributesModels[d].values?.length>0&&(_[d]={values:this.attributesModels[d].values.join(":")});break;case"isBool":!0===this.attributesModels[d].value&&(_[d]={values:this.attributesModels[d].value});break;case"isDate":if("object"==typeof this.attributesModels[d].minValue||"object"==typeof this.attributesModels[d].maxValue){const M=this.attributesModels[d].minValue?g()(this.attributesModels[d].minValue).format("YYYY-MM-DD"):null,C=this.attributesModels[d].maxValue?g()(this.attributesModels[d].maxValue).format("YYYY-MM-DD"):null;_[d]={values:M+":"+C}}break;case"isNumber":"number"!=typeof this.attributesModels[d].minValue&&"number"!=typeof this.attributesModels[d].maxValue||(_[d]={values:(this.attributesModels[d].minValue?this.attributesModels[d].minValue:null)+":"+(this.attributesModels[d].maxValue?this.attributesModels[d].maxValue:null)});break;case"isText":this.attributesModels[d].value&&""!==this.attributesModels[d].value&&(_[d]={values:this.attributesModels[d].value})}Object.keys(_).length>0&&(this.attributesString=JSON.stringify(_),h.attributes=this.attributesString)})}Object.values(h).filter(_=>_)?.length>0?(this.router.navigate([],{relativeTo:this.route,queryParams:h,queryParamsHandling:"merge"}),e||this.marketService.saveMarketObjectsFilterSettings(this.marketObjectsTypeId,i,a,s,o,l,c,this.areas,this.includes,this.attributesString)):this.clear()}clear(){this.sizeRoomsMin=null,this.sizeRoomsMax=null,this.locationAreaMin=null,this.locationAreaMax=null,this.priceMin=null,this.priceMax=null,this.areas=null,this.includes=null,this.sizeRoomsMin=this.sizeRoomsMin?this.sizeRoomsMin:this.marketObjectsTypesItem.minNumberOfRooms?+this.marketObjectsTypesItem.minNumberOfRooms:0,this.sizeRoomsMax=this.sizeRoomsMax?this.sizeRoomsMax:+this.marketObjectsTypesItem.maxNumberOfRooms,this.locationAreaMin=this.locationAreaMin?this.locationAreaMin:this.marketObjectsTypesItem.minSize?+this.marketObjectsTypesItem.minSize:0,this.locationAreaMax=this.locationAreaMax?this.locationAreaMax:+this.marketObjectsTypesItem.maxSize,this.priceMin=this.priceMin?this.priceMin:this.marketObjectsTypesItem.minPrice?+this.marketObjectsTypesItem.minPrice:0,this.priceMax=this.priceMax?this.priceMax:+this.marketObjectsTypesItem.maxPrice,this.marketService.clearMarketObjectsFilterSettings(this.marketObjectsTypeId),this.saveFilter(!0)}buildAttributeModels(e,i){if(e)for(const a of e)this.attributesModels[a.type]={type:i}}setAttributeModelsValues(){if(this.attributesString){const e=JSON.parse(this.attributesString);Object.keys(e).forEach(i=>{switch(this.attributesModels[i]?.type){case"isAlternative":this.attributesModels[i].values=e[i].values.split(":");break;case"isBool":case"isText":this.attributesModels[i].value=e[i].values;break;case"isDate":this.attributesModels[i].minValue="null"!==e[i].values.split(":")[0]?new Date(e[i].values.split(":")[0]):null,this.attributesModels[i].maxValue="null"!==e[i].values.split(":")[1]?new Date(e[i].values.split(":")[1]):null;break;case"isNumber":const a=e[i].values.split(":")[0],s=e[i].values.split(":")[1];this.attributesModels[i].minValue="null"!==a?+a:null,this.attributesModels[i].maxValue="null"!==s?+s:null}})}}saveSubscriptionClicked(){this.includes?.length>0?this.dialog.open(E.w,{data:{text:this.translate.instant("SUBSCRIPTIONWISHES",{whishes:this.translate.instant("WISHES").toLowerCase()}),dialogChoices:$.$.Custom,customButtonText:"Ok"},scrollStrategy:new y.N,ariaLabel:this.translate.instant("SUBSCRIPTIONWISHES",{whishes:this.translate.instant("WISHES").toLowerCase()})}).afterClosed().subscribe(i=>{"custom"===i&&this.saveSubscription(!1)}):this.saveSubscription(!1)}saveSubscription(e){if(e){const i=JSON.parse(sessionStorage.getItem("SUBSCRIPTION_TO_SAVE"));sessionStorage.removeItem("SUBSCRIPTION_TO_SAVE"),this.signinService.isAuth&&this.marketService.putMarketSubscriptions(i).subscribe(()=>{this.snackBarService.success(this.translate.instant("SUBSCRIPTIONSAVED"))})}else{Object.keys(this.attributesModels).forEach(_=>{switch(this.attributesModels[_].type){case"isAlternative":this.attributesModels[_].values?.length>0&&this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!1,isDate:!1,isBool:!1,isAlternative:!0,value:this.attributesModels[_].values.join(";")});break;case"isBool":!0===this.attributesModels[_].value&&this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!1,isDate:!1,isBool:!0,isAlternative:!1,value:this.attributesModels[_].value.toString().toLowerCase()});break;case"isDate":if("object"==typeof this.attributesModels[_].minValue||"object"==typeof this.attributesModels[_].maxValue){const d=this.attributesModels[_].minValue?g()(this.attributesModels[_].minValue).format("YYYY-MM-DD"):null,M=this.attributesModels[_].maxValue?g()(this.attributesModels[_].maxValue).format("YYYY-MM-DD"):null;this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!1,isDate:!0,isBool:!1,isAlternative:!1,value:d+";"+M})}break;case"isNumber":"number"!=typeof this.attributesModels[_].minValue&&"number"!=typeof this.attributesModels[_].maxValue||this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!0,isText:!1,isDate:!1,isBool:!1,isAlternative:!1,value:(this.attributesModels[_].minValue?this.attributesModels[_].minValue:null)+";"+(this.attributesModels[_].maxValue?this.attributesModels[_].maxValue:null)});break;case"isText":this.attributesModels[_].value&&""!==this.attributesModels[_].value&&this.marketSubscriptionsPutAttributes.push({type:_,isNumber:!1,isText:!0,isDate:!1,isBool:!1,isAlternative:!1,value:this.attributesModels[_].value})}});let h={marketObjectType:this.marketObjectsTypeId,sizeRoomsMin:this.sizeRoomsMin&&+this.sizeRoomsMin!=+this.marketObjectsTypesItem.minNumberOfRooms?+this.sizeRoomsMin:void 0,sizeRoomsMax:this.sizeRoomsMax&&+this.sizeRoomsMax!=+this.marketObjectsTypesItem.maxNumberOfRooms?+this.sizeRoomsMax:void 0,sizeAreaMin:this.locationAreaMin&&+this.locationAreaMin!=+this.marketObjectsTypesItem.minSize?+this.locationAreaMin:void 0,sizeAreaMax:this.locationAreaMax&&+this.locationAreaMax!=+this.marketObjectsTypesItem.maxSize?+this.locationAreaMax:void 0,priceMin:this.priceMin&&+this.priceMin!=+this.marketObjectsTypesItem.minPrice?+this.priceMin:void 0,priceMax:this.priceMax&&+this.priceMax!=+this.marketObjectsTypesItem.maxPrice?+this.priceMax:void 0,areas:this.areas&&this.areas.length>0?this.areas?.join(","):null,attributes:this.marketSubscriptionsPutAttributes};this.signinService.isAuth?this.marketService.putMarketSubscriptions(h).subscribe(()=>{this.snackBarService.success(this.translate.instant("SUBSCRIPTIONSAVED"))}):(this.rightSheetRef.dismiss("cancel"),sessionStorage.setItem("SUBSCRIPTION_TO_SAVE",JSON.stringify(h)),this.router.navigate(["/signin"],{queryParams:{returnUrl:this.router.url}}))}}setShowSaveSubscription(){this.marketSubscriptionsLink&&this.marketSubscriptionsMarketObjectsTypes.items.find(e=>e.id===this.marketObjectsTypeId)&&(this.marketObjectsIncludes?.items?.length>0||(this.showSaveSubscription=!0,this.changeDetectorRef.detectChanges()))}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F),t.rXU(O.M),t.rXU(t.zZn),t.rXU(j.Ix),t.rXU(j.nX),t.rXU(t.gRc),t.rXU(tt.Zu),t.rXU(q.t),t.rXU(ct.D),t.rXU(b.c$),t.rXU(z.z),t.rXU(It.W),t.rXU(R.j))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-objects-filter"]],standalone:!1,decls:3,vars:1,consts:[["form","ngForm"],["attrModel","ngModel"],["fomPicker",""],["tomPicker",""],["class","filters",4,"ngIf"],[1,"filters"],[1,"icon"],["color","primary","data-mom-test","Market_Filter_FilterIcon",1,"filter-icon"],[1,"sliders","mat-body"],[4,"ngIf"],[1,"selects"],["class","inputs",4,"ngIf"],["class","input-ranges",4,"ngIf"],["class","dates",4,"ngIf"],["class","checkboxes",4,"ngIf"],["mat-raised-button","","data-mom-test","Market_Filter_Close_Button",1,"close-button",3,"click"],["mat-raised-button","","data-mom-test","Market_Filter_Clear_Button",1,"close-button",3,"click"],["mat-raised-button","","color","primary","data-mom-test","Market_Filter_Save_Button",1,"save-button",3,"click","disabled"],["mat-raised-button","","class","save-button","color","primary","data-mom-test","Market_Filter_SaveSubscription_Button",3,"disabled","click",4,"ngIf"],["mat-raised-button","","class","close-button","data-mom-test","Market_Filter_MySubscriptions_Button",3,"routerLink","click",4,"ngIf"],["data-mom-test","Market_Filter_NumberOfRooms_Legend"],["data-mom-test","Market_Filter_NumberOfRooms_RangeText",4,"ngIf"],[1,"group-labels-container"],["for","sizeRoomsMin","data-mom-test","Market_Filter_NumberOfRooms_MinLabel"],["for","sizeRoomsMax","data-mom-test","Market_Filter_NumberOfRooms_MaxLabel"],["color","primary","ngDefaultControl","",3,"min","max"],["id","sizeRoomsMin","matSliderStartThumb","","name","sizeRoomsMin","autocomplete","off","data-mom-test","Market_Filter_NumberOfRooms_MinInput",3,"ngModelChange","ngModel"],["id","sizeRoomsMax","matSliderEndThumb","","name","sizeRoomsMax","autocomplete","off","data-mom-test","Market_Filter_NumberOfRooms_MaxInput",3,"ngModelChange","ngModel"],["data-mom-test","Market_Filter_NumberOfRooms_RangeText"],["data-mom-test","Market_Filter_SizeSqm_Legend"],["data-mom-test","Market_Filter_SizeSqm_RangeText",4,"ngIf"],["for","locationAreaMin","data-mom-test","Market_Filter_SizeSqm_MinLabel"],["for","locationAreaMax","data-mom-test","Market_Filter_SizeSqm_MaxLabel"],["color","primary","ngDefaultControl","",3,"step","min","max"],["id","locationAreaMin","matSliderStartThumb","","name","locationAreaMin","autocomplete","off","data-mom-test","Market_Filter_SizeSqm_MinInput",3,"ngModelChange","ngModel"],["id","locationAreaMax","matSliderEndThumb","","name","locationAreaMax","autocomplete","off","data-mom-test","Market_Filter_SizeSqm_MaxInput",3,"ngModelChange","ngModel"],["data-mom-test","Market_Filter_SizeSqm_RangeText"],["data-mom-test","Market_Filter_Price_Legend"],["data-mom-test","Market_Filter_Price_RangeText",4,"ngIf"],["for","priceMin","data-mom-test","Market_Filter_Price_MinLabel"],["for","priceMax","data-mom-test","Market_Filter_Price_MaxLabel"],["id","priceMin","matSliderStartThumb","","name","priceMin","autocomplete","off","data-mom-test","Market_Filter_Price_MinInput",3,"ngModelChange","ngModel"],["id","priceMax","matSliderEndThumb","","name","priceMax","autocomplete","off","data-mom-test","Market_Filter_Price_MaxInput",3,"ngModelChange","ngModel"],["data-mom-test","Market_Filter_Price_RangeText"],["data-mom-test","Market_Filter_District_Label"],["multiple","","ngDefaultControl","","name","areas","data-mom-test","Market_Filter_District_Select",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["ngDefaultControl",""],["data-mom-test","Market_Filter_Wishes_Label"],["multiple","","ngDefaultControl","","name","includes","data-mom-test","Market_Filter_Wishes_Select",3,"ngModelChange","ngModel"],["ngDefaultControl","",4,"ngFor","ngForOf"],["multiple","","ngDefaultControl","",3,"ngModelChange","ngModel","name"],[1,"inputs"],[4,"ngFor","ngForOf"],["matInput","","taigaAllowedCharacters","","autocomplete","off",3,"ngModelChange","ngModel","name"],[1,"input-ranges"],[2,"display","flex","justify-content","space-between","height","40px"],["data-mom-test","Market_Filter_NumberRange_Min_Label"],["matInput","","min","1","type","number","autocomplete","off",3,"ngModelChange","max","ngModel","name"],[1,"hyphen"],["data-mom-test","Market_Filter_NumberRange_Max_Label"],["matInput","","type","number","autocomplete","off",3,"ngModelChange","min","ngModel","name"],[1,"dates"],["mat-icon-button","","color","primary",3,"click",4,"ngIf"],[3,"click"],["matInput","","readonly","true","min","1","autocomplete","off",3,"ngModelChange","matDatepicker","ngModel","name","max"],["matIconSuffix","",3,"for"],["matInput","","readonly","true","autocomplete","off",3,"ngModelChange","matDatepicker","ngModel","name","min"],["mat-icon-button","","color","primary",3,"click"],[1,"checkboxes"],["color","primary",1,"checkbox",3,"ngModelChange","ngModel","name"],["mat-raised-button","","color","primary","data-mom-test","Market_Filter_SaveSubscription_Button",1,"save-button",3,"click","disabled"],["mat-raised-button","","data-mom-test","Market_Filter_MySubscriptions_Button",1,"close-button",3,"click","routerLink"]],template:function(i,a){1&i&&(t.j41(0,"form",null,0),t.DNE(2,Ne,28,25,"div",4),t.k0s()),2&i&&(t.R7$(2),t.Y8G("ngIf",a.marketObjectsTypesItem&&a.marketObjectsAreas))},dependencies:[u.Sq,u.bT,Y.Wk,G.An,x.$z,it.M,nt.fg,S.j,S.M,S.b,S.g,V.Vh,V.bZ,V.bU,mt.g,dt.M,pt.So,p.qT,p.me,p.Q0,p.BC,p.cb,p.VZ,p.zX,p.vS,p.cV,ut.S,jt,gt,b.D9],styles:["mat-slider[_ngcontent-%COMP%]{width:94%}mat-form-field[_ngcontent-%COMP%]{width:100%}.selects[_ngcontent-%COMP%], .checkboxes[_ngcontent-%COMP%], .sliders[_ngcontent-%COMP%]{width:100%}.icon[_ngcontent-%COMP%]{display:flex;justify-content:center}.filters[_ngcontent-%COMP%]{margin-top:30px}.filter-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;font-size:1.875rem;border:solid;border-radius:50%;margin-bottom:8px}.close-button[_ngcontent-%COMP%], .save-button[_ngcontent-%COMP%]{width:100%;margin-top:10px}mat-select[_ngcontent-%COMP%]{width:97%}.checkboxes[_ngcontent-%COMP%], .dates[_ngcontent-%COMP%]{margin-bottom:12px}.dates[_ngcontent-%COMP%]   div[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hyphen[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;margin-bottom:10px}.dates[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{margin-bottom:8px}fieldset[_ngcontent-%COMP%]{border:none;padding:0}legend[_ngcontent-%COMP%]{padding:0}.group-labels-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:8px}"],changeDetection:0})}}return n})();var De=m(4572),ft=m(345),k=m(5596),Pe=m(1975),W=m(3013),D=m(6112),bt=m(6695),B=m(1997),we=m(5665);const Ve=n=>({place:n}
1);function Ye(n,r){if(1&n&&t.nrm(0,"img",21),2&n){const e=t.XpG(2);t.Y8G("alt",null==e.marketObject.thumbnail?null:e.marketObject.thumbnail.displayName)("src",e.getMarketObjectThumbnail(e.marketObject.id,null==e.marketObject.thumbnail?null:e.marketObject.thumbnail.version),t.B4B)}}function Xe(n,r){1&n&&(t.j41(0,"div",22)(1,"mat-icon",23),t.nI1(2,"translate"),t.EFF(3,"hide_image"),t.k0s()()),2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"NOIMAGE")))}function Be(n,r){if(1&n&&(t.nrm(0,"taiga-pill-badge",24),t.nI1(1,"translate")),2&n){const e=t.XpG(2);t.Y8G("text",t.i5U(1,1,"QUEUEPLACE",t.eq3(4,Ve,e.placeSorted)))}}function Ue(n,r){if(1&n&&t.nrm(0,"taiga-pill-badge",25),2&n){const e=t.XpG(2);t.Y8G("text",e.statusDisplayName)}}function Le(n,r){if(1&n&&(t.j41(0,"span",26),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(null==e.marketObject.location||null==e.marketObject.location.area?null:e.marketObject.location.area.displayName)}}function ze(n,r){1&n&&(t.qex(0),t.EFF(1,", "),t.bVm())}function Qe(n,r){if(1&n&&(t.qex(0),t.j41(1,"span"),t.EFF(2),t.k0s(),t.DNE(3,ze,2,0,"ng-container",18),t.bVm()),2&n){const e=r.$implicit,i=r.index,a=t.XpG(3);t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_LocationAreaPath_"+i),t.R7$(),t.JRh(e.displayName),t.R7$(),t.Y8G("ngIf",(null==a.marketObject.location?null:a.marketObject.location.areaPath.length)>1&&i!==(null==a.marketObject.location?null:a.marketObject.location.areaPath.length)-1)}}function He(n,r){if(1&n&&(t.j41(0,"span"),t.DNE(1,Qe,4,3,"ng-container",27),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",null==e.marketObject.location?null:e.marketObject.location.areaPath)}}function qe(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",30),t.EFF(2),t.k0s(),t.j41(3,"div",31),t.EFF(4),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailValue_"+e.type),t.R7$(),t.JRh(e.values),t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailLabel_"+e.type),t.R7$(),t.JRh(e.displayName)}}function Je(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",30),t.EFF(2),t.k0s(),t.j41(3,"div",31),t.EFF(4),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailValue_"+e.type),t.R7$(),t.JRh(e.values),t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailLabel_"+e.type),t.R7$(),t.JRh(e.displayName)}}function We(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",30),t.EFF(2),t.k0s(),t.j41(3,"div",31),t.EFF(4),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailValue_"+e.type),t.R7$(),t.JRh(e.values),t.R7$(),t.BMQ("data-mom-test","Market_ObjectCard_DetailLabel_"+e.type),t.R7$(),t.JRh(e.displayName)}}function Ke(n,r){if(1&n&&(t.qex(0),t.DNE(1,qe,5,4,"div",28)(2,Je,5,4,"div",28)(3,We,5,4,"div",28),t.bVm()),2&n){const e=t.XpG().$implicit;t.XpG(2);const i=t.sdS(21),a=t.XpG();t.R7$(),t.Y8G("ngIf","size.roomsDisplayName"!==e.type&&"size.shortRoomsDisplayName"!==e.type),t.R7$(),t.Y8G("ngIf","size.roomsDisplayName"===e.type&&(a.getDetailsWidth(i)>=345||!a.fieldExists("size.shortRoomsDisplayName"))),t.R7$(),t.Y8G("ngIf","size.shortRoomsDisplayName"===e.type&&(a.getDetailsWidth(i)<345||!a.fieldExists("size.roomsDisplayName")))}}function Ze(n,r){if(1&n&&(t.qex(0),t.DNE(1,Ke,4,3,"ng-container",18),t.bVm()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf",e.values)}}function ti(n,r){if(1&n&&(t.qex(0),t.DNE(1,Ze,2,1,"ng-container",27),t.bVm()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.marketObjektListDataFields)}}function ei(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",32),t.EFF(2),t.k0s(),t.j41(3,"div",33),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(e.marketObject.size.roomsDisplayName),t.R7$(2),t.JRh(t.bMT(5,2,"SIZEAREA"))}}function ii(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",34),t.EFF(2),t.k0s(),t.j41(3,"div",35),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(e.marketObject.size.shortRoomsDisplayName),t.R7$(2),t.JRh(t.bMT(5,2,"SIZEAREA"))}}function ni(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",36),t.EFF(2),t.k0s(),t.j41(3,"div",37),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(e.marketObject.size.area),t.R7$(2),t.JRh(t.bMT(5,2,"KVM"))}}function ai(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",38),t.EFF(2),t.k0s(),t.j41(3,"div",39),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(null==e.marketObject||null==e.marketObject.pricing||null==e.marketObject.pricing.price?null:e.marketObject.pricing.price.toFixed()),t.R7$(2),t.JRh(t.bMT(5,2,"SEKPERMONTH"))}}function si(n,r){if(1&n&&(t.j41(0,"div",29)(1,"div",40),t.EFF(2),t.k0s(),t.j41(3,"div",41),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(e.formatavailableFromDate(null==e.marketObject||null==e.marketObject.availability?null:e.marketObject.availability.availableFrom)),t.R7$(2),t.JRh(t.bMT(5,2,"AVAILABLEFROM"))}}function ri(n,r){if(1&n&&(t.qex(0),t.DNE(1,ei,6,4,"div",28)(2,ii,6,4,"div",28)(3,ni,6,4,"div",28)(4,ai,6,4,"div",28)(5,si,6,4,"div",28),t.bVm()),2&n){t.XpG();const e=t.sdS(21),i=t.XpG();t.R7$(),t.Y8G("ngIf",(null==i.marketObject.size?null:i.marketObject.size.roomsDisplayName)&&i.getDetailsWidth(e)>=345),t.R7$(),t.Y8G("ngIf",(null==i.marketObject.size?null:i.marketObject.size.shortRoomsDisplayName)&&i.getDetailsWidth(e)<345),t.R7$(),t.Y8G("ngIf",null==i.marketObject.size?null:i.marketObject.size.area),t.R7$(),t.Y8G("ngIf",null==i.marketObject||null==i.marketObject.pricing?null:i.marketObject.pricing.price),t.R7$(),t.Y8G("ngIf",null==i.marketObject||null==i.marketObject.availability?null:i.marketObject.availability.availableFrom)}}function oi(n,r){if(1&n&&(t.j41(0,"div",42)(1,"div"),t.nrm(2,"taiga-markdown",43),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(2),t.Y8G("markdown",e.marketObject.description)}}function li(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-card",2),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.marketObjectClick(a.marketObject.id))})("mouseenter",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.addClass(a))})("mouseleave",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.removeClass(a))}),t.j41(1,"mat-card-content")(2,"div",3)(3,"div",4),t.DNE(4,Ye,1,2,"img",5)(5,Xe,4,3,"div",6),t.k0s()(),t.j41(6,"div",7)(7,"div",8)(8,"div",9)(9,"div",10)(10,"button",11),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.marketObjectClick(a.marketObject.id))}),t.j41(11,"h2",12),t.EFF(12),t.k0s()(),t.j41(13,"div",13),t.DNE(14,Be,2,6,"taiga-pill-badge",14)(15,Ue,1,1,"taiga-pill-badge",15),t.k0s()(),t.j41(16,"mat-card-subtitle")(17,"div",16),t.DNE(18,Le,2,1,"span",17)(19,He,2,1,"span",18),t.k0s()()(),t.j41(20,"div",19,0),t.DNE(22,ti,2,1,"ng-container",18)(23,ri,6,5,"ng-container",18),t.k0s(),t.DNE(24,oi,3,1,"div",20),t.k0s()()()()}if(2&n){const e=t.XpG();t.FS9("id",e.marketObject.id),t.R7$(),t.AVh("is-mobile",e.mediaQueryService.isMobile())("is-desktop",!e.mediaQueryService.isMobile()),t.R7$(),t.AVh("image-container-mobile",e.mediaQueryService.isMobile())("image-container",!e.mediaQueryService.isMobile()),t.R7$(2),t.Y8G("ngIf",null==e.marketObject.thumbnail?null:e.marketObject.thumbnail.exists),t.R7$(),t.Y8G("ngIf",!(null!=e.marketObject.thumbnail&&e.marketObject.thumbnail.exists)),t.R7$(),t.AVh("info-container-mobile",e.mediaQueryService.isMobile())("info-container",!e.mediaQueryService.isMobile()),t.R7$(2),t.AVh("header-desktop",!e.mediaQueryService.isMobile()),t.R7$(4),t.JRh(e.marketObject.displayName),t.R7$(2),t.Y8G("ngIf",e.placeSorted),t.R7$(),t.Y8G("ngIf",e.statusDisplayName),t.R7$(3),t.Y8G("ngIf",!e.areaUseGeographicRentalArea),t.R7$(),t.Y8G("ngIf",e.areaUseGeographicRentalArea),t.R7$(),t.AVh("details-item-margin-right",(null==e.marketObjektListDataFields?null:e.marketObjektListDataFields.length)>5),t.R7$(2),t.Y8G("ngIf",(null==e.marketObjektListDataFields?null:e.marketObjektListDataFields.length)>0),t.R7$(),t.Y8G("ngIf",!((null==e.marketObjektListDataFields?null:e.marketObjektListDataFields.length)>0)),t.R7$(),t.Y8G("ngIf",null==e.marketObject?null:e.marketObject.description)}}let Ft=(()=>{class n{set dataFields(e){e&&(this.marketObjektListDataFields=JSON.parse(JSON.stringify(e)))}constructor(e,i,a,s){this.mediaQueryService=e,this.marketService=i,this.cdr=a,this.translate=s,this.marketObjectClicked=new t.bkB}ngOnInit(){if(this.marketObjektListDataFields?.length>0)for(const e of this.marketObjektListDataFields){const i=e.type.split(".");let a;if(a=i[1]?this.marketObject[i[0]]?.[i[1]]:this.marketObject[i[0]],a)switch(e.type){case"pricing.price":case"pricing.priceInclVAT":e.values=a.toFixed();break;case"availability.availableFrom":e.values=this.formatavailableFromDate(a);break;case"application.openFrom":case"publishing.publishedFrom":case"publishing.publishedTo":case"availability.earlyAvailabilityPossibleFrom":e.values=this.formatDate(a);break;case"application.openTo":e.values=this.formatOpenToDate(a);break;case"location.address":e.values=a?.completeAdress;break;case"included":for(const s of a)e.values=e.values?`${e.values} \n ${s.displayName}`:s.displayName;break;case"attributes":e.values=a;break;case"location.area.displayName":e.values=a?.displayName;break;default:e.values="boolean"==typeof a?this.translate.instant(a?"YES":"NO"):a}}this.marketObject?.location?.areaPath?.reverse()?.splice(2)}formatDate(e){return g()(e).format("YYYY-MM-DD")}formatavailableFromDate(e){return g()(e).isAfter(Date.now())?g()(e).format("YYYY-MM-DD"):this.translate.instant("AVAILABLENOW")}formatOpenToDate(e){const i=g()(g()(e).format("HH:mm"),"HH:mm"),a=g()("23:59","HH:mm");return i.isBefore(a)?g()(e).format("YYYY-MM-DD HH:mm"):g()(e).format("YYYY-MM-DD")}
1marketObjectClick(e){this.marketObjectClicked.emit(e)}addClass(e){e.currentTarget.classList.add("mat-elevation-z2")}removeClass(e){e.currentTarget.classList.remove("mat-elevation-z2")}getMarketObjectThumbnail(e,i){return this.marketService.getMarketObjectThumbnail(e,i)}getDetailsWidth(e){return e&&e.offsetWidth!=this.lastDetailsWidth&&(this.lastDetailsWidth=e.offsetWidth,this.cdr.detectChanges(),this.cdr.detach(),setTimeout(()=>{this.cdr.reattach()},100)),this.lastDetailsWidth}fieldExists(e){return this.marketObjektListDataFields.find(i=>i.type===e)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(F),t.rXU(t.gRc),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-object-card"]],inputs:{marketObject:"marketObject",statusDisplayName:"statusDisplayName",areaUseGeographicRentalArea:"areaUseGeographicRentalArea",placeSorted:"placeSorted",dataFields:"dataFields"},outputs:{marketObjectClicked:"marketObjectClicked"},standalone:!1,decls:1,vars:1,consts:[["details",""],["class","object-card",3,"id","click","mouseenter","mouseleave",4,"ngIf"],[1,"object-card",3,"click","mouseenter","mouseleave","id"],[2,"padding","10px"],[1,"image-content"],["class","image","data-mom-test","Market_ObjectCard_Thumbnail",3,"alt","src",4,"ngIf"],["class","no-image",4,"ngIf"],["data-mom-test","MinaSidor_LedigaObjekt_Annons"],[1,"info-content"],[1,"header"],[1,"address"],["mat-button","","data-mom-test","Market_ObjectCard_OpenButton",1,"market-object-button",3,"click"],["data-mom-test","MinaSidor_MittS\xf6kande_AnnonsRubrik",1,"mat-h2"],[1,"pill-badge-container"],["class","badge-info-2 pill-badge","data-mom-test","Market_ObjectCard_QueuePlace",3,"text",4,"ngIf"],["class","badge-info pill-badge","data-mom-test","MinaSidor_MittS\xf6kande_AnnonsStatus",3,"text",4,"ngIf"],[1,"location"],["data-mom-test","Market_ObjectCard_LocationArea",4,"ngIf"],[4,"ngIf"],[1,"details"],["class","text truncate",4,"ngIf"],["data-mom-test","Market_ObjectCard_Thumbnail",1,"image",3,"alt","src"],[1,"no-image"],["color","primary","data-mom-test","Market_ObjectCard_NoImageIcon"],["data-mom-test","Market_ObjectCard_QueuePlace",1,"badge-info-2","pill-badge",3,"text"],["data-mom-test","MinaSidor_MittS\xf6kande_AnnonsStatus",1,"badge-info","pill-badge",3,"text"],["data-mom-test","Market_ObjectCard_LocationArea"],[4,"ngFor","ngForOf"],["class","details-item",4,"ngIf"],[1,"details-item"],[1,"details-item-value"],[1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_RoomsDisplayName",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_RoomsDisplayName",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_ShortRoomsDisplayName",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_ShortRoomsDisplayName",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_Area",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_Area",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_Price",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_Price",1,"details-item-label"],["data-mom-test","Market_ObjectCard_DetailValue_AvailableFrom",1,"details-item-value"],["data-mom-test","Market_ObjectCard_DetailLabel_AvailableFrom",1,"details-item-label"],[1,"text","truncate"],["data-mom-test","Market_ObjectCard_Description",3,"markdown"]],template:function(i,a){1&i&&t.DNE(0,li,25,27,"mat-card",1),2&i&&t.Y8G("ngIf",a.marketObject)},dependencies:[u.Sq,u.bT,we.Y,G.An,x.$z,k.RN,k.m2,k.Lc,D.N,b.D9],styles:["mat-card-content[_ngcontent-%COMP%]{display:flex}.is-mobile[_ngcontent-%COMP%]{flex-direction:column}.is-desktop[_ngcontent-%COMP%]{flex-direction:row}.image-container[_ngcontent-%COMP%]{width:37%}.info-container[_ngcontent-%COMP%]{width:63%}.image[_ngcontent-%COMP%]{width:100%;height:208px;object-fit:cover;display:flex;border-radius:2px}.object-card[_ngcontent-%COMP%]{cursor:pointer}mat-card[_ngcontent-%COMP%]{padding:0;overflow:hidden}.info-content[_ngcontent-%COMP%]{margin:5px 15px 10px}.mat-h2[_ngcontent-%COMP%]{margin-bottom:0}.address[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap-reverse}.details[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;text-align:center;flex-wrap:wrap}.details-item-value[_ngcontent-%COMP%]{font-size:1.125rem}.details-item-label[_ngcontent-%COMP%]{font-size:.75rem}.truncate[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.icon[_ngcontent-%COMP%]{display:flex;justify-content:center}.broken-image-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:120px;min-height:120px;font-size:6.25rem;border:solid;border-radius:50%;margin-bottom:8px}.divider[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:15px}.application-open-to-container[_ngcontent-%COMP%]{margin-bottom:5px}.market-object-button[_ngcontent-%COMP%]{padding:0}.pill-badge-container[_ngcontent-%COMP%]{align-self:center;margin-left:auto}.pill-badge[_ngcontent-%COMP%]{margin-left:8px}.no-border-bottom-radius[_nghost-%COMP%]   mat-card[_ngcontent-%COMP%], .no-border-bottom-radius   [_nghost-%COMP%]   mat-card[_ngcontent-%COMP%]{border-bottom-left-radius:0;border-bottom-right-radius:0}.no-border-top-radius[_nghost-%COMP%]   mat-card[_ngcontent-%COMP%], .no-border-top-radius   [_nghost-%COMP%]   mat-card[_ngcontent-%COMP%]{border-top-left-radius:0;border-top-right-radius:0}.location[_ngcontent-%COMP%]{margin-bottom:16px}.no-image[_ngcontent-%COMP%]{height:208px;display:flex;justify-content:center;align-items:center;background-color:rgb(var(--palette-background-background));border-radius:2px}.no-image[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:2.5rem;width:40px;height:40px}.details-item[_ngcontent-%COMP%]{margin-bottom:15px}.details-item-margin-right[_ngcontent-%COMP%]   .details-item[_ngcontent-%COMP%]{margin-right:20px}.details-item-label[_ngcontent-%COMP%]{margin-top:-4px}"]})}}return n})();const ci=()=>[1,5,10,25,100];function mi(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",3)(1,"taiga-market-object-card",4),t.bIt("marketObjectClicked",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.goToMarketObject(a))}),t.k0s()()}if(2&n){const e=r.$implicit,i=t.XpG();t.R7$(),t.Y8G("areaUseGeographicRentalArea",i.areaUseGeographicRentalArea)("marketObject",e)("dataFields",i.marketObjektListDataFields)}}let di=(()=>{class n{set data(e){this.marketObjects=e,this.slicedMarketObjects=this.marketObjects?.items,this.marketObjectsCount=this.marketObjects?.count}constructor(e,i,a,s,o,l){this.mediaQueryService=e,this.marketService=i,this.translate=a,this.route=s,this.router=o,this.clientConfigurationService=l,this.clientConfigurationService.getClientConfigurationFeatures().subscribe(c=>{this.areaUseGeographicRentalArea=c?.areaUseGeographicRentalArea?.enabled})}ngAfterViewInit(){document.getElementById("paginator").getElementsByTagName("mat-select")[0]?.setAttribute("aria-label",this.translate.instant("SELECTNUMBEROFMARKETOBJECTSPERPAGE"))}ngOnInit(){this.paginator._intl.itemsPerPageLabel=null,this.paginator._intl.nextPageLabel=this.translate.instant("NEXTPAGE"),this.paginator._intl.previousPageLabel=this.translate.instant("PREVIOUSPAGE"),this.paginator._intl.getRangeLabel=(e,i,a)=>
1{if(0===a||0===i)return`0 ${this.translate.instant("OF")} ${a}`;const s=e*i;return`${s+1} \u2013 ${s<(a=Math.max(a,0))?Math.min(s+i,a):s+i} ${this.translate.instant("OF")} ${a}`},window.scrollTo(0,this.marketService.getPageYOffset())}addClass(e){e.currentTarget.classList.add("mat-elevation-z10")}removeClass(e){e.currentTarget.classList.remove("mat-elevation-z10")}onPageChange(e){let a=e.pageIndex*e.pageSize+e.pageSize;a>this.marketObjects.items.length&&(a=this.marketObjects.items.length),window.scroll(0,0),this.pageSize=e.pageSize,this.page=e.pageIndex+1,this.router.navigate([],{relativeTo:this.route,queryParams:{pageSize:this.pageSize,page:this.page},queryParamsHandling:"merge"})}formatDate(e){return g()(e).format("YYYY-MM-DD")}goToMarketObject(e){const i=`/market/${this.marketObjectsTypeId}/${e}`;this.marketService.setPageYOffset(window.pageYOffset),this.router.navigateByUrl(i)}getMarketObjectThumbnail(e,i){return this.marketService.getMarketObjectThumbnail(e,i)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(F),t.rXU(b.c$),t.rXU(j.nX),t.rXU(j.Ix),t.rXU(q.t))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-objects-list"]],viewQuery:function(i,a){if(1&i&&t.GBs(bt.iy,7),2&i){let s;t.mGM(s=t.lsd())&&(a.paginator=s.first)}},inputs:{data:"data",pageSize:"pageSize",page:"page",marketObjectsTypeId:"marketObjectsTypeId",marketObjektListDataFields:"marketObjektListDataFields"},standalone:!1,decls:3,vars:6,consts:[[1,"divider"],["class","object-card",4,"ngFor","ngForOf"],["id","paginator","data-mom-test","MinaSidor_LedigaObjekt_Sidpaginering",3,"page","length","pageIndex","pageSize","pageSizeOptions"],[1,"object-card"],[3,"marketObjectClicked","areaUseGeographicRentalArea","marketObject","dataFields"]],template:function(i,a){1&i&&(t.nrm(0,"mat-divider",0),t.DNE(1,mi,2,3,"div",1),t.j41(2,"mat-paginator",2),t.bIt("page",function(o){return a.onPageChange(o)}),t.k0s()),2&i&&(t.R7$(),t.Y8G("ngForOf",a.slicedMarketObjects),t.R7$(),t.Y8G("length",a.marketObjectsCount)("pageIndex",a.page-1)("pageSize",a.pageSize)("pageSizeOptions",t.lJ4(5,ci)))},dependencies:[u.Sq,B.q,bt.iy,Ft],styles:[".divider[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:15px}.object-card[_ngcontent-%COMP%]{margin-bottom:15px}"]})}}return n})();const pi=n=>({maxNumberOfApplications:n});function ui(n,r){if(1&n&&(t.j41(0,"div")(1,"div",15),t.nrm(2,"taiga-medium-header",16),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.Y8G("text",e.title)}}function _i(n,r){if(1&n&&(t.j41(0,"div",15),t.nrm(1,"taiga-medium-header",17),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("text",e.title)}}function hi(n,r){if(1&n&&(t.j41(0,"div",18),t.nrm(1,"taiga-markdown",19),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("markdown",e.description)}}function gi(n,r){if(1&n&&(t.j41(0,"div",23),t.EFF(1),t.nI1(2,"translate"),t.nI1(3,"lowercase"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" ",e.marketObjectsCount," ",t.bMT(3,4,t.bMT(2,2,"MARKETOBJECT"))," ")}}function fi(n,r){if(1&n&&(t.j41(0,"div",24),t.EFF(1),t.nI1(2,"translate"),t.nI1(3,"lowercase"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" ",e.marketObjectsCount," ",t.bMT(3,4,t.bMT(2,2,"MARKETOBJECTS"))," ")}}function bi(n,r){if(1&n&&(t.qex(0,20),t.DNE(1,gi,4,6,"div",21)(2,fi,4,6,"div",22),t.bVm()),2&n){const e=t.XpG();t.Y8G("ngSwitch",e.marketObjectsCount),t.R7$(),t.Y8G("ngSwitchCase",1)}}function ki(n,r){if(1&n&&(t.j41(0,"div",25),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,"MAXNUMBEROFAPPLICATIONS",t.eq3(4,pi,e.maxNumberOfApplications))," ")}}function Mi(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-option",26),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.changeOrder(a.selectedOrder))}),t.EFF(1),t.k0s()}if(2&n){const e=r.$implicit;t.Y8G("value",e.value),t.BMQ("data-mom-test","Market_SortOption_"+e.value),t.R7$(),t.SpI(" ",e.displayName," ")}}function vi(n,r){if(1&n&&t.nrm(0,"taiga-market-objects-list",27),2&n){const e=t.XpG();t.Y8G("data",e.marketObjects)("pageSize",e.pageSize)("page",e.page)("marketObjectsTypeId",e.marketObjectsTypeId)("marketObjektListDataFields",e.marketObjektListDataFields)}}let Ri=(()=>{class n{constructor(e,i,a,s,o,l,c,h,_){this.mediaQueryService=e,this.rightSheet=i,this.route=a,this.router=s,this.marketService=o,this.changeDetectorRef=l,this.translate=c,this.clientConfigurationService=h,this.titleService=_,this.prevScrollpos=window.pageYOffset,this.pageSize=25,this.orders=[{displayName:this.translate.instant("PUBLISHFROM"),value:"publishFrom"},{displayName:this.translate.instant("PRICE"),value:"price"},{displayName:this.translate.instant("AVAILABLEFROM"),value:"availableFrom"},{displayName:this.translate.instant("SIZESQM"),value:"sizeArea"},{displayName:this.translate.instant("LOCATIONADDRESS"),value:"locationAddress"}]}ngOnInit(){(0,X.p)([this.clientConfigurationService.getClientConfigurationMarket(),this.clientConfigurationService.getClientConfigurationFeatures(),this.clientConfigurationService.getClientConfigurationApp()]).pipe((0,I.H)(e=>(this.clientConfigurationMarket=e[0],this.areaUseGeographicRentalArea=e[1]?.areaUseGeographicRentalArea?.enabled,this.appName=e[2]?.name,(0,De.z)([this.route.params,this.route.queryParams])))).subscribe(([e,i])=>{if(this.marketObjectsTypeId!==e.objectType||0!==Object.keys(i)?.length){this.marketObjectsTypeId=e.objectType,this.title=this.clientConfigurationMarket?.types?.find(l=>
1l.id===this.marketObjectsTypeId)?.displayName,this.titleService.setTitle(`${this.title} - ${this.appName}`),this.description=this.clientConfigurationMarket?.types?.find(l=>l.id===this.marketObjectsTypeId)?.description,this.clientConfigurationService.getMaxNumberOfApplications(this.marketObjectsTypeId).subscribe(l=>{this.maxNumberOfApplications=l}),this.filtersCount=0;const a=this.marketService.getMarketObjectsFilterSettings(this.marketObjectsTypeId);null!=i.sizeRoomsMin||null!=i.sizeRoomsMax||null!=a.sizeRoomsMin||null!=a.sizeRoomsMax?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.locationAreaMin||null!=i.locationAreaMax||null!=a.locationAreaMin||null!=a.locationAreaMax?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.priceMin||null!=i.priceMax||null!=a.priceMin||null!=a.priceMax?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.areas||a.areas?.length>0?this.filtersCount+=1:this.filtersCount=this.filtersCount,null!=i.includes||a.includes?.length>0?this.filtersCount+=1:this.filtersCount=this.filtersCount,i.attributes?this.filtersCount+=Object.keys(JSON.parse(i.attributes))?.length:a.attributes&&(this.filtersCount+=Object.keys(JSON.parse(a.attributes))?.length),this.sizeRoomsMin=i.sizeRoomsMin?this.route.snapshot.queryParams.sizeRoomsMin:a.sizeRoomsMin,this.sizeRoomsMax=i.sizeRoomsMax?this.route.snapshot.queryParams.sizeRoomsMax:a.sizeRoomsMax,this.locationAreaMin=i.locationAreaMin?this.route.snapshot.queryParams.locationAreaMin:a.locationAreaMin,this.locationAreaMax=i.locationAreaMax?this.route.snapshot.queryParams.locationAreaMax:a.locationAreaMax,this.priceMin=i.priceMin?this.route.snapshot.queryParams.priceMin:a.priceMin,this.priceMax=i.priceMax?this.route.snapshot.queryParams.priceMax:a.priceMax,this.pageSize=i.pageSize??this.pageSize,this.page=this.route.snapshot.queryParams.page??1;const s=this.pageSize*this.page-this.pageSize;this.areas=this.route.snapshot.queryParams.areas?this.route.snapshot.queryParams.areas.split(","):a.areas,this.includes=this.route.snapshot.queryParams.includes?this.route.snapshot.queryParams.includes.split(","):a.includes;let o=this.route.snapshot.queryParams.attributes??a.attributes;this.attributesString=[],o&&(this.attributesString=[],o=JSON.parse(o),Object.keys(o).forEach(l=>{console.log(l),this.attributesString.push(l+";"+o[l].values)})),this.selectedOrder=i.order,this.orderReverse="true"===i.orderReverse,this.sortAriaLabel=this.translate.instant(this.orderReverse?"SORTDESCENDING":"SORTASCENDING"),(0,X.p)([this.marketService.getMarketObjects(this.marketObjectsTypeId,this.sizeRoomsMin,this.sizeRoomsMax,this.locationAreaMin,this.locationAreaMax,this.priceMin,this.priceMax,this.pageSize,0===s?null:s,this.selectedOrder,this.orderReverse,this.areaUseGeographicRentalArea?this.areas:null,this.includes,this.areaUseGeographicRentalArea?null:this.areas,this.attributesString),this.marketService.getMarketObjectsTypesItem(this.marketObjectsTypeId)]).subscribe(l=>{this.marketObjektListDataFields=l[1]?.marketObjektListDataFields,this.marketObjektListDataFields=this.marketObjektListDataFields?.filter(c=>{if("thumbnail"!==c.type&&"info"!==c.type&&"withdrawal.description"!==c.type&&"location.areaPath"!==c.type&&"files"!==c.type&&"description"!==c.type&&"displayName"!==c.type&&"location.area.displayName"!==c.type&&"queueType"!==c.type&&"sortOrder"!==c.type)return!0}),this.marketObjects=l[0],this.marketObjectsCount=this.marketObjects.count,this.changeDetectorRef.detectChanges(),window.scrollTo(0,this.marketService.getPageYOffset()),this.marketService.setPageYOffset(null)})}sessionStorage.getItem("SUBSCRIPTION_TO_SAVE")&&JSON.parse(sessionStorage.getItem("SUBSCRIPTION_TO_SAVE"))?.marketObjectType===this.marketObjectsTypeId&&this.openFilter(!0)}),window.onscroll=this.showHideFilterButton,this.marketService.getPageYOffset()||(document.getElementById("filter-button-container").style.top="56px")}showHideFilterButton(){const e=window.pageYOffset;document.getElementById("filter-button-container").style.top=e<168||this.prevScrollpos>e?"56px":"0",this.prevScrollpos=e}ngOnDestroy(){window.onscroll=null}openFilter(e){this.rightSheet.open(Ge,{panelClass:"custom-rightsheet",scrollStrategy:new y.N,data:{marketObjectsTypeId:this.marketObjectsTypeId,saveSubscriptionFromSessionStorage:e},ariaLabel:this.translate.instant("SEARCHFILTER"),autoFocus:!1})}changeOrder(e){this.selectedOrder=e,this.setQueryParams({order:e})}toggleOrderReverse(){this.orderReverse=!this.orderReverse,this.setQueryParams({orderReverse:this.orderReverse}),this.sortAriaLabel=this.translate.instant(this.orderReverse?"SORTDESCENDING":"SORTASCENDING")}setQueryParams(e){this.router.navigate([],{relativeTo:this.route,queryParams:e,queryParamsHandling:"merge"}),this.marketService.setPageYOffset(null)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(tt.c9),t.rXU(j.nX),t.rXU(j.Ix),t.rXU(F),t.rXU(t.gRc),t.rXU(b.c$),t.rXU(q.t),t.rXU(ft.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market"]],standalone:!1,decls:28,vars:39,consts:[["id","filter-button-container",1,"filter-button-container",2,"top","0"],[4,"ngIf"],["mat-raised-button","","color","primary","matBadgeColor","warn","data-mom-test","Market_FilterButton",1,"filter-button",3,"click","matBadge","matBadgeHidden"],["class","large-header header-text",4,"ngIf"],[2,"margin-top","11px","margin-bottom","11px","margin-right","8px"],["class","description","data-mom-test","Market_Description",4,"ngIf"],[3,"ngSwitch",4,"ngIf"],["data-mom-test","Market_MaxApplicationsText",4,"ngIf"],[1,"sort-card"],["data-mom-test","Market_SortLabel"],["data-mom-test","Market_SortSelect",3,"ngModelChange","ngModel","aria-label"],[3,"value","click",4,"ngFor","ngForOf"],["mat-icon-button","",1,"icon-button",3,"click"],["color","primary","data-mom-test","Market_SortReverseIcon",1,"icon-display"],["data-mom-test","Market_ObjectsList",3,"data","pageSize","page","marketObjectsTypeId","marketObjektListDataFields",4,"ngIf"],[1,"large-header","header-text"],["data-mom-test","Market_Title_Desktop",3,"text"],["data-mom-test","Market_Title_Mobile",3,"text"],["data-mom-test","Market_Description",1,"description"],["data-mom-test","Market_DescriptionMarkdown",3,"markdown"],[3,"ngSwitch"],["data-mom-test","Market_ObjectsCount_Singular",4,"ngSwitchCase"],["data-mom-test","Market_ObjectsCount_Plural",4,"ngSwitchDefault"],["data-mom-test","Market_ObjectsCount_Singular"],["data-mom-test","Market_ObjectsCount_Plural"],["data-mom-test","Market_MaxApplicationsText"],[3,"click","value"],["data-mom-test","Market_ObjectsList",3,"data","pageSize","page","marketObjectsTypeId","marketObjektListDataFields"]],template:function(i,a){1&i&&(t.j41(0,"div",0),t.DNE(1,ui,3,1,"div",1),t.j41(2,"button",2),t.nI1(3,"translate"),t.bIt("click",function(){return a.openFilter(!1)}),t.EFF(4),t.nI1(5,"translate"),t.j41(6,"mat-icon"),t.EFF(7,"filter_alt"),t.k0s()()(),t.j41(8,"div"),t.DNE(9,_i,2,1,"div",3),t.j41(10,"div")(11,"div",4),t.DNE(12,hi,2,1,"div",5)(13,bi,3,2,"ng-container",6)(14,ki,3,6,"div",7),t.k0s(),t.j41(15,"mat-card",8)(16,"div")(17,"mat-form-field")(18,"mat-label",9),t.EFF(19),t.nI1(20,"translate"),t.k0s(),t.j41(21,"mat-select",10),t.nI1(22,"translate"),t.mxI("ngModelChange",function(o){return t.DH7(a.selectedOrder,o)||(a.selectedOrder=o),o}),t.DNE(23,Mi,2,3,"mat-option",11),t.k0s()(),t.j41(24,"button",12),t.bIt("click",function(){return a.toggleOrderReverse()}),t.j41(25,"mat-icon",13),t.EFF(26,"sort"),t.k0s()()()()(),t.DNE(27,vi,1,5,"taiga-market-objects-list",14),t.k0s()),2&i&&(t.AVh("filter-button-container-mobile",a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("ngIf",!a.mediaQueryService.isMobile()),t.R7$(),t.AVh("filter-button-mobile",a.mediaQueryService.isMobile())("filter-button-desktop",!a.mediaQueryService.isMobile()),t.Y8G("matBadge",a.filtersCount)("matBadgeHidden",0===a.filtersCount),t.BMQ("aria-label",t.bMT(3,31,"OPENSEARCHFILTER")),t.R7$(2),t.SpI(" ",t.bMT(5,33,"SEARCHFILTER")," "),t.R7$(4),t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("ngIf",a.mediaQueryService.isMobile()),t.R7$(),t.AVh("flex-container",!a.mediaQueryService.isMobile()),t.R7$(2),t.Y8G("ngIf",a.description),t.R7$(),t.Y8G("ngIf",a.marketObjectsCount>=0),t.R7$(),t.Y8G("ngIf",a.maxNumberOfApplications&&a.maxNumberOfApplications>0),t.R7$(3),t.AVh("width-80",a.mediaQueryService.isMobile()),t.R7$(2),t.JRh(t.bMT(20,35,"SORT")),t.R7$(2),t.R50("ngModel",a.selectedOrder),t.Y8G("aria-label",t.bMT(22,37,"SELECTSORT")),t.R7$(2),t.Y8G("ngForOf",a.orders),t.R7$(),t.BMQ("aria-label",a.sortAriaLabel),t.R7$(),t.AVh("rotate",a.orderReverse),t.R7$(2),t.Y8G("ngIf",a.marketObjects))},dependencies:[u.Sq,u.bT,u.ux,u.e1,u.fG,G.An,x.$z,it.M,k.RN,S.j,S.M,mt.g,dt.M,Pe.k,p.BC,p.vS,W.o,D.N,di,u.GH,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding-right:30px;padding-bottom:30px;padding-left:30px}.is-mobile[_ngcontent-%COMP%]{padding:56px 20px 20px}.filter-button-container[_ngcontent-%COMP%]{display:flex;box-sizing:border-box;padding:0 30px;flex-direction:row;align-items:center;white-space:nowrap;margin-top:22px;width:100%;z-index:10;top:56px;transition:top .3s;justify-content:space-between}.filter-button-mobile[_ngcontent-%COMP%]{width:100%}.filter-button-container-mobile[_ngcontent-%COMP%]{padding:0 20px;height:56px;position:fixed;margin-top:calc(0px + env(safe-area-inset-top))}.large-header[_ngcontent-%COMP%]{margin:8px 0 10px}.filter-button-container-mobile[_ngcontent-%COMP%]   .large-header[_ngcontent-%COMP%]{display:none}.flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.icon-display[_ngcontent-%COMP%]{transform:scale(1.5)}.width-80[_ngcontent-%COMP%]{width:80%}.rotate[_ngcontent-%COMP%]{transform:scale(1.5) rotateX(180deg)}.icon-button[_ngcontent-%COMP%]{margin-left:20px}.sort-card[_ngcontent-%COMP%]{padding-top:5px;padding-bottom:0;min-width:280px}.filter-button-desktop[_ngcontent-%COMP%]{width:280px}.description[_ngcontent-%COMP%]{margin-bottom:10px}.filter-button-container[_ngcontent-%COMP%]{background:rgb(var(--palette-background-background))}"]})}}return n})();var Ii=m(450);const Ci=n=>({ids:n});function Si(n,r){if(1&n&&(t.j41(0,"mat-slide-toggle",12),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG().$implicit;t.Y8G("formControlName",e.id),t.R7$(),t.JRh(t.bMT(2,2,"IAGREE"))}}function xi(n,r){if(1&n&&(t.j41(0,"div")(1,"h2",9),t.EFF(2),t.k0s(),t.nrm(3,"p",10),t.DNE(4,Si,3,4,"mat-slide-toggle",11),t.k0s()),2&n){const e=r.$implicit;t.R7$(2),t.JRh(e.displayName),t.R7$(),t.Y8G("innerText",e.shortText),t.R7$(),t.Y8G("ngIf",e.needAcceptance)}}let Oi=(()=>{class n{constructor(e,i,a){this.marketConsents=e,this.formBuilder=i,this.dialogRef=a,this.consentsLink=`${N.i.READCONSENTS}`}
1ngOnInit(){this.consentIds=this.marketConsents.items.map(e=>e.id).toString(),this.consentFormGroup=this.formBuilder.group({});for(const e of this.marketConsents?.items)e.needAcceptance&&this.consentFormGroup.addControl(e.id,new p.hs(null,p.k0.requiredTrue))}accept(){this.dialogRef.close("accept")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(R.e),t.rXU(p.ze),t.rXU(R.m))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-consent-dialog"]],standalone:!1,decls:16,vars:16,consts:[[1,"mat-h1"],[1,"mat-typography"],[3,"formGroup"],[4,"ngFor","ngForOf"],[1,"link-container"],["target","_blank",1,"link",3,"routerLink","queryParams"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",1,"action-button",3,"click","disabled"],[1,"mat-h2","mat-body-strong"],[3,"innerText"],["class","slide","required","",3,"formControlName",4,"ngIf"],["required","",1,"slide",3,"formControlName"]],template:function(i,a){1&i&&(t.j41(0,"h1",0),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"mat-dialog-content",1)(4,"form",2),t.DNE(5,xi,5,3,"div",3),t.k0s(),t.j41(6,"div",4)(7,"a",5),t.EFF(8),t.nI1(9,"translate"),t.k0s()()(),t.j41(10,"mat-dialog-actions",6)(11,"button",7),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.j41(14,"button",8),t.bIt("click",function(){return a.accept()}),t.EFF(15,"Intresseanm\xe4l"),t.k0s()()),2&i&&(t.R7$(),t.JRh(t.bMT(2,8,"CONSENTS")),t.R7$(3),t.Y8G("formGroup",a.consentFormGroup),t.R7$(),t.Y8G("ngForOf",null==a.marketConsents?null:a.marketConsents.items),t.R7$(2),t.FS9("routerLink",a.consentsLink),t.Y8G("queryParams",t.eq3(14,Ci,a.consentIds)),t.R7$(),t.JRh(t.bMT(9,10,"READMORE")),t.R7$(4),t.JRh(t.bMT(13,12,"CANCEL")),t.R7$(2),t.Y8G("disabled",!a.consentFormGroup.valid))},dependencies:[u.Sq,u.bT,Y.Wk,x.$z,Ii.sG,R.a,R.M,R.c,p.qT,p.BC,p.cb,p.YS,p.j4,p.JD,b.D9],styles:[".slide[_ngcontent-%COMP%]{margin-bottom:20px}.link-container[_ngcontent-%COMP%]{margin-top:10px}"]})}}return n})();var ji=m(1584),Ti=m(8810),Fi=m(6977),U=m(9437),kt=m(3527),yi=m(1580),Ei=m(5626),Ai=m(7655),yt=m(3999);function $i(n,r){if(1&n&&(t.qex(0),t.j41(1,"div")(2,"a",33)(3,"mat-icon"),t.EFF(4,"picture_as_pdf"),t.k0s(),t.EFF(5),t.k0s()(),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.Y8G("href",e.address,t.B4B),t.BMQ("data-mom-test","MarketObject_DocumentLink_"+e.displayName),t.R7$(3),t.SpI(" ",e.displayName," ")}}function Ni(n,r){if(1&n&&(t.qex(0),t.j41(1,"div")(2,"a",33)(3,"mat-icon"),t.EFF(4,"attachment"),t.k0s(),t.EFF(5),t.k0s()(),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.Y8G("href",e.address,t.B4B),t.BMQ("data-mom-test","MarketObject_DocumentLink_"+e.displayName),t.R7$(3),t.SpI(" ",e.displayName," ")}}function Gi(n,r){if(1&n&&(t.j41(0,"div",29),t.qex(1,30),t.DNE(2,$i,6,3,"ng-container",31)(3,Ni,6,3,"ng-container",32),t.bVm(),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngSwitch",!0),t.R7$(),t.Y8G("ngSwitchCase","application/pdf"===e.mimeType)}}function Di(n,r){if(1&n&&(t.j41(0,"div",27),t.DNE(1,Gi,4,2,"div",28),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.documents)}}function Pi(n,r){if(1&n&&(t.j41(0,"div",34)(1,"a",35),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("href",e.getGoogleMapsUrl(e.marketObject.location.address.completeAdress),t.B4B),t.R7$(),t.JRh(t.bMT(3,2,"SHOWONMAP"))}}function wi(n,r){if(1&n&&(t.j41(0,"span",36),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(null==e.marketObject.location||null==e.marketObject.location.area?null:e.marketObject.location.area.displayName)}}function Vi(n,r){1&n&&(t.qex(0),t.EFF(1,", "),t.bVm())}function Yi(n,r){if(1&n&&(t.qex(0),t.EFF(1),t.DNE(2,Vi,2,0,"ng-container",1),t.bVm()),2&n){const e=r.$implicit,i=r.index,a=t.XpG(3);t.R7$(),t.SpI(" ",e.displayName,""),t.R7$(),t.Y8G("ngIf",(null==a.marketObject.location?null:a.marketObject.location.areaPath.length)>1&&i!==(null==a.marketObject.location?null:a.marketObject.location.areaPath.length)-1)}}function Xi(n,r){if(1&n&&(t.j41(0,"span",36),t.DNE(1,Yi,3,2,"ng-container",21),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",null==e.marketObject.location?null:e.marketObject.location.areaPath)}}function Bi(n,r){if(1&n&&(t.j41(0,"span",37),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme("",null==e.marketObject.size?null:e.marketObject.size.area," ",t.bMT(2,2,"KVM"),"")}}function Ui(n,r){1&n&&(t.j41(0,"span"),t.EFF(1,", "),t.k0s())}function Li(n,r){if(1&n&&(t.j41(0,"div",38),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(" ",e.marketObject.pricing.price.toFixed()," ",t.bMT(2,2,"SEKPERMONTH")," ")}}function zi(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",39),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.createInterest(a.marketObject.id))}),t.EFF(1),t.k0s()}if(2&n){const e=t.XpG(2);t.AVh("full-width",e.mediaQueryService.isMobile()),t.Y8G("disabled",!e.enableInterest),t.R7$(),t.SpI("",null==e.marketObjectStatus||null==e.marketObjectStatus.commands[0]?null:e.marketObjectStatus.commands[0].displayName," ")}}function Qi(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",40),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.goToQueueRegistration(a.marketObject.queueType))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const e=t.XpG(2);t.AVh("full-width",e.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",t.bMT(2,3,"QUEUEREGISTRATION")," ")}}function Hi(n,r){1&n&&(t.j41(0,"mat-icon",45),t.EFF(1,"info"),t.k0s())}function qi(n,r){if(1&n&&(t.j41(0,"div",41)(1,"div",42),t.DNE(2,Hi,2,0,"mat-icon",43),t.k0s(),t.nrm(3,"taiga-markdown",44),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.Y8G("ngIf",null==e?null:e.message),t.R7$(),t.Y8G("markdown",null==e?null:e.message)}}function Ji(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,qi,4,2,"div",22),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf",!(null!=e&&e.passed)&&"consent"!==e.type&&"queue"!==e.type)}}function Wi(n,r){if(1&n&&(t.j41(0,"div",41)(1,"div",42)(2,"mat-icon",45),t.EFF(3,"info"),t.k0s()(),t.j41(4,"span",46),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(5),t.JRh(null==e.marketObject.withdrawal?null:e.marketObject.withdrawal.description)}}function Ki(n,r){if(1&n&&(t.j41(0,"div",49),t.nrm(1,"taiga-markdown",44),t.k0s()),2&n){const e=r.$implicit;t.BMQ("data-mom-test","MarketObject_ImportantText_"+r.index),t.R7$(),t.Y8G("markdown",e.value)}}function Zi(n,r){if(1&n&&(t.j41(0,"div",47),t.nrm(1,"mat-divider"),t.DNE(2,Ki,2,2,"div",48),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.Y8G("ngForOf",null==e.marketObject.info?null:e.marketObject.info.important)}}function tn(n,r){if(1&n&&(t.j41(0,"div")(1,"h2",50),t.EFF(2),t.k0s(),t.nrm(3,"taiga-markdown",44),t.k0s()),2&n){const e=r.$implicit;t.BMQ("data-mom-test","MarketObject_InfoSection_"+e.displayName),t.R7$(2),t.JRh(e.displayName),t.R7$(),t.Y8G("markdown",e.value)}}function en(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.k0s(),t.j41(3,"div",54),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit;t.BMQ("data-mom-test","MarketObject_Field_"+e.displayName),t.R7$(2),t.JRh(e.displayName),t.R7$(2),t.JRh(e.values)}}function nn(n,r){if(1&n&&(t.j41(0,"mat-icon",59),t.qSk(),t.j41(1,"svg",60),t.nrm(2,"path"),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.BMQ("d",e.typeIcon.svg)}}function an(n,r){if(1&n&&(t.qex(0),t.EFF(1),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(": ",e.value,"")}}function sn(n,r){if(1&n&&(t.j41(0,"div",56)(1,"div",57),t.DNE(2,nn,3,1,"mat-icon",58),t.k0s(),t.j41(3,"div"),t.EFF(4),t.DNE(5,an,2,1,"ng-container",1),t.k0s()()),2&n){const e=r.$implicit;t.BMQ("data-mom-test","MarketObject_Attribute_"+e.typeDisplayName),t.R7$(2),t.Y8G("ngIf",e.typeIcon),t.R7$(2),t.SpI(" ",e.typeDisplayName,""),t.R7$(),t.Y8G("ngIf",e.value)}}function rn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.k0s(),t.j41(3,"div",54),t.DNE(4,sn,6,4,"div",55),t.k0s()()),2&n){const e=t.XpG().$implicit;t.BMQ("data-mom-test","MarketObject_AttributesField_"+e.displayName),t.R7$(2),t.JRh(e.displayName),t.R7$(2),t.Y8G("ngForOf",e.values)}}function on(n,r){if(1&n&&(t.qex(0),t.DNE(1,en,5,3,"div",51)(2,rn,5,3,"div",51),t.bVm()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf","attributes"!==e.type&&e.values),t.R7$(),t.Y8G("ngIf","attributes"===e.type&&(null==e.values?null:e.values.length)>0)}}function ln(n,r){if(1&n&&(t.qex(0),t.DNE(1,on,3,2,"ng-container",21),t.bVm()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.singleMarketObjektDataFields)}}function cn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",61),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"APPLICATIONOPENTO")),t.R7$(3),t.JRh(e.formatOpenToDate(null==e.marketObject.application?null:e.marketObject.application.openTo))}}function mn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",62),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"AVAILABLEFROM")),t.R7$(3),t.JRh(e.formatavailableFromDate(null==e.marketObject.availability?null:e.marketObject.availability.availableFrom))}}function dn(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(4);t.R7$(),t.Lme("",null==e.marketObject.size?null:e.marketObject.size.area," ",t.bMT(2,2,"KVM"),"")}}function pn(n,r){1&n&&(t.j41(0,"span"),t.EFF(1,", "),t.k0s())}function un(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",63),t.DNE(5,dn,3,4,"span",1)(6,pn,2,0,"span",1),t.j41(7,"span"),t.EFF(8),t.k0s()()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,4,"SIZEAREA")),t.R7$(3),t.Y8G("ngIf",null==e.marketObject.size?null:e.marketObject.size.area),t.R7$(),t.Y8G("ngIf",(null==e.marketObject.size?null:e.marketObject.size.area)&&(null==e.marketObject.size?null:e.marketObject.size.roomsDisplayName)),t.R7$(2),t.JRh(null==e.marketObject.size?null:e.marketObject.size.roomsDisplayName)}}function _n(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",64),t.EFF(5),t.nI1(6,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,3,"RENT")),t.R7$(3),t.Lme("",null==e.marketObject.pricing?null:e.marketObject.pricing.price.toFixed()," ",t.bMT(6,5,"SEKPERMONTH"),"")}}function hn(n,r){if(1&n&&(t.j41(0,"mat-icon",67),t.EFF(1," help "),t.k0s()),2&n){const e=t.XpG(4);t.Y8G("matTooltip",e.marketObject.economy.billingPeriodDescription)}}function gn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",65),t.EFF(5),t.DNE(6,hn,2,1,"mat-icon",66),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,3,"BILLINGPERIOD")),t.R7$(3),t.SpI(" ",null==e.marketObject||null==e.marketObject.economy?null:e.marketObject.economy.billingPeriodDisplayName," "),t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.economy?null:e.marketObject.economy.billingPeriodDescription)}}function fn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",68),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"FLOOR")),t.R7$(3),t.JRh(e.marketObject.location.floorDisplayName)}}function bn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",69),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(4);t.R7$(2),t.JRh(t.bMT(3,2,"OFFICIALAPARTMENTNUMBER")),t.R7$(3),t.JRh(e.marketObject.location.officialApartmentNumber)}}function kn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",70),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(4);t.R7$(2),t.JRh(t.bMT(3,2,"SIGNNUMBER")),t.R7$(3),t.JRh(e.marketObject.location.signNumber)}}function Mn(n,r){if(1&n&&(t.qex(0),t.DNE(1,bn,6,4,"div",51)(2,kn,6,4,"div",51),t.bVm()),2&n){const e=t.XpG(3);t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.location?null:e.marketObject.location.officialApartmentNumber),t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.location?null:e.marketObject.location.signNumber)}}function vn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",71),t.EFF(5),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"QUEUE")),t.R7$(3),t.JRh(e.marketObject.queueTypeDisplayName)}}function Rn(n,r){if(1&n&&(t.j41(0,"mat-icon",59),t.qSk(),t.j41(1,"svg",60),t.nrm(2,"path"),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.BMQ("d",e.typeIcon.svg)}}function In(n,r){if(1&n&&(t.qex(0),t.EFF(1),t.bVm()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(": ",e.value,"")}}function Cn(n,r){if(1&n&&(t.j41(0,"div",56)(1,"div",57),t.DNE(2,Rn,3,1,"mat-icon",58),t.k0s(),t.j41(3,"div"),t.EFF(4),t.DNE(5,In,2,1,"ng-container",1),t.k0s()()),2&n){const e=r.$implicit;t.BMQ("data-mom-test","MarketObject_Attribute_"+e.typeDisplayName),t.R7$(2),t.Y8G("ngIf",e.typeIcon),t.R7$(2),t.SpI(" ",e.typeDisplayName,""),t.R7$(),t.Y8G("ngIf",e.value)}}function Sn(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",54),t.DNE(5,Cn,6,4,"div",55),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"MARKETOBJECTATTRIBUTES")),t.R7$(3),t.Y8G("ngForOf",e.marketObject.attributes)}}function xn(n,r){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const e=r.$implicit;t.BMQ("data-mom-test","MarketObject_Amenity_"+e.displayName),t.R7$(),t.SpI(" ",e.displayName," ")}}function On(n,r){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",54),t.DNE(5,xn,2,2,"div",21),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.JRh(t.bMT(3,2,"MARKETOBJECTAMENITIES")),t.R7$(3),t.Y8G("ngForOf",e.marketObject.included)}}function jn(n,r){if(1&n&&(t.qex(0),t.DNE(1,cn,6,4,"div",51)(2,mn,6,4,"div",51)(3,un,9,6,"div",51)(4,_n,7,7,"div",51)(5,gn,7,5,"div",51)(6,fn,6,4,"div",51)(7,Mn,3,2,"ng-container",1)(8,vn,6,4,"div",51)(9,Sn,6,4,"div",51)(10,On,6,4,"div",51),t.bVm()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",(null==e.marketObject.application?null:e.marketObject.application.openTo)&&!e.isFarIntoFuture(e.marketObject.application.openTo)),t.R7$(),t.Y8G("ngIf",(null==e.marketObject.availability?null:e.marketObject.availability.availableFrom)&&!e.isFarIntoFuture(e.marketObject.availability.availableFrom)),t.R7$(),t.Y8G("ngIf",e.marketObject.size),t.R7$(),t.Y8G("ngIf",null==e.marketObject.pricing?null:e.marketObject.pricing.price),t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.economy?null:e.marketObject.economy.billingPeriodDisplayName),t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.location?null:e.marketObject.location.floorDisplayName),t.R7$(),t.Y8G("ngIf",e.showOfficiallyNumber),t.R7$(),t.Y8G("ngIf",null==e.marketObject?null:e.marketObject.queueTypeDisplayName),t.R7$(),t.Y8G("ngIf",(null==e.marketObject.attributes?null:e.marketObject.attributes.length)>0),t.R7$(),t.Y8G("ngIf",(null==e.marketObject.included?null:e.marketObject.included.length)>0)}}function Tn(n,r){if(1&n&&(t.j41(0,"div")(1,"mat-card")(2,"div",2)(3,"div",3),t.nrm(4,"taiga-image-carousel",4),t.k0s()(),t.j41(5,"div",5)(6,"div")(7,"div",6)(8,"div",7)(9,"h1",8),t.EFF(10),t.k0s()(),t.DNE(11,Di,2,1,"div",9)(12,Pi,4,4,"div",10),t.j41(13,"mat-card-subtitle")(14,"div",11),t.DNE(15,wi,2,1,"span",12)(16,Xi,2,1,"span",12),t.k0s(),t.j41(17,"div"),t.DNE(18,Bi,3,4,"span",13)(19,Ui,2,0,"span",1),t.j41(20,"span",14),t.EFF(21),t.k0s()(),t.DNE(22,Li,3,4,"div",15),t.k0s()(),t.j41(23,"div",16)(24,"div",17),t.DNE(25,zi,2,4,"button",18)(26,Qi,3,5,"button",19),t.k0s(),t.j41(27,"div",20),t.DNE(28,Ji,2,1,"div",21)(29,Wi,6,1,"div",22),t.k0s()()(),t.DNE(30,Zi,3,1,"div",23),t.k0s(),t.j41(31,"mat-card-content")(32,"div",24)(33,"div",25),t.nrm(34,"mat-divider"),t.DNE(35,tn,4,3,"div",21),t.k0s(),t.j41(36,"div",26),t.nrm(37,"mat-divider"),t.DNE(38,ln,2,1,"ng-container",1)(39,jn,11,10,"ng-container",1),t.k0s()()()()()),2&n){const e=t.XpG();t.AVh("is-mobile",e.mediaQueryService.isMobile())("is-desktop",!e.mediaQueryService.isMobile()),t.R7$(4),t.Y8G("images",e.images),t.R7$(),t.AVh("header-desktop",!e.mediaQueryService.isMobile()),t.R7$(),t.AVh("flex-box",!e.mediaQueryService.isMobile()),t.R7$(4),t.JRh(e.marketObject.displayName),t.R7$(),t.Y8G("ngIf",e.documents&&e.documents.length>0),t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.location||null==e.marketObject.location.address?null:e.marketObject.location.address.completeAdress),t.R7$(3),t.Y8G("
1ngIf",!e.areaUseGeographicRentalArea),t.R7$(),t.Y8G("ngIf",e.areaUseGeographicRentalArea),t.R7$(2),t.Y8G("ngIf",null==e.marketObject.size?null:e.marketObject.size.area),t.R7$(),t.Y8G("ngIf",(null==e.marketObject.size?null:e.marketObject.size.area)&&(null==e.marketObject.size?null:e.marketObject.size.roomsDisplayName)),t.R7$(2),t.JRh(null==e.marketObject.size?null:e.marketObject.size.roomsDisplayName),t.R7$(),t.Y8G("ngIf",null==e.marketObject.pricing?null:e.marketObject.pricing.price),t.R7$(3),t.Y8G("ngIf",e.showCreateInterest()),t.R7$(),t.Y8G("ngIf",e.showQueueRegistration()),t.R7$(2),t.Y8G("ngForOf",null==e.commandsApply?null:e.commandsApply.checklist),t.R7$(),t.Y8G("ngIf",null==e.marketObject||null==e.marketObject.withdrawal?null:e.marketObject.withdrawal.withdrawn),t.R7$(),t.Y8G("ngIf",null==e.marketObject.info?null:e.marketObject.info.important),t.R7$(2),t.AVh("info-container-mobile",e.mediaQueryService.isMobile()),t.R7$(),t.AVh("texts-width",!e.mediaQueryService.isMobile()),t.R7$(2),t.Y8G("ngForOf",e.infos),t.R7$(),t.AVh("details-width",!e.mediaQueryService.isMobile()),t.R7$(2),t.Y8G("ngIf",(null==e.singleMarketObjektDataFields?null:e.singleMarketObjektDataFields.length)>0),t.R7$(),t.Y8G("ngIf",!((null==e.singleMarketObjektDataFields?null:e.singleMarketObjektDataFields.length)>0))}}function Fn(n,r){1&n&&t.nrm(0,"taiga-page-not-found")}let yn=(()=>{class n{constructor(e,i,a,s,o,l,c,h,_,d,M,C,A,v){this.mediaQueryService=e,this.route=i,this.marketService=a,this.changeDetectorRef=s,this.signinService=o,this.router=l,this.translate=c,this.dialog=h,this.registrationService=_,this.clientConfigurationService=d,this.snackBarService=M,this.fileService=C,this.menuService=A,this.titleService=v,this.signInLink=`${N.t.SIGN_IN}`,this.completeEvent=new Ct.B,this.infos=[],this.images=[],this.imageHeight=this.mediaQueryService.isMobile()?235:555,this.enableInterest=!1,this.documents=[]}ngOnInit(){this.route.data.subscribe(e=>{if(e?.data){if(this.marketObject=e?.data[0],this.singleMarketObjektDataFields=e?.data[1]?.singleMarketObjektDataFields,this.singleMarketObjektDataFields=this.singleMarketObjektDataFields?.filter(i=>{if("thumbnail"!==i.type&&"info"!==i.type&&"withdrawal.description"!==i.type&&"location.areaPath"!==i.type&&"files"!==i.type&&"description"!==i.type&&"displayName"!==i.type&&"location.area.displayName"!==i.type&&"queueType"!==i.type)return!0}),this.singleMarketObjektDataFields?.length>0)for(const i of this.singleMarketObjektDataFields){const a=i.type.split(".");let s;if(s=a[1]?this.marketObject[a[0]]?.[a[1]]:this.marketObject[a[0]],s)switch(i.type){case"pricing.price":case"pricing.priceInclVAT":i.values=`${s.toFixed()} ${this.translate.instant("SEKPERMONTH")}`;break;case"size.area":i.values=`${s} ${this.translate.instant("KVM")}`;break;case"availability.availableFrom":i.values=this.formatavailableFromDate(s);break;case"application.openFrom":case"publishing.publishedFrom":case"publishing.publishedTo":case"availability.earlyAvailabilityPossibleFrom":i.values=this.formatDate(s);break;case"application.openTo":i.values=this.formatOpenToDate(s);break;case"location.address":i.values=s?.completeAdress;break;case"included":for(const o of s)i.values=i.values?`${i.values} \n ${o.displayName}`:o.displayName;break;case"attributes":i.values=s;break;case"location.area.displayName":i.values=s?.displayName;break;default:i.values="boolean"==typeof s?this.translate.instant(s?"YES":"NO"):s}}this.marketObject?.location?.areaPath?.reverse()?.splice(2),this.clientConfigurationService.getClientConfigurationFeatures().subscribe(i=>{this.areaUseGeographicRentalArea=i?.areaUseGeographicRentalArea?.enabled,this.showOfficiallyNumber=i?.showOfficiallyNumber?.enabled;const a=i?.marketobjectfloorplan?.enabled;this.marketObject.files&&Object.keys(this.marketObject.files).length>0&&Object.keys(this.marketObject.files).forEach(s=>{let o=0;if("floorplan"!==s?.toLowerCase()||"floorplan"===s?.toLowerCase()&&a)for(const l of this.marketObject.files[s])if(this.fileService.getValidImageMediaType(l.mimeType))l.address.includes("?")?this.images.push({src:`${l.address}&width=1024&height=1024`,alt:l.displayName}):this.images.push({src:`${l.address}?width=1024&height=1024`,alt:l.displayName});else{let c="";"floorplan"===s&&(c=`${this.translate.instant("FLOORPLAN")} ${0===o?"":o+1}`,o+=1),this.documents.push({displayName:""!==c?c:l.displayName,description:l.description,mimeType:l.mimeType,address:l.address})}})}),this.marketService.getMarketObjectStatus(this.marketObject.id).subscribe(i=>{this.marketObjectStatus=i,this.commandsApply=this.marketObjectStatus?.commands?.find(a=>"apply"===a.command),this.showQueueRegistrationButton=!1===this.commandsApply?.checklist?.find(a=>"queue"===a.type)?.passed&&!1!==this.commandsApply?.checklist?.find(a=>"queueCanRegister"===a.type)?.passed,this.consentRequired=!1===this.commandsApply?.checklist?.find(a=>"consent"===a.type)?.passed,this.enableInterest=!this.signinService.isAuth||this.commandsApply?.checklist?.length>0&&0===this.commandsApply?.checklist?.filter(a=>
1!1===a.passed&&"consent"!==a.type)?.length,"true"===this.route.snapshot.queryParamMap.get("createInterest")&&(this.showCreateInterest()&&this.enableInterest?this.createInterest(this.marketObject.id):this.showQueueRegistration()?this.goToQueueRegistration(this.marketObject.queueType):sessionStorage.setItem("RETURN_URL",this.router.url))}),this.marketObject.info&&Object.keys(this.marketObject.info).forEach(i=>{if("important"!==i)for(const a of this.marketObject.info[i])this.infos.push(a)}),this.infos.sort((i,a)=>{let s=i.order??i.typeOrder,o=a.order??a.typeOrder;return s<o?-1:s>o?1:0}),this.clientConfigurationService.getClientConfigurationApp().subscribe(i=>{this.titleService.setTitle(`${this.marketObject.displayName??this.translate.instant("MARKETOBJECT")} - ${i?.name}`)})}else this.marketObjectNotFound=!0})}ngAfterViewInit(){this.changeDetectorRef.detectChanges()}formatavailableFromDate(e){return g()(e).isAfter(Date.now())?g()(e).format("YYYY-MM-DD"):this.translate.instant("AVAILABLENOW")}formatDate(e){return g()(e).format("YYYY-MM-DD")}formatOpenToDate(e){const i=g()(g()(e).format("HH:mm"),"HH:mm"),a=g()("23:59","HH:mm");return i.isBefore(a)?g()(e).format("YYYY-MM-DD HH:mm"):g()(e).format("YYYY-MM-DD")}createInterest(e){this.signinService.isAuth?this.consentRequired?this.registrationService.getMarketObjectsConsents([this.marketObject.id]).subscribe(i=>{i&&i.items.length>0&&(i.items=i.items.filter(s=>!s.accepted),this.dialog.open(Oi,{data:i,maxWidth:"920px",width:"98%",ariaLabel:this.translate.instant("CONSENTS")}).afterClosed().subscribe(s=>{if("accept"===s){const o={consents:[]};for(const l of i?.items)l.needAcceptance&&o.consents.push({id:l.id,versionId:l.versionId,command:{type:"accept"}});this.registrationService.postActor(o).subscribe(()=>{this.postMarketApplication(e)})}}))}):this.postMarketApplication(e):this.router.navigate([this.signInLink],{queryParams:{returnUrl:this.router.url+"?createInterest=true&queuetype="+this.marketObject.queueType}})}postMarketApplication(e){this.marketService.postMarketApplication(e).subscribe(i=>{this.enableInterest=!1;let s=0;(0,ji.O)(1e3,1e3).pipe((0,I.H)(o=>this.marketService.getMarketApplicationsItem(i?.id[0],!1)),(0,Fi.Q)(this.completeEvent),(0,U.W)(o=>(this.completeEvent.next(!0),(0,Ti.$)(o)))).subscribe(o=>{s+=1,s>6&&(this.snackBarService.success(this.translate.instant("INTERESTSUCCESS")),this.completeEvent.next(!0)),!1===o?.application?.presentation?.executing&&(this.completeEvent.next(!0),"form"===o.application.presentation.type?this.dialog.open(E.w,{data:{heading:this.translate.instant("INTERESTSUCCESS"),text:this.translate.instant("MARKETPROFILEREMINDER"),dialogChoices:$.$.CustomClose,customButtonText:this.translate.instant("APPLICANTPROFILE")},scrollStrategy:new y.N,ariaLabel:this.translate.instant("INTERESTSUCCESS")}).afterClosed().subscribe(c=>{"custom"===c&&this.router.navigateByUrl(`/market/applications/${o.application.marketObject.type}/${o.application.id}`)}):this.snackBarService.success(this.translate.instant("INTERESTSUCCESS")),this.menuService.refreshMenu())})})}goToQueueRegistration(e){this.router.navigate(["/registration/queue"],{queryParams:{queuetype:e,returnUrl:this.router.url}})}getGoogleMapsUrl(e){return`https://www.google.com/maps/search/?api=1&query=${encodeURI(e)}`}showCreateInterest(){return this.marketObjectStatus&&!this.showQueueRegistrationButton}showQueueRegistration(){return this.marketObjectStatus&&this.showQueueRegistrationButton}isFarIntoFuture(e){return"9999"===g()(e).format("YYYY")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(j.nX),t.rXU(F),t.rXU(t.gRc),t.rXU(It.W),t.rXU(j.Ix),t.rXU(b.c$),t.rXU(R.j),t.rXU(kt.f),t.rXU(q.t),t.rXU(z.z),t.rXU(yi.E),t.rXU(et.$),t.rXU(ft.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-object"]],standalone:!1,decls:2,vars:2,consts:[[3,"is-mobile","is-desktop",4,"ngIf"],[4,"ngIf"],[1,"image-container"],[1,"swiper"],["data-mom-test","MarketObject_ImageCarousel",3,"images"],[1,"header-section"],[1,"header","flex-2"],[1,"address"],["data-mom-test","MinaSidor_Objektinformation_Rubrik",1,"mat-h1"],["class","documents-container",4,"ngIf"],["class","link-container",4,"ngIf"],[1,"location"],["data-mom-test","MarketObject_Location",4,"ngIf"],["data-mom-test","MarketObject_SizeArea",4,"ngIf"],["data-mom-test","MarketObject_Rooms"],["data-mom-test","MarketObject_Price",4,"ngIf"],[1,"flex-1dot5"],[1,"action-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_Ob
1jektinformation_Intresseanm\xe4lanKnapp",3,"full-width","disabled","click",4,"ngIf"],["mat-raised-button","","color","primary","data-mom-test","MarketObject_QueueRegistrationButton",3,"full-width","click",4,"ngIf"],[1,"commands-messages"],[4,"ngFor","ngForOf"],["class","check-list-message",4,"ngIf"],["class","text-item","data-mom-test","MarketObject_ImportantInfo",4,"ngIf"],[1,"info-container"],[1,"texts"],[1,"details"],[1,"documents-container"],["class","document",4,"ngFor","ngForOf"],[1,"document"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-button","","color","primary","target","_blank",1,"document-button",3,"href"],[1,"link-container"],["target","_blank","data-mom-test","MarketObject_ShowOnMapLink",1,"link",3,"href"],["data-mom-test","MarketObject_Location"],["data-mom-test","MarketObject_SizeArea"],["data-mom-test","MarketObject_Price"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_Objektinformation_Intresseanm\xe4lanKnapp",3,"click","disabled"],["mat-raised-button","","color","primary","data-mom-test","MarketObject_QueueRegistrationButton",3,"click"],[1,"check-list-message"],[1,"icon-wrapper"],["color","primary","class","icon",4,"ngIf"],[3,"markdown"],["color","primary",1,"icon"],["data-mom-test","MarketObject_WithdrawalDescription"],["data-mom-test","MarketObject_ImportantInfo",1,"text-item"],["class","text-item-value",4,"ngFor","ngForOf"],[1,"text-item-value"],[1,"text-item-label"],["class","detail-item",4,"ngIf"],[1,"detail-item"],[1,"detail-item-label"],[1,"detail-item-value"],["class","attributes",4,"ngFor","ngForOf"],[1,"attributes"],[1,"attribute-icons"],["color","primary",4,"ngIf"],["color","primary"],["height","24","width","24"],["data-mom-test","MarketObject_ApplicationOpenTo",1,"detail-item-value"],["data-mom-test","MarketObject_AvailableFrom",1,"detail-item-value"],["data-mom-test","MarketObject_SizeAreaDetail",1,"detail-item-value"],["data-mom-test","MarketObject_RentValue",1,"detail-item-value"],["data-mom-test","MarketObject_BillingPeriod",1,"detail-item-value",2,"display","flex","align-items","center"],["tabindex","0","style","margin-left: 8px;","color","primary",3,"matTooltip",4,"ngIf"],["tabindex","0","color","primary",2,"margin-left","8px",3,"matTooltip"],["data-mom-test","MarketObject_Floor",1,"detail-item-value"],["data-mom-test","MarketObject_OfficialApartmentNumber",1,"detail-item-value"],["data-mom-test","MarketObject_SignNumber",1,"detail-item-value"],["data-mom-test","MarketObject_QueueType",1,"detail-item-value"]],template:function(i,a){1&i&&t.DNE(0,Tn,40,32,"div",0)(1,Fn,1,0,"taiga-page-not-found",1),2&i&&(t.Y8G("ngIf",a.marketObject),t.R7$(),t.Y8G("ngIf",a.marketObjectNotFound))},dependencies:[u.Sq,u.bT,u.ux,u.e1,u.fG,B.q,G.An,x.It,x.$z,k.RN,k.m2,k.Lc,Ei.e,Ai.H,D.N,yt.Q,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.image-content[_ngcontent-%COMP%]{align-items:center;display:flex}.image-content-desktop[_ngcontent-%COMP%]{height:555px}.image-content-mobile[_ngcontent-%COMP%]{height:235px}.image[_ngcontent-%COMP%]{width:100%;object-fit:cover;display:flex}.image-desktop[_ngcontent-%COMP%]{max-height:555px}.image-mobile[_ngcontent-%COMP%]{max-height:235px}mat-card[_ngcontent-%COMP%]{padding:0;overflow:hidden}.mat-h2[_ngcontent-%COMP%]{margin-bottom:0}.header-section[_ngcontent-%COMP%]{margin-top:10px;margin-left:15px;margin-right:15px}.address[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.info-container[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;display:flex}.texts-width[_ngcontent-%COMP%]{flex:2}.details-width[_ngcontent-%COMP%]{flex:1.5;margin-left:10px}.detail-item[_ngcontent-%COMP%]{display:flex;margin-bottom:10px}.detail-item-label[_ngcontent-%COMP%], .detail-item-value[_ngcontent-%COMP%]{flex:1}.text-item[_ngcontent-%COMP%]{margin-bottom:10px}.info-container-mobile[_ngcontent-%COMP%]{flex-direction:column-reverse}.mat-divider[_ngcontent-%COMP%]{padding-bottom:15px}.text-item-value[_ngcontent-%COMP%]{margin-bottom:10px}.text-item-label[_ngcontent-%COMP%], .detail-item-label[_ngcontent-%COMP%]{margin-bottom:0;margin-top:0;font-size:.875rem}.full-width[_ngcontent-%COMP%]{width:100%}.action-button-container[_ngcontent-%COMP%]{margin-bottom:10px;display:flex;justify-content:flex-end}.check-list-message[_ngcontent-%COMP%]{margin-bottom:10px;display:flex;align-items:center}.flex-box[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-mobile[_ngcontent-%COMP%]   .swiper[_ngcontent-%COMP%]{height:335px}.is-desktop[_ngcontent-%COMP%]   .swiper[_ngcontent-%COMP%]{height:613px}.link-container[_ngcontent-%COMP%]{margin-bottom:5px}.icon[_ngcontent-%COMP%]{margin-right:10px}.mat-h1[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;margin:0}.document-button[_ngcontent-%COMP%]{padding-left:0}.flex-1[_ngcontent-%COMP%]{flex:1}.flex-1dot5[_ngcontent-%COMP%]{flex:1.5}.flex-2[_ngcontent-%COMP%]{flex:2}.icon-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.attributes[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:8px}.attribute-icons[_ngcontent-%COMP%]{display:flex;align-items:center}.attributes[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-left:-30px}mat-card-subtitle[_ngcontent-%COMP%]{margin-bottom:10px}.swiper[_ngcontent-%COMP%]{padding:15px}"]})}}return n})();var K=m(7673),ot=m(6380);let En=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.errorService=i,this.userMessageService=a,this.router=s}resolve(e){const i=e.paramMap.get("id"),a=e.paramMap.get("objectType");return(0,X.p)([this.marketService.getMarketObject(i),this.marketService.getMarketObjectsTypesItem(a)]).pipe((0,U.W)(s=>{const o=this.errorService.parseError(s);if("NotFound"===o?.subCode)return(0,K.of)(null);this.userMessageService.errorWithHeader(o.message,"",o.displayErrorReportNumber?o.errorReportNumber:""),this.router.navigateByUrl("/")}))}static{this.\u0275fac=function(i){return new(i||n)(t.KVO(F),t.KVO(ot.I),t.KVO(z.z),t.
1KVO(j.Ix))}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Et=m(226),Mt=m(9454),At=m(5571),An=m(1517),$n=m(7403),$t=m(5951),vt=m(1301);const Nn=n=>({answerBefore:n}),Gn=n=>({invalidChars:n});function Dn(n,r){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,"ANSWERBEFORE",t.eq3(4,Nn,e.formatDate(null==e.item.presentation.data?null:e.item.presentation.data.answerBefore)))," ")}}function Pn(n,r){if(1&n&&(t.j41(0,"mat-radio-button",13),t.EFF(1),t.k0s()),2&n){const e=r.$implicit;t.Y8G("value",e.command),t.R7$(),t.JRh(e.displayName)}}function wn(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"INPUTREQUIRED")))}function Vn(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;t.XpG(2);const i=t.sdS(15);t.R7$(),t.JRh(t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Gn,null==i.controls.answerReason||null==(e=i.controls.answerReason.getError("allowedCharacters"))?null:e.invalidChars)))}}function Yn(n,r){if(1&n&&(t.j41(0,"mat-form-field",14)(1,"mat-label"),t.EFF(2),t.k0s(),t.nrm(3,"textarea",15),t.DNE(4,wn,3,3,"mat-error",4)(5,Vn,3,6,"mat-error",4),t.k0s()),2&n){const e=t.XpG(),i=t.sdS(15);t.R7$(2),t.JRh(e.item.presentation.data.responseReasonQuestion),t.R7$(),t.Y8G("required",e.item.presentation.data.responseReasonQuestionNoMandatory&&e.item.presentation.data.responseReasonQuestionYesMandatory||"no"===e.answerValue&&e.item.presentation.data.responseReasonQuestionNoMandatory||"yes"===e.answerValue&&e.item.presentation.data.responseReasonQuestionYesMandatory),t.R7$(),t.Y8G("ngIf",null==i.controls.answerReason?null:i.controls.answerReason.hasError("required")),t.R7$(),t.Y8G("ngIf",null==i.controls.answerReason?null:i.controls.answerReason.hasError("allowedCharacters"))}}function Xn(n,r){1&n&&(t.j41(0,"div",16),t.nrm(1,"taiga-markdown",17),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.Y8G("markdown",t.bMT(2,1,"CONFIRMAPPLICATIONANSWER")))}function Bn(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-loading-button",18),t.nI1(1,"translate"),t.bIt("clicked",function(){t.eBV(e);const a=t.XpG(),s=t.sdS(15);return t.Njj(a.answerClick(a.answerValue,s))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("disabled",e.disableButton)("spin",e.disableButton)("text",t.bMT(1,3,"SAVE"))}}let Un=(()=>{class n{constructor(e){this.mediaQueryService=e,this.answerClicked=new t.bkB}formatDate(e){const i=g()(g()(e).format("HH:mm"),"HH:mm"),a=g()("23:59","HH:mm");return i.isBefore(a)?g()(e).format("YYYY-MM-DD HH:mm"):g()(e).format("YYYY-MM-DD")}answerClick(e,i){i.invalid?i.controls.answerReason.markAsTouched():this.answerClicked.emit({type:e,reason:i?.controls?.answerReason?.value})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-question"]],inputs:{item:"item",disableButton:"disableButton"},outputs:{answerClicked:"answerClicked"},standalone:!1,decls:20,vars:12,consts:[["form","ngForm"],[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],[4,"ngIf"],[1,"mat-body-strong"],[1,"radio-button-container"],[3,"ngModelChange","ngModel"],["data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Val",3,"value",4,"ngFor","ngForOf"],["class","form-field",4,"ngIf"],["class","answer-info",4,"ngIf"],["align","end",2,"margin-top","16px"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Spara",3,"disabled","spin","text","clicked",4,"ngIf"],["data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Val",3,"value"],[1,"form-field"],["type","text","matInput","","maxlength","256","cdkTextareaAutosize","","ngModel","","name","answerReason","taigaAllowedCharacters","","data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Orsak","autocomplete","off",3,"required"],[1,"answer-info"],[3,"markdown"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Spara",3,"clicked","disabled","spin","text"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"div")(1,"div",1)(2,"div",2)(3,"div")(4,"h2",3),t.EFF(5),t.k0s(),t.DNE(6,Dn,3,6,"div",4),t.k0s()(),t.j41(7,"div",2)(8,"div")(9,"div",5),t.EFF(10),t.k0s(),t.j41(11,"div",6)(12,"mat-radio-group",7),t.mxI("ngModelChange",function(l){return t.eBV(s),t.DH7(a.answerValue,l)||(a.answerValue=l),t.Njj(l)}),t.DNE(13,Pn,2,2,"mat-radio-button",8),t.k0s()(),t.j41(14,"form",null,0),t.DNE(16,Yn,6,4,"mat-form-field",9),t.k0s(),t.DNE(17,Xn,3,3,"div",10),t.j41(18,"div",11),t.DNE(19,Bn,2,5,"taiga-loading-button",12),t.k0s()()()()()}2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(a.item.statusDisplayName),t.R7$(),t.Y8G("ngIf",null==a.item.presentation?null:a.item.presentation.data),t.R7$(4),t.SpI(" ",a.item.presentation.data.question," "),t.R7$(2),t.R50("ngModel",a.answerValue),t.R7$(),t.Y8G("ngForOf",a.item.commands),t.R7$(3),t.Y8G("ngIf",a.answerValue&&((null==a.item.presentation.data.responseReasonQuestionType?null:a.item.presentation.data.responseReasonQuestionType.toString())===a.answerValue||"both"===(null==a.item.presentation.data.responseReasonQuestionType?null:a.item.presentation.data.responseReasonQuestionType.toString()))),t.R7$(),t.Y8G("ngIf",a.answerValue),t.R7$(2),t.Y8G("ngIf",a.answerValue))},dependencies:[u.Sq,u.bT,nt.fg,S.j,S.M,S.b,$n.xb,$t.VT,$t._g,p.qT,p.me,p.BC,p.cb,p.YS,p.tU,p.vS,p.cV,ut.S,vt.A,D.N,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]:first-of-type{padding-right:15px}.mat-mdc-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.radio-button-container[_ngcontent-%COMP%]{margin-top:10px;height:38px;align-items:center;display:flex;justify-content:space-between}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.answer-info[_ngcontent-%COMP%]{font-weight:700;margin-top:10px}.form-field[_ngcontent-%COMP%]{width:100%;margin-top:8px}"]})}}return n})();function Ln(n,r){if(1&n&&(t.j41(0,"div",9),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG();t.R7$(),t.Lme("",null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.question,": ",i.translateAnswer(null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.answer),"")}}function zn(n,r){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.description)}}function Qn(n,r){if(1&n&&(t.j41(0,"li",4)(1,"div",5)(2,"div"),t.EFF(3),t.k0s(),t.j41(4,"div"),t.EFF(5),t.k0s()(),t.j41(6,"div",6),t.EFF(7),t.k0s(),t.DNE(8,Ln,2,2,"div",7)(9,zn,2,1,"div",8),t.k0s()),2&n){const e=r.$implicit,i=t.XpG();t.R7$(3),t.JRh(i.formatDate(e.occurred)),t.R7$(2),t.JRh(i.formatTime(e.occurred)),t.R7$(2),t.JRh(e.statusDisplayName),t.R7$(),t.Y8G("ngIf",null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.answer),t.R7$(),t.Y8G("ngIf",null==e||null==e.presentation||null==e.presentation.data?null:e.presentation.data.description)}}function Hn(n,r){if(1&n&&(t.j41(0,"li",4)(1,"div",10)(2,"div"),t.EFF(3),t.k0s(),t.j41(4,"div"),t.EFF(5),t.k0s()(),t.j41(6,"div",11),t.EFF(7),t.nI1(8,"translate"),t.k0s()()),2&n){const e=t.XpG();t.R7$(3),t.JRh(e.formatDate(e.created)),t.R7$(2),t.JRh(e.formatTime(e.created)),t.R7$(2),t.JRh(t.bMT(8,3,"REGIST
1ERED"))}}let qn=(()=>{class n{constructor(e,i){this.mediaQueryService=e,this.translate=i,this.steps?.reverse()}formatDate(e){return g()(e).utc(!0).format("YYYY-MM-DD")}formatTime(e){return g()(e).utc(!0).format("HH:mm")}translateAnswer(e){return this.translate.instant(e?.toUpperCase())}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-history"]],inputs:{steps:"steps",created:"created"},standalone:!1,decls:5,vars:6,consts:[[1,"timeline-wrapper"],[1,"StepProgress","mat-small"],["class","StepProgress-item",4,"ngFor","ngForOf"],["class","StepProgress-item",4,"ngIf"],[1,"StepProgress-item"],["data-mom-test","MinaSidor_MittS\xf6kande_Historik_Datum",1,"time"],["data-mom-test","MinaSidor_MittS\xf6kande_Historik_Steg",1,"mat-body-strong"],["data-mom-test","MinaSidor_MittS\xf6kande_Historik_Fr\xe5ga",4,"ngIf"],[4,"ngIf"],["data-mom-test","MinaSidor_MittS\xf6kande_Historik_Fr\xe5ga"],[1,"time"],[1,"mat-body-strong"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"ul",1),t.DNE(3,Qn,10,5,"li",2)(4,Hn,9,5,"li",3),t.k0s()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(3),t.Y8G("ngForOf",a.steps),t.R7$(),t.Y8G("ngIf",a.created))},dependencies:[u.Sq,u.bT,b.D9],styles:['.bold[_ngcontent-%COMP%]{font-weight:700}.time[_ngcontent-%COMP%]{position:absolute;left:-110px}.timeline-wrapper[_ngcontent-%COMP%]{padding-left:55px;font-size:.875rem}.StepProgress[_ngcontent-%COMP%]{position:relative;padding-left:50px;list-style:none}.StepProgress-item[_ngcontent-%COMP%]{position:relative;counter-increment:list}.StepProgress-item[_ngcontent-%COMP%]:not(:last-child){padding-bottom:30px}.StepProgress-item[_ngcontent-%COMP%]:not(:last-child):before{display:inline-block;content:"";position:absolute;top:0;left:-20px;width:10px;height:100%;border-left:2px solid #CCC}.StepProgress-item[_ngcontent-%COMP%]:after{content:"";display:inline-block;position:absolute;top:0;left:-27px;width:12px;height:12px;border:2px solid #CCC;border-radius:50%;background-color:#fff}.StepProgress-item.is-done[_ngcontent-%COMP%]:before{border-left:2px solid green}.StepProgress-item.is-done[_ngcontent-%COMP%]:after{font-size:.625rem;color:#fff;text-align:center;border:2px solid green;background-color:green}.StepProgress[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{display:block}']})}}return n})();const Jn=n=>["/signings",n];function Wn(n,r){if(1&n&&(t.j41(0,"div",5)(1,"button",6),t.EFF(2,"Signera"),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("routerLink",t.eq3(1,Jn,e.item.presentation.data.signingId))}}let Kn=(()=>{class n{constructor(e){this.mediaQueryService=e}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-signing"]],inputs:{item:"item"},standalone:!1,decls:11,vars:9,consts:[[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],[1,"flex-item","align-items-end"],["class","signing-button-container",4,"ngIf"],[1,"signing-button-container"],["mat-raised-button","","color","primary",3,"routerLink"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div")(4,"h2",2),t.EFF(5),t.k0s(),t.j41(6,"div"),t.EFF(7),t.nI1(8,"translate"),t.k0s()()(),t.j41(9,"div",3),t.DNE(10,Wn,3,3,"div",4),t.k0s()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(a.item.statusDisplayName),t.R7$(2),t.SpI(" ",t.bMT(8,7,"SIGNTEXT")," "),t.R7$(3),t.Y8G("ngIf",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.signingId))},dependencies:[u.bT,Y.Wk,x.$z,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.align-items-end[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}"]})}}return n})();function Zn(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",10)(1,"mat-checkbox",11),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.checked,a)||(s.checked=a),t.Njj(a)}),t.EFF(2),t.k0s()()}if(2&n){const e=t.XpG();t.R7$(),t.R50("ngModel",e.checked),t.R7$(),t.JRh(e.item.commands[0].displayName)}}function ta(n,r){1&n&&(t.j41(0,"div",12),t.nrm(1,"taiga-markdown",3),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.Y8G("markdown",t.bMT(2,1,"CONFIRMAPPLICATIONANSWER")))}function ea(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-loading-button",13),t.nI1(1,"translate"),t.bIt("clicked",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.answerClick(a.item.commands[0].command))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("disabled",e.disableButton)("spin",e.disableButton)("text",t.bMT(1,3,"SAVE"))}}let ia=(()=>{class n{constructor(e){this.mediaQueryService=e,this.answerClicked=new t.bkB}
1answerClick(e){this.answerClicked.emit({type:e,reason:void 0})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-viewing-info"]],inputs:{item:"item",disableButton:"disableButton"},outputs:{answerClicked:"answerClicked"},standalone:!1,decls:17,vars:11,consts:[[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],[3,"markdown"],[3,"innerText"],[1,"mat-body-strong"],["class","checkbox-container",4,"ngIf"],["class","answer-info",4,"ngIf"],["align","end",2,"margin-top","16px"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Spara",3,"disabled","spin","text","clicked",4,"ngIf"],[1,"checkbox-container"],["color","primary",3,"ngModelChange","ngModel"],[1,"answer-info"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Fr\xe5ga_Spara",3,"clicked","disabled","spin","text"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div")(4,"h2",2),t.EFF(5),t.k0s(),t.j41(6,"div"),t.nrm(7,"taiga-markdown",3),t.k0s(),t.nrm(8,"div",4),t.k0s()(),t.j41(9,"div",1)(10,"div")(11,"div",5),t.EFF(12),t.k0s(),t.DNE(13,Zn,3,2,"div",6)(14,ta,3,3,"div",7),t.j41(15,"div",8),t.DNE(16,ea,2,5,"taiga-loading-button",9),t.k0s()()()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(null==a.item?null:a.item.statusDisplayName),t.R7$(2),t.Y8G("markdown",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.notes),t.R7$(),t.Y8G("innerText",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.text),t.R7$(4),t.SpI(" ",a.item.presentation.data.question," "),t.R7$(),t.Y8G("ngIf",(null==a.item.commands?null:a.item.commands.length)>0),t.R7$(),t.Y8G("ngIf",a.checked),t.R7$(2),t.Y8G("ngIf",a.checked))},dependencies:[u.bT,pt.So,p.BC,p.vS,vt.A,D.N,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]:first-of-type{padding-right:15px}.checkbox-container[_ngcontent-%COMP%]{margin-top:10px;height:38px;align-items:center;display:flex;justify-content:space-between}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.answer-info[_ngcontent-%COMP%]{font-weight:700;margin-top:10px}.bold[_ngcontent-%COMP%]{font-weight:700}"]})}}return n})();const na=n=>({answerBefore:n});function aa(n,r){if(1&n&&(t.j41(0,"div",6),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,"UPDATEBEFORE",t.eq3(4,na,e.formatDate(null==e.item.presentation.data?null:e.item.presentation.data.answerBefore)))," ")}}let sa=(()=>{class n{constructor(e){this.mediaQueryService=e}formatDate(e){const i=g()(g()(e).format("HH:mm"),"HH:mm"),a=g()("23:59","HH:mm");return i.isBefore(a)?g()(e).format("YYYY-MM-DD HH:mm"):g()(e).format("YYYY-MM-DD")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-application-form"]],inputs:{item:"item"},standalone:!1,decls:14,vars:11,consts:[[1,"flex-container"],[1,"flex-item"],[1,"mat-h2","status-header"],["data-mom-test","MinaSidor_MittS\xf6kande_UppdateraS\xf6kandeprofilSenastDatum",4,"ngIf"],[1,"flex-item","update-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_UppdateraS\xf6kandeprofilKnapp",3,"routerLink"],["data-mom-test","MinaSidor_MittS\xf6kande_UppdateraS\xf6kandeprofilSenastDatum"]],template:function(i,a){1&i&&(t.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div")(4,"h2",2),t.EFF(5),t.k0s(),t.j41(6,"p"),t.EFF(7),t.k0s(),t.DNE(8,aa,3,6,"div",3),t.k0s()(),t.j41(9,"div",4)(10,"div")(11,"button",5),t.EFF(12),t.nI1(13,"translate"),t.k0s()()()()()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(5),t.JRh(null==a.item?null:a.item.statusDisplayName),t.R7$(2),t.SpI(" ",null==a.item||null==a.item.presentation||null==a.item.presentation.data?null:a.item.presentation.data.message," "),t.R7$(),t.Y8G("ngIf",null==a.item.presentation?null:a.item.presentation.data),t.R7$(3),t.Y8G("routerLink",a.item.id),t.R7$(),t.JRh(t.bMT(13,9,"UPDATEYOURAPPLICANTPROFILE")))},dependencies:[u.bT,Y.Wk,x.$z,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]   .flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.is-desktop[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%]{width:50%}.is-mobile[_ngcontent-%COMP%]   .flex-item[_ngcontent-%COMP%] ~ .flex-item[_ngcontent-%COMP%]{margin-top:15px}.update-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}"]})}}return n})();function ra(n,r){if(1&n&&(t.j41(0,"div",16),t.nrm(1,"taiga-markdown",17),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("markdown",e.marketApplicantStatusQueue.description)}}function oa(n,r){if(1&n&&(t.qex(0),t.nrm(1,"taiga-medium-header",14),t.DNE(2,ra,2,1,"div",15),t.bVm()),2&n){const e=t.XpG();t.R7$(),t.Y8G("text",e.getQueueInfoTitleText())("subText",e.getQueueInfoSubText()),t.R7$(),t.Y8G("ngIf",e.marketApplicantStatusQueue.description)}}function la(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme("",t.bMT(2,2,"BLOCKUNTIL")," ",e.formatDate(e.marketApplications.block.blockedUntilDate,!0),".\xa0")}}function ca(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.JRh(e.marketApplications.block.displayDescription)}}function ma(n,r){if(1&n&&(t.j41(0,"div",18)(1,"mat-icon",19),t.EFF(2,"info"),t.k0s(),t.EFF(3,"\xa0 "),t.j41(4,"span",20),t.EFF(5),t.k0s(),t.DNE(6,la,3,4,"span",4)(7,ca,2,1,"span",4),t.k0s()),2&n){const e=t.XpG();t.R7$(5),t.SpI("",e.marketApplications.block.displayName,"\xa0"),t.R7$(),t.Y8G("ngIf",e.marketApplications.block.blockedUntilDate),t.R7$(),t.Y8G("ngIf",e.marketApplications.block.displayDescription)}}function da(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",21)(1,"button",22),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.goToQueueRegistration())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.JRh(t.bMT(3,1,"QUEUEREGISTRATION")))}function pa(n,r){1&n&&(t.j41(0,"div",23),t.nrm(1,"taiga-spinner",24),t.k0s())}function ua(n,r){1&n&&(t.qex(0),t.EFF(1),t.nI1(2,"translate"),t.bVm()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"NOACTIVEAPPLICATIONS")))}function _a(n,r){1&n&&(t.qex(0),t.EFF(1),t.nI1(2,"translate"),t.bVm()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"NOCLOSEDAPPLICATIONS")))}function ha(n,r){1&n&&(t.qex(0),t.EFF(1),t.nI1(2,"translate"),t.bVm()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"NOALLAPPLICATIONS")))}function ga(n,r){if(1&n&&(t.qex(0),t.DNE(1,ua,3,3,"ng-container",4)(2,_a,3,3,"ng-container",4)(3,ha,3,3,"ng-container",4),t.bVm()),2&n){const e=t.XpG(),i=t.sdS(9);t.R7$(),t.Y8G("ngIf","active"===i.value&&0===(null==e.marketApplicationsActive?null:e.marketApplicationsActive.length)),t.R7$(),t.Y8G("ngIf","closed"===i.value&&0===(null==e.marketApplicationsClosed?null:e.marketApplicationsClosed.length)),t.R7$(),t.Y8G("ngIf","all"===i.value&&0===(null==e.marketApplications||null==e.marketApplications.items?null:e.marketApplications.items.length))}}function fa(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-question",37,1),t.bIt("answerClicked",function(a){t.eBV(e);const s=t.sdS(1),o=t.XpG(3).$implicit,l=t.XpG(2);return t.Njj(l.postMarketApplicationsItemPost(a,o.marketObject.id,o.id,o.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function ba(n,r){if(1&n&&t.nrm(0,"taiga-application-signing",38),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function ka(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-viewing-info",37,2),t.bIt("answerClicked",function(a){t.eBV(e);const s=t.sdS(1),o=t.XpG(3).$implicit,l=t.XpG(2);return t.Njj(l.postMarketApplicationsItemPost(a,o.marketObject.id,o.id,o.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Ma(n,r){if(1&n&&t.nrm(0,"taiga-application-form",38),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function va(n,r){if(1&n&&(t.j41(0,"mat-card",33)(1,"mat-card-content"),t.qex(2,34),t.DNE(3,fa,2,1,"taiga-application-question",35)(4,ba,1,1,"taiga-application-signing",36)(5,ka,2,1,"taiga-application-viewing-info",35)(6,Ma,1,1,"taiga-application-form",36),t.bVm(),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.Y8G("ngSwitch",null==e.presentation?null:e.presentation.type),t.R7$(),t.Y8G("ngSwitchCase","questionYesNo"),t.R7$(),t.Y8G("ngSwitchCase","signing"),t.R7$(),t.Y8G("ngSwitchCase","viewingInfo"),t.R7$(),t.Y8G("ngSwitchCase","form")}}function Ra(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",45)(1,"button",46),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG(3).$implicit,s=t.XpG(2);return t.Njj(s.removeApplication(a.marketObject.id,a.id,a.etag))}),t.j41(3,"mat-icon",47),t.EFF(4,"delete_forever"),t.k0s()()()}
12&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Ia(n,r){if(1&n&&(t.j41(0,"mat-card",39)(1,"div",40)(2,"div",41)(3,"div",42),t.EFF(4),t.k0s(),t.j41(5,"div",43),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.DNE(8,Ra,5,3,"div",44),t.k0s()()),2&n){const e=t.XpG(2).$implicit,i=t.XpG(2);t.R7$(4),t.JRh(i.formatDate(e.created)),t.R7$(2),t.JRh(t.bMT(7,3,"REGISTERED")),t.R7$(2),t.Y8G("ngIf",i.showRemove(null==e?null:e.commands))}}function Ca(n,r){if(1&n&&(t.j41(0,"div",41)(1,"div")(2,"span",42),t.EFF(3),t.k0s()(),t.j41(4,"div",54)(5,"div",55),t.EFF(6),t.k0s()()()),2&n){const e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(3),t.JRh(i.formatDate(null==e.history||null==e.history.steps[0]?null:e.history.steps[0].occurred)),t.R7$(3),t.SpI(" ",null==e.history||null==e.history.steps[0]?null:e.history.steps[0].statusDisplayName,"")}}function Sa(n,r){1&n&&(t.j41(0,"div",42),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"HISTORY")," "))}function xa(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",45)(1,"button",46),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(e),t.XpG();const a=t.sdS(1),s=t.XpG(2).$implicit;return t.XpG(2).removeApplication(s.marketObject.id,s.id,s.etag),t.Njj(a.expanded=!a.expanded)}),t.j41(3,"mat-icon",47),t.EFF(4,"delete_forever"),t.k0s()()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Oa(n,r){if(1&n&&(t.j41(0,"mat-expansion-panel",48,3)(2,"mat-expansion-panel-header",49)(3,"mat-panel-title")(4,"div",50),t.DNE(5,Ca,7,2,"div",51)(6,Sa,3,3,"div",52)(7,xa,5,3,"div",44),t.k0s()()(),t.nrm(8,"taiga-application-history",53),t.k0s()),2&n){const e=t.sdS(1),i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(5),t.Y8G("ngIf",!e.expanded),t.R7$(),t.Y8G("ngIf",e.expanded),t.R7$(),t.Y8G("ngIf",a.showRemove(null==i?null:i.commands)),t.R7$(),t.Y8G("steps",null==i.history?null:i.history.steps)("created",i.created)}}function ja(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",28),t.DNE(1,va,7,5,"mat-card",29),t.j41(2,"taiga-market-object-card",30),t.bIt("marketObjectClicked",function(a){t.eBV(e);const s=t.XpG().$implicit,o=t.XpG(2);return t.Njj(o.goToMarketObject(a,null==s.marketObject?null:s.marketObject.type))}),t.k0s(),t.DNE(3,Ia,9,5,"mat-card",31)(4,Oa,9,5,"mat-expansion-panel",32),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("id",e.id),t.R7$(),t.Y8G("ngIf",e.active),t.R7$(),t.AVh("no-border-top-radius",e.active||i.showRemove(null==e?null:e.commands)),t.Y8G("dataFields",null==i.marketObjectsTypesItemDictionary||null==i.marketObjectsTypesItemDictionary[null==e.marketObject?null:e.marketObject.type]?null:i.marketObjectsTypesItemDictionary[null==e.marketObject?null:e.marketObject.type].marketObjektListDataFields)("areaUseGeographicRentalArea",i.areaUseGeographicRentalArea)("marketObject",e.marketObject)("statusDisplayName",e.active?"":e.statusDisplayName)("placeSorted",e.placeSorted),t.R7$(),t.Y8G("ngIf",!((null==e.history||null==e.history.steps?null:e.history.steps.length)>0)),t.R7$(),t.Y8G("ngIf",(null==e.history||null==e.history.steps?null:e.history.steps.length)>0)}}function Ta(n,r){if(1&n&&(t.qex(0,26),t.DNE(1,ja,5,11,"div",27),t.bVm()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf",e.marketObject)}}function Fa(n,r){if(1&n&&(t.qex(0),t.DNE(1,Ta,2,1,"ng-container",25),t.bVm()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.marketApplicationsActive)}}function ya(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-question",37,1),t.bIt("answerClicked",function(a){t.eBV(e);const s=t.sdS(1),o=t.XpG(3).$implicit,l=t.XpG(2);return t.Njj(l.postMarketApplicationsItemPost(a,o.marketObject.id,o.id,o.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Ea(n,r){if(1&n&&t.nrm(0,"taiga-application-signing",38),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Aa(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-application-viewing-info",37,2),t.bIt("answerClicked",function(a){t.eBV(e);const s=t.sdS(1),o=t.XpG(3).$implicit,l=t.XpG(2);return t.Njj(l.postMarketApplicationsItemPost(a,o.marketObject.id,o.id,o.etag,s))}),t.k0s()}if(2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function $a(n,r){if(1&n&&t.nrm(0,"taiga-application-form",38),2&n){const e=t.XpG(3).$implicit;t.Y8G("item",e)}}function Na(n,r){if(1&n&&(t.j41(0,"mat-card",33)(1,"mat-card-content"),t.qex(2,34),t.DNE(3,ya,2,1,"taiga-application-question",35)(4,Ea,1,1,"taiga-application-signing",36)(5,Aa,2,1,"taiga-application-viewing-info",35)(6,$a,1,1,"taiga-application-form",36),t.bVm(),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.Y8G("ngSwitch",null==e.presentation?null:e.presentation.type),t.R7$(),t.Y8G("ngSwitchCase","questionYesNo"),t.R7$(),t.Y8G("ngSwitchCase","signing"),t.R7$(),t.Y8G("ngSwitchCase","viewingInfo"),t.R7$(),t.Y8G("ngSwitchCase","form")}}function Ga(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",45)(1,"button",46),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG(3).$implicit,s=t.XpG(2);return t.Njj(s.removeApplication(a.marketObject.id,a.id,a.etag))}),t.j41(3,"mat-icon",47),t.EFF(4,"delete_forever"),t.k0s()()()}
12&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Da(n,r){if(1&n&&(t.j41(0,"mat-card",39)(1,"div",40)(2,"div",41)(3,"div",42),t.EFF(4),t.k0s(),t.j41(5,"div",43),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.DNE(8,Ga,5,3,"div",44),t.k0s()()),2&n){const e=t.XpG(2).$implicit,i=t.XpG(2);t.R7$(4),t.JRh(i.formatDate(e.created)),t.R7$(2),t.JRh(t.bMT(7,3,"REGISTERED")),t.R7$(2),t.Y8G("ngIf",i.showRemove(null==e?null:e.commands))}}function Pa(n,r){if(1&n&&(t.j41(0,"div",41)(1,"div")(2,"span",42),t.EFF(3),t.k0s()(),t.j41(4,"div",54)(5,"div",55),t.EFF(6),t.k0s()()()),2&n){const e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(3),t.JRh(i.formatDate(null==e.history||null==e.history.steps[0]?null:e.history.steps[0].occurred)),t.R7$(3),t.SpI(" ",null==e.history||null==e.history.steps[0]?null:e.history.steps[0].statusDisplayName,"")}}function wa(n,r){1&n&&(t.j41(0,"div",42),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"HISTORY")," "))}function Va(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",45)(1,"button",46),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(e),t.XpG();const a=t.sdS(1),s=t.XpG(2).$implicit;return t.XpG(2).removeApplication(s.marketObject.id,s.id,s.etag),t.Njj(a.expanded=!a.expanded)}),t.j41(3,"mat-icon",47),t.EFF(4,"delete_forever"),t.k0s()()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETEAPPLICATION")))}function Ya(n,r){if(1&n&&(t.j41(0,"mat-expansion-panel",48,3)(2,"mat-expansion-panel-header",49)(3,"mat-panel-title")(4,"div",50),t.DNE(5,Pa,7,2,"div",51)(6,wa,3,3,"div",52)(7,Va,5,3,"div",44),t.k0s()()(),t.nrm(8,"taiga-application-history",53),t.k0s()),2&n){const e=t.sdS(1),i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(5),t.Y8G("ngIf",!e.expanded),t.R7$(),t.Y8G("ngIf",e.expanded),t.R7$(),t.Y8G("ngIf",a.showRemove(null==i?null:i.commands)),t.R7$(),t.Y8G("steps",null==i.history?null:i.history.steps)("created",i.created)}}function Xa(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",28),t.DNE(1,Na,7,5,"mat-card",29),t.j41(2,"taiga-market-object-card",30),t.bIt("marketObjectClicked",function(a){t.eBV(e);const s=t.XpG().$implicit,o=t.XpG(2);return t.Njj(o.goToMarketObject(a,null==s.marketObject?null:s.marketObject.type))}),t.k0s(),t.DNE(3,Da,9,5,"mat-card",31)(4,Ya,9,5,"mat-expansion-panel",32),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("id",e.id),t.R7$(),t.Y8G("ngIf",e.active),t.R7$(),t.AVh("no-border-top-radius",e.active||i.showRemove(null==e?null:e.commands)),t.Y8G("dataFields",null==i.marketObjectsTypesItemDictionary||null==i.marketObjectsTypesItemDictionary[e.marketObject.type]?null:i.marketObjectsTypesItemDictionary[e.marketObject.type].marketObjektListDataFields)("areaUseGeographicRentalArea",i.areaUseGeographicRentalArea)("marketObject",e.marketObject)("statusDisplayName",e.active?"":e.statusDisplayName)("placeSorted",e.placeSorted),t.R7$(),t.Y8G("ngIf",!((null==e.history||null==e.history.steps?null:e.history.steps.length)>0)),t.R7$(),t.Y8G("ngIf",(null==e.history||null==e.history.steps?null:e.history.steps.length)>0)}}function Ba(n,r){if(1&n&&(t.qex(0,26),t.DNE(1,Xa,5,11,"div",27),t.bVm()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf",e.marketObject)}}function Ua(n,r){if(1&n&&(t.qex(0),t.DNE(1,Ba,2,1,"ng-container",25),t.bVm()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.marketApplicationsClosed)}}let Nt=(()=>{class n{constructor(e,i,a,s,o,l,c,h,_,d,M,C,A,v){this.marketService=e,this.mediaQueryService=i,this.router=a,this.route=s,this.snackBarService=o,this.registrationService=l,this.translate=c,this.dialog=h,this.menuService=_,this.errorService=d,this.snackbarService=M,this.loadingService=C,this.clientConfigurationService=A,this.titleService=v,this.queueRegistrationLink=N.t.QUEUEREGISTRATION,this.clientConfigurationService.getClientConfigurationFeatures().subscribe(H=>{this.areaUseGeographicRentalArea=H?.areaUseGeographicRentalArea?.enabled})}ngOnInit(){this.route.paramMap.subscribe(e=>{this.marketApplications=null,this.marketApplicationsActive=null,this.marketApplicationsClosed=null,this.queuetype=e.get("queue"),this.getData(),this.registrationService.getMarketApplicantStatus().subscribe(i=>{this.marketApplicantStatusQueue=i?.queues?.find(a=>a.id===this.queuetype),this.marketApplicantStatus=i,this.joined=!!this.marketApplicantStatusQueue?.joined,this.clientConfigurationService.getClientConfigurationApp().subscribe(a=>{this.titleService.setTitle(`${this.marketApplicantStatusQueue?.displayName} - ${a?.name}`)})})})}getData(){this.showSpinner=!0,this.marketService.getMarketApplications(this.queuetype).pipe((0,U.W)(e=>{throw this.showSpinner=!1,e}),(0,I.H)(e=>{this.marketApplications=e,this.marketApplications?.items.sort((a,s)=>a.active===s.active?0:a.active?-1:s.active?1:void 0),this.marketApplicationsActive=this.marketApplications.items.filter(a=>!a.closed&&!a.removed),this.marketApplicationsClosed=this.marketApplications.items.filter(a=>a.closed||a.removed);const i=[...new Set(e.items.map(a=>a.marketObject?.type))];if(i.length>0){const a={};for(const s of i)a[s]=this.marketService.getMarketObjectsTypesItem(s);return(0,X.p)(a)}return(0,K.of)(null)})).subscribe(e=>{e&&Object.keys(e).forEach(i=>
1{i&&(e[i].marketObjektListDataFields=e[i].marketObjektListDataFields?.filter(a=>{if("thumbnail"!==a.type&&"info"!==a.type&&"withdrawal.description"!==a.type&&"location.areaPath"!==a.type&&"files"!==a.type&&"description"!==a.type&&"displayName"!==a.type&&"location.area.displayName"!==a.type&&"queueType"!==a.type&&"sortOrder"!==a.type)return!0}))}),this.marketObjectsTypesItemDictionary=e,this.showSpinner=!1})}goToMarketObject(e,i){const a=`/market/${i}/${e}`;this.marketService.setPageYOffset(window.pageYOffset),this.router.navigateByUrl(a)}postMarketApplicationsItemPost(e,i,a,s,o){o&&(o.disableButton=!0),this.marketService.postMarketApplicationsItemPost(i,a,e,s).pipe((0,U.W)(l=>{if(o&&(o.disableButton=!1),"conflict"===l?.error?.error?.subcode?.toLowerCase()){this.getData(),this.menuService.refreshMenu(1500);const c=this.errorService.parseError(l);return this.snackbarService.errorWithHeader(c.stack,"",""),(0,K.of)(null)}throw l})).subscribe(()=>{let l;switch(e.type){case"remove":this.snackBarService.success("Intresseanm\xe4lan borttagen"),this.getData();break;case"yes":case"no":case"done":l=w.Q.generateUniqueId(),this.loadingService.open(l),setTimeout(()=>{this.snackBarService.success("Du har nu svarat"),this.loadingService.close(l),this.getData(),this.menuService.refreshMenu(5e3)},2e3)}})}formatDate(e,i){return i?g()(e).utc(!0).format("YYYY-MM-DD"):g()(e).utc(!0).format("YYYY-MM-DD HH:mm")}getQueueInfoTitleText(){return this.marketApplicantStatusQueue?.value?`${this.marketApplicantStatusQueue?.displayName} ${this.marketApplicantStatusQueue?.value}  ${this.marketApplicantStatusQueue?.valueUnitDisplayName?.toLocaleLowerCase()}`:this.marketApplicantStatusQueue?.displayName}getQueueInfoSubText(){if(!this.marketApplicantStatusQueue.isMember)return this.translate.instant("NOTINQUEUE");let e=" ";if(this.marketApplicantStatusQueue?.joined&&(e=`${this.translate.instant("QUEUESINCE")} ${this.formatDate(this.marketApplicantStatusQueue?.joined,!0)}.`),this.marketApplicantStatus?.expirationPeriodMonths&&this.marketApplicantStatus?.expires){const i=g()(this.marketApplicantStatus?.expires).utc(!0).format("YYYY-MM-DD");e+=" "+this.translate.instant("EXPIRATIONINFO").replace("%applicantExpirationPeriodMonths%",this.marketApplicantStatus.expirationPeriodMonths.toString()).replace("%applicantExpires%",i)}return e}translateAnswer(e){return this.translate.instant(e?.toUpperCase())}showRemove(e){return!!e?.filter(i=>"remove"===i.command).length}removeApplication(e,i,a){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMREMOVEAPPLICATION"),dialogChoices:$.$.YesNo},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMREMOVEAPPLICATION")}).afterClosed().subscribe(o=>{"yes"===o&&this.postMarketApplicationsItemPost({type:"remove",reason:void 0},e,i,a)})}goToQueueRegistration(){this.router.navigate([this.queueRegistrationLink],{queryParams:{queuetype:this.queuetype}})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F),t.rXU(O.M),t.rXU(j.Ix),t.rXU(j.nX),t.rXU(z.z),t.rXU(kt.f),t.rXU(b.c$),t.rXU(R.j),t.rXU(et.$),t.rXU(ot.I),t.rXU(z.z),t.rXU(Et.U),t.rXU(q.t),t.rXU(ft.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-applications"]],standalone:!1,decls:23,vars:26,consts:[["group","matButtonToggleGroup"],["applicationQuestion",""],["applicationViewingInfo",""],["expansion",""],[4,"ngIf"],["class","block-container",4,"ngIf"],["class","queue-registration-button-container",4,"ngIf"],[3,"text","subText"],[1,"toggle-wrapper"],["value","active",1,"slim-toggle"],["value","active"],["value","closed"],["value","all"],["class","spinner",4,"ngIf"],["data-mom-test","MinaSidor_MittS\xf6kande_SidRubrik",3,"text","subText"],["class","queue-description",4,"ngIf"],[1,"queue-description"],[3,"markdown"],[1,"block-container"],["color","primary"],[1,"block-display-name"],[1,"queue-registration-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_K\xf6registreringKnapp",3,"click"],[1,"spinner"],["aria-label","Progress spinner"],["class","application-container",4,"ngFor","ngForOf"],[1,"application-container"],["class","application-container","data-mom-test","MinaSidor_MittS\xf6kande_AnnonsKort",3,"id",4,"ngIf"],["data-mom-test","MinaSidor_MittS\xf6kande_AnnonsKort",1,"application-container",3,"id"],["class","application-status",4,"ngIf"],[1,"no-border-bottom-radius",3,"marketObjectClicked","dataFields","areaUseGeographicRentalArea","marketObject","statusDisplayName","placeSorted"],["class","application-history",4,"ngIf"],["class","application-history","togglePosition","before",4,"ngIf"],[1,"application-status"],[3,"ngSwitch"],[3,"item","answerClicked",4,"ngSwitchCase"],[3,"item",4,"ngSwitchCase"],[3,"answerClicked","item"],[3,"item"],[1,"application-history"],[1,"status-container"],[1,"created-container"],[1,"mat-small"],[1,"mat-body-strong","step-container"],["class","remove-button-container",4,"ngIf"],[1,"remove-button-container"],["mat-icon-button","","color","accent",1,"remove-button",3,"click"],[1,"icon-display"],["togglePosition","before",1,"application-history"],[1,"panel-header"],["data-mom-test","MinaSidor_MittS\xf6kande_Historik_Avsnitt",1,"status-container"],["class","created-container",4,"ngIf"],["class","mat-small",4,"ngIf"],[3,"steps","created"],[1,"step-container"],[1,"mat-body-strong"]],template:function(i,a){if(1&i&&(t.j41(0,"div"),t.DNE(1,oa,3,3,"ng-container",4)(2,ma,8,3,"div",5)(3,da,4,3,"div",6),t.nrm(4,"taiga-medium-header",7),t.nI1(5,"translate"),t.nI1(6,"translate"),t.j41(7,"div",8)(8,"mat-button-toggle-group",9,0)(10,"mat-button-toggle",10),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"mat-button-toggle",11),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"mat-button-toggle",12),t.EFF(17),t.nI1(18,"translate"),t.k0s()()(),t.DNE(19,pa,2,0,"div",13)(20,ga,4,3,"ng-container",4)(21,Fa,2,1,"ng-container",4)(22,Ua,2,1,"ng-container",4),t.k0s()),2&i){const s=t.sdS(9);t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("ngIf",a.marketApplicantStatusQueue),t.R7$(),t.Y8G("ngIf",null==a.marketApplications?null:a.marketApplications.block),t.R7$(),t.Y8G("ngIf",a.marketApplicantStatusQueue&&!a.marketApplicantStatusQueue.isMember),t.R7$(),t.FS9("text",t.bMT(5,16,"MYINTEREST")),t.FS9("subText",t.bMT(6,18,"MYINTERESTINFO")),t.R7$(7),t.JRh(t.bMT(12,20,"ACTIVE")),t.R7$(3),t.JRh(t.bMT(15,22,"COMPLETED")),t.R7$(3),t.JRh(t.bMT(18,24,"ALL")),t.R7$(2),t.Y8G("ngIf",a.showSpinner),t.R7$(),t.Y8G("ngIf",!a.showSpinner),t.R7$(),t.Y8G("ngIf",("active"===s.value||"all"===s.value)&&!a.showSpinner),t.R7$(),t.Y8G("ngIf",("closed"===s.value||"all"===s.value)&&!a.showSpinner)}},dependencies:[u.Sq,u.bT,u.ux,u.e1,G.An,x.$z,it.M,k.RN,k.m2,Mt.GK,Mt.Z2,Mt.WN,At.ec,At.pc,W.o,An.t,D.N,Ft,Un,qn,Kn,ia,sa,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.application-status[_ngcontent-%COMP%]{margin-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.application-container[_ngcontent-%COMP%]{margin-bottom:15px}.application-history[_ngcontent-%COMP%]{margin-top:1px;border-top-left-radius:0;border-top-right-radius:0;padding-top:0;padding-bottom:0}.status-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;
1height:48px;width:100%}.step-container[_ngcontent-%COMP%]{margin-left:15px}.remove-button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.icon-display[_ngcontent-%COMP%]{transform:scale(1.2)}.created-container[_ngcontent-%COMP%]{display:flex;align-items:center}.queue-registration-button-container[_ngcontent-%COMP%], .block-container[_ngcontent-%COMP%]{margin-bottom:16px}.block-display-name[_ngcontent-%COMP%]{font-weight:700}.block-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.panel-header[_ngcontent-%COMP%]{padding-right:0}.queue-description[_ngcontent-%COMP%], .toggle-wrapper[_ngcontent-%COMP%]{margin-bottom:16px}.spinner[_ngcontent-%COMP%]{display:flex;justify-content:center}"]})}}return n})();var La=m(6048);function za(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG(2);return t.Njj(s.goToApplication(a.id,a._queueType))}),t.EFF(1),t.k0s()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.AVh("full-width",i.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",e.marketObject.displayName," ")}}function Qa(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,za,2,3,"button",4),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf",e.active&&"form"===e.presentation.type)}}function Ha(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,Qa,2,1,"div",1),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngForOf",null==e?null:e.items)}}let qa=(()=>{class n{constructor(e,i,a,s,o){this.marketApplications=e,this.router=i,this.dialogRef=a,this.location=s,this.mediaQueryService=o}goToApplication(e,i){this.dialogRef.close(),this.router.navigateByUrl(`market/applications/${i}/${e}`)}goBack(){this.location.back()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(R.e),t.rXU(j.Ix),t.rXU(R.m),t.rXU(La.aZ),t.rXU(O.M))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-ongoing-active-applications-dialog"]],standalone:!1,decls:12,vars:12,consts:[["mat-dialog-title",""],[4,"ngFor","ngForOf"],["align","end"],["mat-button","",3,"click"],["color","primary","mat-raised-button","",3,"full-width","click",4,"ngIf"],["color","primary","mat-raised-button","",3,"click"]],template:function(i,a){1&i&&(t.j41(0,"h2",0),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"mat-dialog-content")(4,"p"),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.DNE(7,Ha,2,1,"div",1),t.k0s(),t.j41(8,"mat-dialog-actions",2)(9,"button",3),t.bIt("click",function(){return a.goBack()}),t.EFF(10),t.nI1(11,"translate"),t.k0s()()),2&i&&(t.R7$(),t.JRh(t.bMT(2,6,"UPDATEAPPLICANTPROFILE")),t.R7$(4),t.JRh(t.bMT(6,8,"APPLICANTPROFILEUPDATEEXPIRED")),t.R7$(2),t.Y8G("ngForOf",a.marketApplications),t.R7$(2),t.AVh("full-width",a.mediaQueryService.isMobile()),t.R7$(),t.JRh(t.bMT(11,10,"CLOSE")))},dependencies:[u.Sq,u.bT,x.$z,R.b,R.M,R.c,b.D9],styles:["button[_ngcontent-%COMP%]{margin-top:16px}.full-width[_ngcontent-%COMP%]{width:100%}"]})}}return n})();var Gt=m(7643),Dt=m(4317),L=m(1585);const Q=n=>({invalidChars:n});function Ja(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function Wa(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function Ka(n,r){if(1&n&&(t.j41(0,"div",17)(1,"mat-form-field",18)(2,"mat-label",19),t.EFF(3),t.k0s(),t.nrm(4,"input",20),t.j41(5,"mat-hint",21),t.EFF(6),t.k0s(),t.DNE(7,Ja,3,3,"mat-error",22)(8,Wa,3,6,"mat-error",22),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(3),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.label),t.R7$(),t.Y8G("formControlName",e.id)("maxlength",null==e.generic||null==e.generic.text?null:e.generic.text.maxLength)("required",null==e.generic||null==e.generic.text?null:e.generic.text.required),t.R7$(2),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.description),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id].hasError("allowedCharacters"))}}function Za(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function ts(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVA
1LIDINCOME")," "))}function es(n,r){if(1&n&&(t.j41(0,"div",23)(1,"mat-form-field",18)(2,"mat-label",24),t.EFF(3),t.k0s(),t.nrm(4,"input",25),t.j41(5,"mat-hint",21),t.EFF(6),t.k0s(),t.DNE(7,Za,3,3,"mat-error",22)(8,ts,3,3,"mat-error",22),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(3),t.JRh(null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.label),t.R7$(),t.Y8G("formControlName",e.id)("maxlength",null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.maxLength)("required",null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.required),t.R7$(2),t.JRh(null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.description),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id].hasError("required")),t.R7$(),t.Y8G("ngIf",!i.incomeFormGroup.controls[e.id].hasError("required"))}}function is(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",26)(1,"mat-form-field",27),t.bIt("click",function(){t.eBV(e);const a=t.sdS(7);return t.Njj(a.open())}),t.j41(2,"mat-label",28),t.EFF(3),t.k0s(),t.nrm(4,"input",29)(5,"mat-datepicker-toggle",30)(6,"mat-datepicker",null,0),t.j41(8,"mat-hint",21),t.EFF(9),t.k0s(),t.j41(10,"mat-error"),t.EFF(11),t.nI1(12,"translate"),t.k0s()()()}if(2&n){const e=t.sdS(7),i=t.XpG().$implicit;t.R7$(3),t.JRh(null==i.generic||null==i.generic.date?null:i.generic.date.label),t.R7$(),t.Y8G("matDatepicker",e)("formControlName",i.id)("required",null==i.generic||null==i.generic.date?null:i.generic.date.required),t.R7$(),t.Y8G("for",e),t.R7$(4),t.JRh(null==i.generic||null==i.generic.date?null:i.generic.date.description),t.R7$(2),t.SpI(" ",t.bMT(12,7,"INPUTREQUIRED")," ")}}function ns(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function as(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id+"-name"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function ss(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function rs(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVALIDEMAIL")," "))}function os(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id+"-emailAddress"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function ls(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function cs(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVALIDPHONENUMBER")," "))}function ms(n,r){if(1&n&&(t.j41(0,"div",31)(1,"div"),t.EFF(2),t.k0s(),t.j41(3,"mat-hint"),t.EFF(4),t.k0s(),t.j41(5,"div",32)(6,"mat-form-field",18)(7,"mat-label",33),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.nrm(10,"input",34),t.DNE(11,ns,3,3,"mat-error",22)(12,as,3,6,"mat-error",22),t.k0s(),t.j41(13,"mat-form-field",18)(14,"mat-label"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.nrm(17,"input",35),t.DNE(18,ss,3,3,"mat-error",22)(19,rs,3,3,"mat-error",22)(20,os,3,6,"mat-error",22),t.k0s(),t.j41(21,"mat-form-field",18)(22,"mat-label"),t.EFF(23),t.nI1(24,"translate"),t.k0s(),t.nrm(25,"input",34),t.DNE(26,ls,3,3,"mat-error",22)(27,cs,3,3,"mat-error",22),t.k0s()()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.heading),t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.description),t.R7$(4),t.JRh(t.bMT(9,18,"NAME")),t.R7$(2),t.Y8G("formControlName",e.id+"-name")("required",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-name"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-name"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(16,20,"EMAILADDRESS")),t.R7$(2),t.Y8G("formControlName",e.id+"-emailAddress")("required",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-emailAddress"].hasError("required")),t.R7$(),t.Y8G("ngIf",!i.incomeFormGroup.controls[e.id+"-emailAddress"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-emailAddress"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(24,22,"PHONENUMBER")),t.R7$(2),t.Y8G("formControlName",e.id+"-telephoneNumber")("required",null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-telephoneNumber"].hasError("required")),t.R7$(),t.Y8G("ngIf",!i.incomeFormGroup.controls[e.id+"-telephoneNumber"].hasError("required"))}}function ds(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function ps(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);
1t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id+"-address"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function us(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function _s(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id+"-postcode"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function hs(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function gs(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id+"-city"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function fs(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function bs(n,r){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){let e;const i=t.XpG(2).$implicit,a=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"INVALIDCHARACTERS",t.eq3(4,Q,null==(e=a.incomeFormGroup.controls[i.id+"-country"].getError("allowedCharacters"))?null:e.invalidChars))," ")}}function ks(n,r){if(1&n&&(t.j41(0,"div",36)(1,"div"),t.EFF(2),t.k0s(),t.j41(3,"mat-hint"),t.EFF(4),t.k0s(),t.j41(5,"div",32)(6,"mat-form-field",18)(7,"mat-label"),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.nrm(10,"input",34),t.DNE(11,ds,3,3,"mat-error",22)(12,ps,3,6,"mat-error",22),t.k0s(),t.j41(13,"mat-form-field",18)(14,"mat-label"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.nrm(17,"input",34),t.DNE(18,us,3,3,"mat-error",22)(19,_s,3,6,"mat-error",22),t.k0s(),t.j41(20,"mat-form-field",18)(21,"mat-label"),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.nrm(24,"input",34),t.DNE(25,hs,3,3,"mat-error",22)(26,gs,3,6,"mat-error",22),t.k0s(),t.j41(27,"mat-form-field",18)(28,"mat-label"),t.EFF(29),t.nI1(30,"translate"),t.k0s(),t.nrm(31,"input",34),t.DNE(32,fs,3,3,"mat-error",22)(33,bs,3,6,"mat-error",22),t.k0s()()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(2),t.JRh(null==e.generic||null==e.generic.address?null:e.generic.address.label),t.R7$(2),t.JRh(null==e.generic||null==e.generic.address?null:e.generic.address.description),t.R7$(4),t.JRh(t.bMT(9,22,"ADDRESS")),t.R7$(2),t.Y8G("formControlName",e.id+"-address")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-address"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-address"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(16,24,"POSTALCODE")),t.R7$(2),t.Y8G("formControlName",e.id+"-postcode")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-postcode"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-postcode"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(23,26,"CITY")),t.R7$(2),t.Y8G("formControlName",e.id+"-city")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-city"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-city"].hasError("allowedCharacters")),t.R7$(3),t.JRh(t.bMT(30,28,"COUNTRY")),t.R7$(2),t.Y8G("formControlName",e.id+"-country")("required",null==e.generic||null==e.generic.address?null:e.generic.address.required),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-country"].hasError("required")),t.R7$(),t.Y8G("ngIf",i.incomeFormGroup.controls[e.id+"-country"].hasError("allowedCharacters"))}}function Ms(n,r){if(1&n&&(t.j41(0,"div")(1,"mat-form-field",18)(2,"mat-label"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.nrm(5,"input",37),t.j41(6,"mat-error"),t.EFF(7),t.nI1(8,"translate"),t.k0s()(),t.j41(9,"mat-form-field",18)(10,"mat-label"),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.nrm(13,"input",38),t.j41(14,"mat-error"),t.EFF(15),t.nI1(16,"translate"),t.k0s()()()),2&n){const e=t.XpG().$implicit;t.R7$(3),t.JRh(t.bMT(4,8,"NUMBEROFADULTS")),t.R7$(2),t.Y8G("formControlName",e.id+"-numberOfAdults")("required",null==e.generic||null==e.generic.marketHousehold?null:e.generic.marketHousehold.required),t.R7$(2),t.SpI(" ",t.bMT(8,10,"INPUTREQUIRED")," "),t.R7$(4),t.JRh(t.bMT(12,12,"NUMBEROFCHILDREN")),t.R7$(2),t.Y8G("formControlName",e.id+"-numberOfChildren")("required",null==e.generic||null==e.generic.marketHousehold?null:e.generic.marketHousehold.required),t.R7$(2),t.SpI(" ",t.bMT(16,14,"INPUTREQUIRED")," ")}}function vs(n,r){1&n&&(t.qex(0),t.EFF(1," *"),t.bVm())}function Rs(n,r){if(1&n&&(t.j41(0,"mat-label",45),t.EFF(1),t.DNE(2,vs,2,0,"ng-container",22),t.k0s()),2&n){t.XpG();const e=t.sdS(4),i=t.XpG().$implicit,a=t.XpG(2);t.AVh("warn",(null==i||null==i.generic||null==i.generic.file?null:i.generic.file.required)&&0===(null==e||null==e.anyFiles?null:e.anyFiles.length)&&a.saveFormOrDeleteFileIsClicked),t.R7$(),t.SpI(" ",null==i.generic||null==i.generic.file?null:i.generic.file.label," "),t.R7$(),t.Y8G("ngIf",null==i.generic||null==i.generic.file?null:i.generic.file.required)}}function Is(n,r){if(1&n&&(t.j41(0,"mat-hint",46),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.JRh(null==e.generic||null==e.generic.file?null:e.generic.file.description)}}function Cs(n,r){1&n&&(t.j41(0,"mat-error",47),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function Ss(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",39),t.DNE(1,Rs,3,4,"mat-label",40),t.nrm(2,"mat-divider",41),t.j41(3,"taiga-file-upload",42,1),t.nI1(5,"translate"),t.bIt("fileLoaded",function(a){t.eBV(e);const s=t.sdS(4),o=t.XpG().$implicit,l=t.XpG(2);return t.Njj(l.uploadFile(o.id,s,a))})("fileDeleted",function(a){t.eBV(e);const s=t.XpG().$implicit,o=t.XpG(2);return t.Njj(o.deleteFile(s.id,a))}),t.k0s(),t.nrm(6,"mat-divider"),t.DNE(7,Is,2,1,"mat-hint",43)(8,Cs,3,3,"mat-error",44),t.k0s()}if(2&n){const e=t.sdS(4),i=t.XpG().$implicit,a=t.XpG(2);t.R7$(),t.Y8G("ngIf",e),t.R7$(2),t.Y8G("inputAnyFiles",a.getAnyFilesValue(i.id,null==i.generic?null:i.generic.t
1ype))("controlName",i.id)("text",t.bMT(5,9,"ADDFILE"))("required",(null==i.generic||null==i.generic.file?null:i.generic.file.required)&&(!((null==a.data||null==a.data.marketIncome||null==a.data.marketIncome.values[i.id]||null==a.data.marketIncome.values[i.id].generic||null==a.data.marketIncome.values[i.id].generic.file||null==a.data.marketIncome.values[i.id].generic.file.items?null:a.data.marketIncome.values[i.id].generic.file.items.length)>0)||a.cantDeletePatches(i.id))),t.R7$(3),t.AVh("divider-warn",(null==i.generic||null==i.generic.file?null:i.generic.file.required)&&0===(null==e.anyFiles?null:e.anyFiles.length)&&a.saveFormOrDeleteFileIsClicked),t.R7$(),t.Y8G("ngIf",!(a.incomeFormGroup.controls[i.id].touched&&a.incomeFormGroup.controls[i.id].hasError("required"))),t.R7$(),t.Y8G("ngIf",a.incomeFormGroup.controls[i.id].touched&&a.incomeFormGroup.controls[i.id].hasError("required"))}}function xs(n,r){if(1&n&&(t.qex(0)(1,9),t.DNE(2,Ka,9,7,"div",10)(3,es,9,7,"div",11)(4,is,13,9,"div",12)(5,ms,28,24,"div",13)(6,ks,34,30,"div",14)(7,Ms,17,16,"div",15)(8,Ss,9,11,"div",16),t.bVm()()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngSwitch",null==e.generic?null:e.generic.type),t.R7$(),t.Y8G("ngSwitchCase","text"),t.R7$(),t.Y8G("ngSwitchCase","marketIncomeMonthly"),t.R7$(),t.Y8G("ngSwitchCase","date"),t.R7$(),t.Y8G("ngSwitchCase","contactDetails"),t.R7$(),t.Y8G("ngSwitchCase","address"),t.R7$(),t.Y8G("ngSwitchCase","marketHousehold"),t.R7$(),t.Y8G("ngSwitchCase","file")}}function Os(n,r){if(1&n){const e=t.RV6();t.j41(0,"form",4),t.DNE(1,xs,9,8,"ng-container",5),t.j41(2,"div",6)(3,"button",7),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return a.save(),t.Njj(a.incomeFormGroup.markAllAsTouched())}),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"button",8),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.close())}),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("formGroup",e.incomeFormGroup),t.R7$(),t.Y8G("ngForOf",e.data.fields.fields),t.R7$(2),t.Y8G("disabled",e.disableSaveButton),t.R7$(),t.JRh(t.bMT(5,5,"SAVE")),t.R7$(3),t.JRh(t.bMT(8,7,"CANCEL"))}}let Rt=(()=>{class n{get i(){return this.incomeFormGroup.controls}constructor(e,i,a,s,o){this.data=e,this.dialogRef=i,this.formBuilder=a,this.adapter=s,this.marketService=o,this.filePatches=[],this.patchFields=[],this.adapter.setLocale("sv")}ngOnInit(){this.createFormGroup()}createFormGroup(){this.incomeFormGroup=this.formBuilder.group({});for(const e of this.data.fields?.fields)if("contactDetails"===e.generic?.type)this.incomeFormGroup.addControl(`${e.id}-name`,new p.hs(this.getValue(e.id,e.generic?.type,"name"),[(0,L.f)()])),this.incomeFormGroup.addControl(`${e.id}-emailAddress`,new p.hs(this.getValue(e.id,e.generic?.type,"emailAddress"),[p.k0.email,(0,L.f)()])),this.incomeFormGroup.addControl(`${e.id}-telephoneNumber`,new p.hs(this.getValue(e.id,e.generic?.type,"telephoneNumber"),[p.k0.pattern("^[0-9]*$")]));else if("address"===e.generic?.type)this.incomeFormGroup.addControl(`${e.id}-address`,new p.hs(this.getValue(e.id,e.generic?.type,"address"),[(0,L.f)()])),this.incomeFormGroup.addControl(`${e.id}-postcode`,new p.hs(this.getValue(e.id,e.generic?.type,"postcode"),[(0,L.f)()])),this.incomeFormGroup.addControl(`${e.id}-city`,new p.hs(this.getValue(e.id,e.generic?.type,"city"),[(0,L.f)()])),this.incomeFormGroup.addControl(`${e.id}-country`,new p.hs(this.getValue(e.id,e.generic?.type,"country"),[(0,L.f)()]));else if("marketHousehold"===e.generic?.type){const i=this.getValue(e.id,"numberOfAdults",null),a=this.getValue(e.id,"numberOfChildren",null);this.incomeFormGroup.addControl(`${e.id}-numberOfAdults`,new p.hs(i>0?i:null)),this.incomeFormGroup.addControl(`${e.id}-numberOfChildren`,new p.hs(a>0?a:null))}else"file"===e.generic?.type?(this.incomeFormGroup.addControl(e.id,new p.hs),this.incomeFormGroup.addControl(`${e.id}-textarea`,new p.hs(this.getValue(e.id,e.generic?.type,"comment"),[(0,L.f)()]))):this.incomeFormGroup.addControl(e.id,new p.hs(this.getValue(e.id,e.generic?.type),this.getValidators(e.generic?.type)))}getValue(e,i,a="content"){let s=null;return s=a?this.data?.marketIncome?.values[e]?.generic?.[i][a]:this.data?.marketIncome?.values[e]?.generic?.[i],s&&"date"===i&&(s=this.formatDate(s)),s??null}getAnyFilesValue(e,i){const a=this.data?.marketIncome?.values[e]?.generic?.[i]?.items;if(a){let s=[];for(const o of a){const l={src:null,file:new File([""],o.fileName),disableNote:!0,uploaded:o.uploaded};s.push(l)}return s}}getValidators(e){return"marketIncomeMonthly"===e?[p.k0.pattern("^[0-9]*$")
1]:"text"===e?[(0,L.f)()]:null}formatDate(e){return g()(e).format("YYYY-MM-DD")}save(){if(this.saveFormOrDeleteFileIsClicked=!0,this.incomeFormGroup.valid){for(const[e,i]of Object.entries(this.incomeFormGroup.value)){const a=e.split("-").shift(),s=this.data.fields.fields.find(o=>o.id===a)?.generic?.type;if("file"===s){a!=e&&this.patchFields.push({id:a,type:s,comment:this.incomeFormGroup.controls[e]?.value??""});const o=this.filePatches.filter(l=>l.fieldId===e);for(const l of o)l?.fileId&&this.patchFields.push({id:e,value:l.fileId,type:s,fileName:l.anyFile?.file?.name?.normalize()})}else this.patchFields.push({id:e,value:i,type:s})}this.dialogRef.close({data:{fields:this.patchFields}})}}disableEnableControls(e,i,a){e.checked?(i.disable(),a.enable(),a.value=i.value):(a.disable(),i.enable(),i.value=a.value)}uploadFile(e,i,a){this.disableSaveButton=!0,i.showProgressBar=!0,this.postSystemFilesItem=this.marketService.postSystemFilesItem(a.file).pipe((0,U.W)(s=>{throw this.disableSaveButton=!1,i.showProgressBar=!1,i.progressBarPercentDone=0,i.anyFiles=[],this.incomeFormGroup.controls[e].reset(),s})).subscribe(s=>{if(s.type===Gt.hv.Response&&(i.progressBarPercentDone=100,setTimeout(()=>{i.showProgressBar=!1,i.progressBarPercentDone=0},500),this.disableSaveButton=!1,this.filePatches.push({fieldId:e,fileId:s?.body,anyFile:a})),s.type===Gt.hv.UploadProgress){const o=Math.round(100*s.loaded/s.total);i.progressBarPercentDone=o<99?o:99}})}deleteFile(e,i){const a=this.data?.marketIncome?.values[e]?.generic?.file?.items?.find(o=>o.fileName===i.file.name);a&&this.patchFields.push({id:e,value:"remove",type:"file",fileId:a.id});const s=this.filePatches.indexOf(this.filePatches.find(o=>o.fieldId===e&&o.anyFile===i));s>-1&&this.filePatches.splice(s,1),0===this.filePatches?.length&&(this.incomeFormGroup.controls[e].reset(),this.incomeFormGroup.controls[e].markAsTouched()),this.saveFormOrDeleteFileIsClicked=!0,this.postSystemFilesItem?.unsubscribe()}close(){this.postSystemFilesItem?.unsubscribe(),this.dialogRef.close()}cantDeletePatches(e){return this.data?.marketIncome?.values[e]?.generic?.file?.items?.length===this.patchFields.filter(i=>i.id===e&&"file"===i.type&&"remove"===i.value)?.length}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(R.e),t.rXU(R.m),t.rXU(p.ze),t.rXU(ct.D),t.rXU(F))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-manage-market-income"]],viewQuery:function(i,a){if(1&i&&t.GBs(Dt.P,5),2&i){let s;t.mGM(s=t.lsd())&&(a.fileUpload=s)}},standalone:!1,decls:3,vars:2,consts:[["datePicker",""],["fileUpload",""],[1,"mat-h1"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],[4,"ngFor","ngForOf"],["align","end",1,"save-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_S\xf6kandeprofil_Spara",3,"click","disabled"],["mat-raised-button","",1,"close-button",3,"click"],[3,"ngSwitch"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_TextGrupp",4,"ngSwitchCase"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_InkomstGrupp",4,"ngSwitchCase"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_DatumGrupp",4,"ngSwitchCase"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_Kontaktuppgiftergrupp",4,"ngSwitchCase"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_Adressuppgiftergrupp",4,"ngSwitchCase"],[4,"ngSwitchCase"],["style","margin-bottom: 15px;","data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_FilGrupp",4,"ngSwitchCase"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_TextGrupp"],[1,"form-field"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_TextLabel"],["matInput","","data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_TextF\xe4lt","autocomplete","off",3,"formControlName","maxlength","required"],[1,"hint"],[4,"ngIf"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_InkomstGrupp"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_InkomstLabel"],["matInput","","data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_InkomstF\xe4lt","autocomplete","off",3,"formControlName","maxlength","required"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_DatumGrupp"],[1,"form-field","pointer",3,"click"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_DatumLabel"],["matInput","","readonly","true","data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_DatumF\xe4lt","autocomplete","off",1,"pointer",3,"matDatepicker","formControlName","required"],["matSuffix","",3,"for"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_Kontaktuppgiftergrupp"],[2,"margin-left","15px","margin-top","10px"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_KontaktuppgifterLabel"],["matInput","","autocomplete","off",3,"formControlName","required"],["matInput","","type","email","autocomplete","off",3,"formControlName","required"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_Adressuppgiftergrupp"],["matInput","","type","number","max","20","min","0","data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5ll_L\xe4ggTill_AntalVuxna","autocomplete","off",3,"formControlName","required"],["matInput","","type","number","max","20","min","0","data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5ll_L\xe4ggTill_AntalBarn","autocomplete","off",3,"formControlName","required"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_FilGrupp",2,"margin-bottom","15px"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_FilLabel",3,"warn",4,"ngIf"],[2,"margin-top","8px"],["accept",".pdf, .jpeg, .jpg, .png, .bmp, .gif","data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_FilF\xe4lt",3,"fileLoaded","fileDeleted","inputAnyFiles","controlName","text","required"],["class","hint hint-file-upload",4,"ngIf"],["class","error-file-upload",4,"ngIf"],["data-mom-test","MinaSidor_S\xf6kandeprofil_\xc4ndra_FilLabel"],[1,"hint","hint-file-upload"],[1,"error-file-upload"]],template:function(i,a){1&i&&(t.j41(0,"h1",2),t.EFF(1),t.k0s(),t.DNE(2,Os,9,9,"form",3)),2&i&&(t.R7$(),t.JRh(a.data.fields.displayName),t.R7$(),t.Y8G("ngIf",a.incomeFormGroup))},dependencies:[u.Sq,u.bT,u.ux,u.e1,B.q,x.$z,nt.fg,S.j,S.M,S.c,S.b,S.g,V.Vh,V.bZ,V.bU,p.qT,p.me,p.Q0,p.BC,p.cb,p.YS,p.tU,p.VZ,p.zX,p.j4,p.JD,Dt.P,b.D9],styles:[".form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:25px}.pointer[_ngcontent-%COMP%]{cursor:pointer}.checkbox-label[_ngcontent-%COMP%]{white-space:initial}.checkbox-container[_ngcontent-%COMP%]{margin-top:-15px}.hint-file-upload[_ngcontent-%COMP%], .error-file-upload[_ngcontent-%COMP%]{font-size:.75rem}.close-button[_ngcontent-%COMP%]{margin-left:5px}.save-button-container[_ngcontent-%COMP%]{margin-top:20px}.error-file-upload[_ngcontent-%COMP%]{color:var(--palette-warn-500)}"]})}}return n})();function js(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(3);return t.Njj(s.createSource(s.fields.id,a.id))}),t.EFF(1),t.k0s()}if(2&n){const e=r.$implicit,i=t.XpG(3);t.AVh("full-width",i.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",e.displayName," ")}}function Ts(n,r){if(1&n&&(t.j41(0,"div",21)(1,"div",22),t.EFF(2),t.k0s(),t.j41(3,"div",23),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.label),t.R7$(2),t.JRh(a.getValue(i,e.id,null==e||null==e.generic?null:e.generic.t
1ype))}}function Fs(n,r){if(1&n&&(t.j41(0,"div",21)(1,"div",24),t.EFF(2),t.k0s(),t.j41(3,"div",25),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.JRh(null==e.generic||null==e.generic.marketIncomeMonthly?null:e.generic.marketIncomeMonthly.label),t.R7$(2),t.JRh(a.getValue(i,e.id,null==e||null==e.generic?null:e.generic.type))}}function ys(n,r){if(1&n&&(t.j41(0,"div",21)(1,"div",26),t.EFF(2),t.k0s(),t.j41(3,"div",27),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.JRh(null==e.generic||null==e.generic.date?null:e.generic.date.label),t.R7$(2),t.JRh(a.getDateValue(i,e.id,null==e||null==e.generic?null:e.generic.type))}}function Es(n,r){if(1&n&&(t.j41(0,"div",21)(1,"div",28),t.EFF(2),t.k0s(),t.nrm(3,"div",29),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.heading),t.R7$(),t.Y8G("innerText",a.getContactDetailsValues(i,e.id,null==e||null==e.generic?null:e.generic.type))}}function As(n,r){if(1&n&&(t.j41(0,"div",32)(1,"div",33),t.EFF(2),t.k0s(),t.j41(3,"div",34),t.EFF(4),t.k0s()()),2&n){const e=r.$implicit,i=t.XpG(6);t.R7$(2),t.JRh(e.fileName),t.R7$(2),t.JRh(i.formatDate(e.uploaded))}}function $s(n,r){if(1&n&&(t.j41(0,"div",21)(1,"div",30),t.EFF(2),t.k0s(),t.DNE(3,As,5,2,"div",31),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG().$implicit,a=t.XpG(3);t.R7$(2),t.JRh(null==e.generic||null==e.generic.file?null:e.generic.file.label),t.R7$(),t.Y8G("ngForOf",a.getFileItems(i,e.id,null==e||null==e.generic?null:e.generic.type))}}function Ns(n,r){if(1&n&&(t.qex(0)(1,19),t.DNE(2,Ts,5,2,"div",20)(3,Fs,5,2,"div",20)(4,ys,5,2,"div",20)(5,Es,4,2,"div",20)(6,$s,4,2,"div",20),t.bVm()()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngSwitch",null==e.generic?null:e.generic.type),t.R7$(),t.Y8G("ngSwitchCase","text"),t.R7$(),t.Y8G("ngSwitchCase","marketIncomeMonthly"),t.R7$(),t.Y8G("ngSwitchCase","date"),t.R7$(),t.Y8G("ngSwitchCase","contactDetails"),t.R7$(),t.Y8G("ngSwitchCase","file")}}function Gs(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",9)(1,"div",10),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",11)(4,"div",12),t.EFF(5),t.k0s()(),t.DNE(6,Ns,7,6,"ng-container",13),t.j41(7,"mat-card-actions",14)(8,"button",15),t.nI1(9,"translate"),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(3);return t.Njj(s.openManageMarketIncome(a))}),t.j41(10,"mat-icon",16),t.EFF(11,"edit"),t.k0s(),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.j41(14,"button",17),t.nI1(15,"translate"),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(3);return t.Njj(s.removeSource(s.fields.id,a.id))}),t.j41(16,"mat-icon",18),t.EFF(17,"delete_forever"),t.k0s(),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()}if(2&n){const e=r.$implicit,i=t.XpG(3);t.R7$(5),t.SpI(" ",i.getDisplayName(e.source)," "),t.R7$(),t.Y8G("ngForOf",i.getFields(e.source)),t.R7$(2),t.BMQ("aria-label",t.bMT(9,6,"EDITINCOME")),t.R7$(4),t.SpI(" ",t.bMT(13,8,"EDIT")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(15,10,"DELETEINCOME")),t.R7$(4),t.SpI(" ",t.bMT(19,12,"DELETE")," ")}}function Ds(n,r){if(1&n&&(t.j41(0,"div")(1,"div",5),t.DNE(2,js,2,3,"button",6),t.k0s(),t.DNE(3,Gs,20,14,"div",7),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.Y8G("ngForOf",e.fields.generic.marketIncome.sources),t.R7$(),t.Y8G("ngForOf",null==e.marketIncome?null:e.marketIncome.sources)}}function Ps(n,r){if(1&n&&(t.j41(0,"mat-card",1)(1,"mat-card-title",2),t.EFF(2),t.k0s(),t.j41(3,"mat-card-subtitle"),t.nrm(4,"taiga-markdown",3),t.nI1(5,"translate"),t.k0s(),t.j41(6,"mat-card-content"),t.DNE(7,Ds,4,2,"div",4),t.k0s()()),2&n){const e=t.XpG();t.Y8G("ngClass",e.cssClass),t.R7$(2),t.SpI(" ",e.fields.generic.marketIncome.heading," "),t.R7$(2),t.Y8G("markdown",t.bMT(5,4,"APPLICANTPROFILEINCOMEHELP")),t.R7$(3),t.Y8G("ngIf",e.fields.generic.marketIncome.sources)}}let ws=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.dialog=i,this.mediaQueryService=a,this.translate=s,this.update=new t.bkB,this.selectedChips=[],this.patchObject={generics:{}}}getFields(e){return this.fields.generic.marketIncome.sources.find(i=>i.id===e)?.fields}getDisplayName(e){return this.fields.generic.marketIncome.sources.find(i=>i.id===e)?.displayName}getValue(e,i,a){return e.values[i]?.generic?.[a]?.content??"-"}getDateValue(e,i,a){const s=e.values[i]?.generic?.[a]?.content;return s?this.formatDate(s):"-"}getContactDetailsValues(e,i,a){const s=e.values[i]?.generic?.[a],o=s.name??null,l=s.emailAddress??null,c=s.telephoneNumber??null;if(!o&&!l&&!c)return"-";{let h="";return o&&(h=`${o}\n`),l&&(h+=`${l}
1\n`),c&&(h+=`${c}`),h}}getFileItems(e,i,a){return e.values[i]?.generic?.[a]?.items}getFileNoteValue(e,i,a){return e.values[i]?.generic?.[a]?.comment?e.values[i]?.generic?.[a]?.comment:"-"}createSource(e,i){const a=w.Q.generateUniqueId();this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketIncome:{sources:{[a]:{source:i}}}}}},this.openManageMarketIncome({id:a,source:i,values:{}},!0)}removeSource(e,i){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEINCOME"),dialogChoices:$.$.YesNo},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMDELETEINCOME")}).afterClosed().subscribe(s=>{"yes"===s&&(this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketIncome:{sources:{[i]:{remove:!0}}}}}},this.patch())})}setContent(e){for(const i of e){let a,s,o;if("contactDetails"===i.type){let l=i.fieldId.split("-");s=`${i.id}-${i.source}-${l[0]}`,o=i.value,a={[s]:{[i.type]:{[l[1]]:o}}}}else s=`${i.id}-${i.source}-${i.fieldId}`,o="date"===i.type?this.formatDate(i.value):i.value,a="file"===i.type?"remove"===i.value?{[s]:{[i.type]:{items:[{id:i.fileId,remove:!0}]}}}:typeof i.comment<"u"?{[s]:{[i.type]:{comment:i.comment}}}:{[s]:{[i.type]:{items:[{id:w.Q.generateUniqueId(),content:o,fileName:i.fileName}],comment:i.comment}}}:{[s]:{[i.type]:{content:o}}};this.patchObject.generics[s]?.hasOwnProperty("contactDetails")?this.patchObject.generics[s].contactDetails={...this.patchObject.generics[s].contactDetails,...this.patchObject.generics[s].contactDetails=a[s][i.type]}:this.patchObject.generics[s]?.hasOwnProperty("file")?this.patchObject.generics[s].file.items&&a[s][i.type]?.items?this.patchObject.generics[s].file.items=this.patchObject.generics[s].file.items.concat(a[s][i.type]?.items):this.patchObject.generics[s].file={...this.patchObject.generics[s].file,...this.patchObject.generics[s].file=a[s][i.type]}:this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics=a}}this.patch()}openManageMarketIncome(e,i=!1){i||(this.patchObject.generics={...this.patchObject.generics,"-":{marketApplicant:{values:{[this.fields.id]:{confirm:!0}}}}});const a=this.fields.generic.marketIncome.sources.find(o=>o.id===e.source);this.dialog.open(Rt,{data:{fields:a,marketIncome:e},width:"400px",autoFocus:!1,maxWidth:"95vw",maxHeight:"95vh",ariaLabel:this.translate.instant("MANAGEINCOME")}).afterClosed().subscribe(o=>{if(o?.data?.fields){const l=[];for(const c of o?.data?.fields)l.push({id:this.fields.id,source:e.id,fieldId:c.id,value:c.value,type:c.type,fileName:c.fileName,comment:c.comment,fileId:c.fileId});this.setContent(l)}else this.patchObject={generics:{}}})}formatDate(e){return g()(e).format("YYYY-MM-DD")}patch(){this.marketService.patchMarketApplicantProfile(this.patchObject).subscribe(()=>{this.update.emit()}),this.patchObject={generics:{}}}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F),t.rXU(R.j),t.rXU(O.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-income-field"]],inputs:{fields:"fields",marketIncome:"marketIncome",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Rubrik"],[3,"markdown"],[4,"ngIf"],[1,"add-buttons-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Inkomstk\xe4llaKnapp",3,"full-width","click",4,"ngFor","ngForOf"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Inkomstk\xe4lla__Visa_Inkomstgrupp",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Inkomstk\xe4llaKnapp",3,"click"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Inkomstk\xe4lla__Visa_Inkomstgrupp"],[1,"divider"],[1,"header"],[1,"display-name-container"],[4,"ngFor","ngForOf"],["align","end"],["mat-stroked-button","","data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Inkomstk\xe4lla_\xc4ndraKnapp",1,"mat-elevation-z2",2,"margin-right","8px",3,"click"],["color","primary"],["mat-stroked-button","","data-mom-test","MinaSidor_S\xf6kandeprofil_Inkomst_Inkomstk\xe4lla_TaBortKnapp",1,"mat-elevation-z2",3,"click"],["color","accent"],[3,"ngSwitch"],["class","field-container",4,"ngSwitchCase"],[1,"field-container"],["data-mom-test","MinaSidor_S\xf6kandeprofil__Visa_TextLabel",1,"label"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_TextF\xe4lt"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_InkomstLabel",1,"label"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_InkomstF\xe4lt"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_DatumLabel",1,"label"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_DatumF\xe4lt"],["data-mom-test","MinaSidor_S\xf6kandeprofil__Visa_KontaktuppgifterLabel",1,"label"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_KontaktuppgifterF\xe4lt",3,"innerText"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_FilLabel",1,"label"],["class","file-list-container",4,"ngFor","ngForOf"],[1,"file-list-container"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_Filf\xe4ltNamn"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_Filf\xe4ltDatum"]],template:function(i,a){1&i&&t.DNE(0,Ps,8,6,"mat-card",0),2&i&&t.Y8G("ngIf",a.fields.generic.marketIncome)},dependencies:[u.YU,u.Sq,u.bT,u.ux,u.e1,B.q,G.An,x.$z,k.RN,k.YY,k.m2,k.Lc,k.dh,D.N,b.D9],styles:[".add-buttons-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:10px;margin-top:10px}.header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.display-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.field-container[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.divider[_ngcontent-%COMP%]{margin-top:18px}.padding-left-right-0[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.file-list-container[_ngcontent-%COMP%]{margin-bottom:8px}"]})}}return n})();var Pt=m(6471);function Vs(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-chip-option",7),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG(3);return t.Njj(a.id!==s.marketAccommodation.type&&s.createType(s.fields.id,a.id))}),t.EFF(1),t.k0s()}if(2&n){const e=r.$implicit,i=t.XpG(3);t.AVh("full-width",i.mediaQueryService.isMobile()),t.Y8G("selected",e.i
1d===i.marketAccommodation.type),t.R7$(),t.SpI(" ",e.displayName," ")}}function Ys(n,r){if(1&n&&(t.j41(0,"div",19)(1,"div",20),t.EFF(2),t.k0s(),t.j41(3,"div",21),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.text?null:e.generic.text.label),t.R7$(2),t.JRh(i.getValue(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function Xs(n,r){if(1&n&&(t.j41(0,"div",19)(1,"div",20),t.EFF(2),t.k0s(),t.j41(3,"div"),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.date?null:e.generic.date.label),t.R7$(2),t.JRh(i.getDateValue(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function Bs(n,r){if(1&n&&(t.j41(0,"div",19)(1,"div",20),t.EFF(2),t.k0s(),t.nrm(3,"div",22),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.contactDetails?null:e.generic.contactDetails.heading),t.R7$(),t.Y8G("innerText",i.getContactDetailsValues(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function Us(n,r){if(1&n&&(t.j41(0,"div",19)(1,"div",20),t.EFF(2),t.k0s(),t.nrm(3,"div",22),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.address?null:e.generic.address.label),t.R7$(),t.Y8G("innerText",i.getContactAddressValues(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function Ls(n,r){if(1&n&&(t.j41(0,"div",25)(1,"div",26),t.EFF(2),t.k0s(),t.j41(3,"div",27),t.EFF(4),t.k0s()()),2&n){const e=r.$implicit,i=t.XpG(6);t.R7$(2),t.JRh(e.fileName),t.R7$(2),t.JRh(i.formatDate(e.uploaded))}}function zs(n,r){if(1&n&&(t.j41(0,"div",19)(1,"div",23),t.EFF(2),t.k0s(),t.DNE(3,Ls,5,2,"div",24),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(4);t.R7$(2),t.JRh(null==e.generic||null==e.generic.file?null:e.generic.file.label),t.R7$(),t.Y8G("ngForOf",i.getFileItems(i.marketAccommodation,e.id,null==e||null==e.generic?null:e.generic.type))}}function Qs(n,r){if(1&n&&(t.qex(0)(1,17),t.DNE(2,Ys,5,2,"div",18)(3,Xs,5,2,"div",18)(4,Bs,4,2,"div",18)(5,Us,4,2,"div",18)(6,zs,4,2,"div",18),t.bVm()()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngSwitch",null==e.generic?null:e.generic.type),t.R7$(),t.Y8G("ngSwitchCase","text"),t.R7$(),t.Y8G("ngSwitchCase","date"),t.R7$(),t.Y8G("ngSwitchCase","contactDetails"),t.R7$(),t.Y8G("ngSwitchCase","address"),t.R7$(),t.Y8G("ngSwitchCase","file")}}function Hs(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"div",8),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",9)(4,"div",10),t.EFF(5),t.k0s()(),t.DNE(6,Qs,7,6,"ng-container",11),t.j41(7,"mat-card-actions",12)(8,"button",13),t.nI1(9,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG(3);return t.Njj(a.openManageMarketIncome(a.marketAccommodation))}),t.j41(10,"mat-icon",14),t.EFF(11,"edit"),t.k0s(),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.j41(14,"button",15),t.nI1(15,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG(3);return t.Njj(a.removeAccommodation(a.fields.id))}),t.j41(16,"mat-icon",16),t.EFF(17,"delete_forever"),t.k0s(),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()}if(2&n){const e=t.XpG(3);t.R7$(5),t.SpI(" ",e.getDisplayName(e.marketAccommodation.type)," "),t.R7$(),t.Y8G("ngForOf",e.getFields(e.marketAccommodation.type)),t.R7$(2),t.BMQ("aria-label",t.bMT(9,6,"EDITACCOMMODATION")),t.R7$(4),t.SpI(" ",t.bMT(13,8,"EDIT")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(15,10,"DELETEACCOMMODATION")),t.R7$(4),t.SpI(" ",t.bMT(19,12,"DELETE")," ")}}function qs(n,r){if(1&n&&(t.j41(0,"div")(1,"div",4)(2,"mat-chip-listbox",5),t.nI1(3,"translate"),t.DNE(4,Vs,2,4,"mat-chip-option",6),t.k0s()(),t.DNE(5,Hs,20,14,"div",3),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.BMQ("aria-label",t.bMT(3,3,"SELECTACCOMMODATION")),t.R7$(2),t.Y8G("ngForOf",e.fields.generic.marketAccommodation.types),t.R7$(),t.Y8G("ngIf",(null==e.marketAccommodation?null:e.marketAccommodation.type)&&"accommodationUnspecified"!==e.marketAccommodation.type)}}function Js(n,r){if(1&n&&(t.j41(0,"mat-card",1)(1,"mat-card-title"),t.EFF(2),t.k0s(),t.j41(3,"mat-card-subtitle"),t.nrm(4,"taiga-markdown",2),t.nI1(5,"translate"),t.k0s(),t.j41(6,"mat-card-content"),t.DNE(7,qs,6,5,"div",3),t.k0s()()),2&n){const e=t.XpG();t.Y8G("ngClass",e.cssClass),t.R7$(2),t.SpI(" ",e.fields.generic.marketAccommodation.heading," "),t.R7$(2),t.Y8G("markdown",t.bMT(5,4,"APPLICANTPROFILEACCOMMODATIONHELP")),t.R7$(3),t.Y8G("ngIf",e.fields.generic.marketAccommodation.types)}}let Ws=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.dialog=i,this.mediaQueryService=a,this.translate=s,this.update=new t.bkB,this.selectedChips=[],this.patchObject={generics:{}}}getFields(e){return this.fields.generic.marketAccommodation.types.find(i=>i.id===e)?.fields}getDisplayName(e){return this.fields.generic.marketAccommodation.types.find(i=>i.id===e)?.displayName}getValue(e,i,a){return e.values[i]?.generic?.[a]?.content??"-"}getDateValue(e,i,a){const s=e.values[i]?.generic?.[a]?.content;return s?this.formatDate(s):"-"}getContactDetailsValues(e,i,a){const s=e.values[i]?.generic?.[a],o=s.name??null,l=s.emailAddress??null,c=s.telephoneNumber??null;if(!o&&!l&&!c)return"-";{let h="";return o&&(h=`${o}\n`),l&&(h+=`${l}
1\n`),c&&(h+=`${c}`),h}}getContactAddressValues(e,i,a){const s=e.values[i]?.generic?.[a],o=s.address??null,l=s.postcode??null,c=s.city??null,h=s.country??null;if(!(o||l||c||h))return"-";{let _="";return o&&(_=`${o}\n`),l&&(_+=`${l}\n`),c&&(_+=`${c}\n`),h&&(_+=`${h}`),_}}getFileItems(e,i,a){return e.values[i]?.generic?.[a]?.items}createType(e,i){this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketAccommodation:{type:i}}}},this.openManageMarketIncome({id:e,type:i,values:{}},!0)}removeAccommodation(e){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEACCOMMODATION"),dialogChoices:$.$.YesNo},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMDELETEACCOMMODATION")}).afterClosed().subscribe(a=>{"yes"===a&&(this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[e]:{marketAccommodation:{type:null}}}},this.patch())})}setContent(e){for(const i of e){let a,s,o;if("contactDetails"===i.type||"address"===i.type){let l=i.fieldId.split("-");s=`${i.id}-${l[0]}`,o=i.value,a={[s]:{[i.type]:{[l[1]]:o}}}}else s=`${i.id}-${i.fieldId}`,o="date"===i.type?this.formatDate(i.value):i.value,a="file"===i.type?"remove"===i.value?{[s]:{[i.type]:{items:[{id:i.fileId,remove:!0}]}}}:typeof i.comment<"u"?{[s]:{[i.type]:{comment:i.comment}}}:{[s]:{[i.type]:{items:[{id:w.Q.generateUniqueId(),content:o,fileName:i.fileName}],comment:i.comment}}}:{[s]:{[i.type]:{content:o}}};this.patchObject.generics[s]?.hasOwnProperty("contactDetails")?this.patchObject.generics[s].contactDetails={...this.patchObject.generics[s].contactDetails,...this.patchObject.generics[s].contactDetails=a[s][i.type]}:this.patchObject.generics[s]?.hasOwnProperty("address")?this.patchObject.generics[s].address={...this.patchObject.generics[s].address,...this.patchObject.generics[s].address=a[s][i.type]}:this.patchObject.generics[s]?.hasOwnProperty("file")?this.patchObject.generics[s].file.items&&a[s][i.type]?.items?this.patchObject.generics[s].file.items=this.patchObject.generics[s].file.items.concat(a[s][i.type]?.items):this.patchObject.generics[s].file={...this.patchObject.generics[s].file,...this.patchObject.generics[s].file=a[s][i.type]}:this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics=a}}this.patch()}openManageMarketIncome(e,i=!1){i||(this.patchObject.generics={...this.patchObject.generics,"-":{marketApplicant:{values:{[this.fields.id]:{confirm:!0}}}}});const a=this.fields.generic.marketAccommodation.types.find(o=>o.id===e.type);this.dialog.open(Rt,{data:{fields:a,marketIncome:e},width:"400px",autoFocus:!1,maxWidth:"95vw",maxHeight:"95vh",ariaLabel:this.translate.instant("MANAGEACCOMMODATION")}).afterClosed().subscribe(o=>{if(o?.data?.fields){const l=[];for(const c of o?.data?.fields)l.push({id:this.fields.id,fieldId:c.id,value:c.value,type:c.type,fileName:c.fileName,comment:c.comment,fileId:c.fileId});this.setContent(l)}else this.patchObject={generics:{}}})}formatDate(e){return g()(e).format("YYYY-MM-DD")}patch(){this.marketService.patchMarketApplicantProfile(this.patchObject).subscribe(()=>{this.update.emit()}),this.patchObject={generics:{}}}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F),t.rXU(R.j),t.rXU(O.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-accommodation-field"]],inputs:{fields:"fields",marketAccommodation:"marketAccommodation",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"markdown"],[4,"ngIf"],[1,"chip-list-container"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Boende_Boendetyper"],["class","chip","color","primary",3,"full-width","selected","click",4,"ngFor","ngForOf"],["color","primary",1,"chip",3,"click","selected"],[1,"divider"],[1,"header"],[1,"display-name-container"],[4,"ngFor","ngForOf"],["align","end"],["mat-stroked-button","","data-mom-test","MinaSidor_S\xf6kandeprofil_Boende_\xc4ndra",1,"mat-elevation-z2",2,"margin-right","8px",3,"click"],["color","primary"],["mat-stroked-button","","data-mom-test","MinaSidor_S\xf6kandeprofil_Boende_TaBort",1,"mat-elevation-z2",3,"click"],["color","accent"],[3,"ngSwitch"],["class","field-container",4,"ngSwitchCase"],[1,"field-container"],[1,"label"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Boende_V\xe4rde"],[3,"innerText"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_FilLabel",1,"label"],["class","file-list-container",4,"ngFor","ngForOf"],[1,"file-list-container"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_Filf\xe4ltNamn"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Visa_Filf\xe4ltDatum"]],template:function(i,a){1&i&&t.DNE(0,Js,8,6,"mat-card",0),2&i&&t.Y8G("ngIf",a.fields.generic.marketAccommodation)},dependencies:[u.YU,u.Sq,u.bT,u.ux,u.e1,B.q,G.An,x.$z,k.RN,k.YY,k.m2,k.Lc,k.dh,Pt.uI,Pt.gq,D.N,b.D9],styles:[".chip-list-container[_ngcontent-%COMP%]{margin-top:18px}.header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.display-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.field-container[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.chip[_ngcontent-%COMP%]{cursor:pointer}.divider[_ngcontent-%COMP%]{margin-top:18px}.padding-left-right-0[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.file-list-container[_ngcontent-%COMP%]{margin-bottom:8px}"]})}}return n})();function Ks(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",7)(1,"button",8),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.createHouseholdMember())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.AVh("full-width",e.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",t.bMT(3,3,"ADD")," ")}}function Zs(n,r){if(1&n&&(t.j41(0,"div")(1,"div",9),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",10)(4,"div",11),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",12)(8,"div",13),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"div",14),t.EFF(12),t.k0s()(),t.j41(13,"div",12)(14,"div",13),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"div",15),t.EFF(18),t.k0s()()()),2&n){const e=t.XpG(2);
1t.R7$(5),t.SpI(" ",t.bMT(6,5,"HOUSEHOLDMEMBERS")," "),t.R7$(4),t.JRh(t.bMT(10,7,"NUMBEROFADULTS")),t.R7$(3),t.JRh(e.marketHousehold.numberOfAdults>0?e.marketHousehold.numberOfAdults:"-"),t.R7$(3),t.JRh(t.bMT(16,9,"NUMBEROFCHILDREN")),t.R7$(3),t.JRh(e.marketHousehold.numberOfChildren>0?e.marketHousehold.numberOfChildren:"-")}}function tr(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-card-actions",16)(1,"button",17),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.openManageMarketIncome(a.marketHousehold))}),t.j41(3,"mat-icon",18),t.EFF(4,"edit"),t.k0s(),t.EFF(5),t.nI1(6,"translate"),t.k0s()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,2,"EDITHOUSEHOLDMEMBERS")),t.R7$(4),t.SpI(" ",t.bMT(6,4,"EDIT")," "))}function er(n,r){if(1&n&&(t.j41(0,"mat-card",1)(1,"mat-card-title",2),t.EFF(2),t.k0s(),t.j41(3,"mat-card-subtitle"),t.nrm(4,"taiga-markdown",3),t.nI1(5,"translate"),t.k0s(),t.j41(6,"mat-card-content")(7,"div"),t.DNE(8,Ks,4,5,"div",4)(9,Zs,19,11,"div",5),t.k0s()(),t.DNE(10,tr,7,6,"mat-card-actions",6),t.k0s()),2&n){const e=t.XpG();t.Y8G("ngClass",e.cssClass),t.R7$(2),t.SpI(" ",e.fields.generic.marketHousehold.heading," "),t.R7$(2),t.Y8G("markdown",t.bMT(5,6,"APPLICANTPROFILEHOUSEHOLDHELP")),t.R7$(4),t.Y8G("ngIf",!e.marketHousehold),t.R7$(),t.Y8G("ngIf",e.marketHousehold),t.R7$(),t.Y8G("ngIf",e.marketHousehold)}}let ir=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.dialog=i,this.mediaQueryService=a,this.translate=s,this.update=new t.bkB,this.selectedChips=[],this.patchObject={generics:{}}}getFields(e){return this.fields.generic.marketHousehold.sources.find(i=>i.id===e)?.fields}getDisplayName(e){return this.fields.generic.marketHousehold.sources.find(i=>i.id===e)?.displayName}getValue(e,i,a){return e.values[i]?.generic?.[a]?.content??"-"}getDateValue(e,i,a){const s=e.values[i]?.generic?.[a]?.content;return s?this.formatDate(s):"-"}getContactDetailsValues(e,i,a){const s=e.values[i]?.generic?.[a],o=s.name??null,l=s.emailAddress??null,c=s.telephoneNumber??null;if(!o&&!l&&!c)return"-";{let h="";return o&&(h=`${o}\n`),l&&(h+=`${l}\n`),c&&(h+=`${c}`),h}}createHouseholdMember(){const e=w.Q.generateUniqueId();this.openManageMarketIncome({id:e,source:null,values:{}},!0)}removeHouseholdMember(){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEHOUSEHOLDMEMBERS"),dialogChoices:$.$.YesNo},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMDELETEHOUSEHOLDMEMBERS")}).afterClosed().subscribe(i=>{"yes"===i&&(this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={household:{marketHousehold:{numberOfAdults:0,numberOfChildren:0}}}},this.patch())})}setContent(e){this.patchObject.generics={...this.patchObject.generics,...this.patchObject.generics={[this.fields.id]:{marketHousehold:{}}}};for(const a of e){let s,o,l=a.fieldId.split("-");o=a.value,s={[l[1]]:o??0},this.patchObject.generics[this.fields.id].marketHousehold={...this.patchObject.generics[this.fields.id].marketHousehold,...this.patchObject.generics[this.fields.id].marketHousehold=s}}this.patch()}openManageMarketIncome(e,i=!1){i||(this.patchObject.generics={...this.patchObject.generics,"-":{marketApplicant:{values:{[this.fields.id]:{confirm:!0}}}}});const a={displayName:this.translate.instant("HOUSEHOLDMEMBERS"),fields:[{id:this.fields.id,generic:this.fields.generic}]};this.dialog.open(Rt,{data:{fields:a,marketIncome:{values:{[this.fields.id]:{generic:e}}}},width:"400px",autoFocus:!1,maxWidth:"95vw",maxHeight:"95vh",ariaLabel:this.translate.instant("HOUSEHOLDMEMBERS")}).afterClosed().subscribe(o=>{if(o?.data?.fields){const l=[];for(const c of o?.data?.fields)l.push({id:this.fields.id,householdMemberId:e.id,fieldId:c.id,value:c.value,type:c.type});this.setContent(l)}else this.patchObject={generics:{}}})}formatDate(e){return g()(e).format("YYYY-MM-DD")}patch(){this.marketService.patchMarketApplicantProfile(this.patchObject).subscribe(()=>{this.update.emit()}),this.patchObject={generics:{}}}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F),t.rXU(R.j),t.rXU(O.M),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-household-field"]],inputs:{fields:"fields",marketHousehold:"marketHousehold",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5ll_Rubrik"],[3,"markdown"],["class","add-button-container",4,"ngIf"],[4,"ngIf"],["align","end",4,"ngIf"],[1,"add-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5ll_L\xe4ggTill",3,"click"],[1,"divi
1der"],[1,"header"],[1,"display-name-container"],[1,"field-container"],[1,"label"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5llsmedlem_AntalVuxna"],["data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5llsmedlem_AntalBarn"],["align","end"],["mat-stroked-button","","data-mom-test","MinaSidor_S\xf6kandeprofil_Hush\xe5ll_\xc4ndra",1,"mat-elevation-z2",3,"click"],["color","primary"]],template:function(i,a){1&i&&t.DNE(0,er,11,8,"mat-card",0),2&i&&t.Y8G("ngIf",a.fields.generic.marketHousehold)},dependencies:[u.YU,u.bT,B.q,G.An,x.$z,k.RN,k.YY,k.m2,k.Lc,k.dh,D.N,b.D9],styles:[".add-button-container[_ngcontent-%COMP%]{margin-top:18px}.header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.display-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.field-container[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.chip[_ngcontent-%COMP%]{cursor:pointer}.divider[_ngcontent-%COMP%]{margin-top:18px}.padding-left-right-0[_ngcontent-%COMP%]{padding-left:0;padding-right:0}"]})}}return n})();function nr(n,r){1&n&&t.nrm(0,"div")}function ar(n,r){1&n&&t.nrm(0,"div")}function sr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",4)(1,"taiga-market-income-field",5),t.bIt("update",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.update.emit())}),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("cssClass",e.cssClass)("fields",e.fields)("marketIncome",null==e.values||null==e.values.generic?null:e.values.generic.marketIncome)}}function rr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",4)(1,"taiga-market-accommodation-field",6),t.bIt("update",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.update.emit())}),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("cssClass",e.cssClass)("fields",e.fields)("marketAccommodation",null==e.values||null==e.values.generic?null:e.values.generic.marketAccommodation)}}function or(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",4)(1,"taiga-market-household-field",7),t.bIt("update",function(){t.eBV(e);const a=t.XpG(2);return t.Njj(a.update.emit())}),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("cssClass",e.cssClass)("fields",e.fields)("marketHousehold",null==e.values||null==e.values.generic?null:e.values.generic.marketHousehold)}}function lr(n,r){if(1&n&&(t.qex(0,1),t.DNE(1,nr,1,0,"div",2)(2,ar,1,0,"div",2)(3,sr,2,3,"div",3)(4,rr,2,3,"div",3)(5,or,2,3,"div",3),t.bVm()),2&n){const e=t.XpG();
1t.Y8G("ngSwitch",e.fields.generic.type),t.R7$(),t.Y8G("ngSwitchCase","text"),t.R7$(),t.Y8G("ngSwitchCase","bool"),t.R7$(),t.Y8G("ngSwitchCase","marketIncome"),t.R7$(),t.Y8G("ngSwitchCase","marketAccommodation"),t.R7$(),t.Y8G("ngSwitchCase","marketHousehold")}}let wt=(()=>{class n{constructor(){this.update=new t.bkB}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-generic-field"]],inputs:{fields:"fields",values:"values",cssClass:"cssClass"},outputs:{update:"update"},standalone:!1,decls:1,vars:1,consts:[[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","field-container",4,"ngSwitchCase"],[1,"field-container"],[3,"update","cssClass","fields","marketIncome"],[3,"update","cssClass","fields","marketAccommodation"],[3,"update","cssClass","fields","marketHousehold"]],template:function(i,a){1&i&&t.DNE(0,lr,6,6,"ng-container",0),2&i&&t.Y8G("ngIf",a.fields)},dependencies:[u.bT,u.ux,u.e1,ws,Ws,ir],styles:[".field-container[_ngcontent-%COMP%]{margin-bottom:15px}"]})}}return n})();function cr(n,r){if(1&n){const e=t.RV6();t.qex(0),t.j41(1,"taiga-market-generic-field",3),t.bIt("update",function(){t.eBV(e);const a=t.XpG(3);return t.Njj(a.getData())}),t.k0s(),t.bVm()}if(2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(),t.Y8G("fields",e)("values",i.marketApplicantValue.values[e.id])}}function mr(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,cr,2,2,"ng-container",1),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.Y8G("ngIf",e.generic)}}function dr(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,mr,2,1,"div",2),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.marketApplicantField.fields)}}let pr=(()=>{class n{constructor(e,i,a,s,o,l){this.marketService=e,this.mediaQueryService=i,this.route=a,this.registrationService=s,this.dialog=o,this.router=l,this.registrationService.getMarketApplicantStatus().subscribe(c=>{const h=c?.queues?.filter(_=>_.active);if(h?.length>0){let _=[];for(let d of h)_.push(this.marketService.getMarketApplications(d.id).pipe((0,lt.T)(M=>{for(let C of M.items)C._queueType=d.id;return M})));(0,X.p)(_).subscribe(d=>{const M=d.map(C=>C.items.find(A=>A.active&&"form"===A.presentation.type)??null);if(h.length>1&&M?.filter(C=>null!=C)?.length>1)this.dialog.open(qa,{disableClose:!0,data:d});else{const C=M.find(A=>"form"===A?.presentation?.type);C&&this.router.navigateByUrl(`market/applications/${C._queueType}/${C.id}`)}})}})}ngOnInit(){this.route.data.subscribe(e=>{this.marketApplicantField=e?.data?.marketApplicantField,this.marketApplicantValue=e?.data?.marketApplicantValue})}getData(){this.marketService.getMarketApplicantProfileOptions().subscribe(e=>{this.marketApplicantField=e}),this.marketService.getMarketApplicantProfile().subscribe(e=>{this.marketApplicantValue=e})}unsorted(){return 0}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(F),t.rXU(O.M),t.rXU(j.nX),t.rXU(kt.f),t.rXU(R.j),t.rXU(j.Ix))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-applicant-profile"]],standalone:!1,decls:5,vars:11,consts:[[3,"text","subText"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"update","fields","values"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",0),t.nI1(2,"translate"),t.nI1(3,"translate"),t.DNE(4,dr,2,1,"div",1),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,7,"APPLICANTPROFILE"))("subText",t.bMT(3,9,"APPLICANTPROFILEHELP")),t.R7$(3),t.Y8G("ngIf",a.marketApplicantField&&a.marketApplicantValue))},dependencies:[u.Sq,u.bT,W.o,wt,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}"]})}}return n})();var Z=m(1336),ur=m(9496);let _r=(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.userMessageService=i,this.errorService=a,this.router=s}resolve(){const e=this.marketService.getMarketApplicantProfileOptions(),i=this.marketService.getMarketApplicantProfile();return(0,X.p)({marketApplicantField:e,marketApplicantValue:i}).pipe((0,U.W)(a=>{const s=this.errorService.parseError(a);return this.userMessageService.errorWithHeader(s.message,"",s.displayErrorReportNumber?s.errorReportNumber:""),this.router.navigateByUrl("/"),(0,K.of)(null)}))}static{this.\u0275fac=function(i){return new(i||n)(t.KVO(F),t.KVO(z.z),t.
1KVO(ot.I),t.KVO(j.Ix))}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const hr=n=>({invalidChars:n}),gr=n=>({item:n});function fr(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(": ",e.sizeRoomsMin," - ",e.sizeRoomsMax,"")}}function br(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend"),t.EFF(3),t.nI1(4,"translate"),t.DNE(5,fr,2,2,"span",5),t.k0s(),t.j41(6,"div",14)(7,"label",15),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",16),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",17)(12,"input",18),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.sizeRoomsMin,a)||(s.sizeRoomsMin=a),t.Njj(a)}),t.k0s(),t.j41(13,"input",19),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.sizeRoomsMax,a)||(s.sizeRoomsMax=a),t.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(3),t.JRh(t.bMT(4,6,"NUMBEROFROOMS")),t.R7$(2),t.Y8G("ngIf",e.sizeRoomsMax||e.sizeRoomsMin),t.R7$(6),t.Y8G("min",null==e.data||null==e.data.type?null:e.data.type.minNumberOfRooms)("max",null==e.data||null==e.data.type?null:e.data.type.maxNumberOfRooms),t.R7$(),t.R50("ngModel",e.sizeRoomsMin),t.R7$(),t.R50("ngModel",e.sizeRoomsMax)}}function kr(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(": ",e.sizeAreaMin," - ",e.sizeAreaMax," kvm")}}function Mr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend"),t.EFF(3),t.nI1(4,"translate"),t.DNE(5,kr,2,2,"span",5),t.k0s(),t.j41(6,"div",14)(7,"label",20),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",21),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",22)(12,"input",23),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.sizeAreaMin,a)||(s.sizeAreaMin=a),t.Njj(a)}),t.k0s(),t.j41(13,"input",24),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.sizeAreaMax,a)||(s.sizeAreaMax=a),t.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(3),t.SpI("",t.bMT(4,7,"SIZESQM")," "),t.R7$(2),t.Y8G("ngIf",e.sizeAreaMin||e.sizeAreaMax),t.R7$(6),t.Y8G("step",10)("min",null==e.data||null==e.data.type?null:e.data.type.minSize)("max",null==e.data||null==e.data.type?null:e.data.type.maxSize),t.R7$(),t.R50("ngModel",e.sizeAreaMin),t.R7$(),t.R50("ngModel",e.sizeAreaMax)}}function vr(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.Lme(": ",e.priceMin," - ",e.priceMax,":-")}}function Rr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"fieldset")(2,"legend"),t.EFF(3),t.nI1(4,"translate"),t.DNE(5,vr,2,2,"span",5),t.k0s(),t.j41(6,"div",14)(7,"label",25),t.EFF(8,"Min"),t.k0s(),t.j41(9,"label",26),t.EFF(10,"Max"),t.k0s()(),t.j41(11,"mat-slider",22)(12,"input",27),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.priceMin,a)||(s.priceMin=a),t.Njj(a)}),t.k0s(),t.j41(13,"input",28),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.priceMax,a)||(s.priceMax=a),t.Njj(a)}),t.k0s()()()()}if(2&n){const e=t.XpG();t.R7$(3),t.SpI("",t.bMT(4,7,"PRICE")," "),t.R7$(2),t.Y8G("ngIf",e.priceMin||e.priceMax),t.R7$(6),t.Y8G("step",(null==e.data||null==e.data.type?null:e.data.type.maxPrice)>2e3?1e3:100)("min",null==e.data||null==e.data.type?null:e.data.type.minPrice)("max",null==e.data||null==e.data.type?null:e.data.type.maxPrice),t.R7$(),t.R50("ngModel",e.priceMin),t.R7$(),t.R50("ngModel",e.priceMax)}}function Ir(n,r){if(1&n&&(t.j41(0,"mat-option",31),t.EFF(1),t.k0s()),2&n){const e=r.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function Cr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-select",29),t.mxI("ngModelChange",function(a){t.eBV(e);const s=t.XpG();return t.DH7(s.areas,a)||(s.areas=a),t.Njj(a)}),t.DNE(6,Ir,2,2,"mat-option",30),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(3),t.JRh(t.bMT(4,3,"DISTRICT")),t.R7$(2),t.R50("ngModel",e.areas),t.R7$(),t.Y8G("ngForOf",null==e.data||null==e.data.areas?null:e.data.areas.items)}}function Sr(n,r){if(1&n&&(t.j41(0,"mat-option",36),t.EFF(1),t.k0s()),2&n){const e=r.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.displayName," ")}}function xr(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-form-field",33)(1,"mat-label"),t.EFF(2),t.k0s(),t.j41(3,"mat-select",34),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].values,a)||(o.data.attributesModels[s.type].values=a),t.Njj(a)}),t.DNE(4,Sr,2,2,"mat-option",35),t.k0s()()}if(2&n){const e=r.$implicit,i=t.XpG(2);t.R7$(2),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",i.data.attributesModels[e.type].values),t.Y8G("name",e.type),t.R7$(),t.Y8G("ngForOf",e.alternatives)}}function Or(n,r){if(1&n&&(t.j41(0,"div"),t.DNE(1,xr,5,4,"mat-form-field",32),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.data.attributesAlternatives)}}function jr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-form-field")(2,"mat-label"),t.EFF(3),t.k0s(),t.j41(4,"input",39,1),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].value,a)||(o.data.attributesModels[s.type].value=a),t.Njj(a)}),t.k0s(),t.j41(6,"mat-error"),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()}if(2&n){const e=r.$implicit,i=t.sdS(5),a=t.XpG(2);t.R7$(3),t.JRh(e.typeDisplayName),t.R7$(),t.R50("ngModel",a.data.attributesModels[e.type].value),t.Y8G("name",e.type),t.R7$(3),t.JRh(t.i5U(8,4,"INVALIDCHARACTERS",t.eq3(7,hr,null==i.errors||null==i.errors.allowedCharacters?null:i.errors.allowedCharacters.invalidChars)))}}function Tr(n,r){if(1&n&&(t.j41(0,"div",37),t.DNE(1,jr,9,9,"div",38),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.data.attributesTexts)}}function Fr(n,r){if(1&n){const e=t.RV6();t.qex(0),t.j41(1,"div",41)(2,"mat-label"),t.EFF(3),t.k0s()(),t.j41(4,"div")(5,"mat-form-field")(6,"mat-label"),t.EFF(7,"Min"),t.k0s(),t.j41(8,"input",42),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].minValue,a)||(o.data.attributesModels[s.type].minValue=a),t.Njj(a)}),t.k0s(),t.j41(9,"mat-error"),t.EFF(10),t.nI1(11,"translate"),t.k0s()(),t.j41(12,"span",43),t.EFF(13,"-"),t.k0s(),t.j41(14,"mat-form-field")(15,"mat-label"),t.EFF(16,"Max"),t.k0s(),t.j41(17,"input",44),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].maxValue,a)||(o.data.attributesModels[s.type].maxValue=a),t.Njj(a)}),t.k0s(),t.j41(18,"mat-error"),t.EFF(19),t.nI1(20,"translate"),t.k0s()()(),t.bVm()}if(2&n){let e;const i=r.$implicit,a=t.XpG(2);t.R7$(3),t.JRh(i.typeDisplayName),t.R7$(5),t.Y8G("max",a.data.attributesModels[i.type].maxValue),t.R50("ngModel",a.data.attributesModels[i.type].minValue),t.Y8G("name",i.type+"Min"),t.R7$(2),t.JRh(t.bMT(11,9,"CANNOTBEMORETHANMAX")),t.R7$(7),t.Y8G("min",null!==(e=a.data.attributesModels[i.type].minValue)&&void 0!==e?e:1),t.R50("ngModel",a.data.attributesModels[i.type].maxValue),t.Y8G("name",i.type+"Max"),t.R7$(2),t.JRh(t.bMT(20,11,"CANNOTBELESSTHANMIN"))}}function yr(n,r){if(1&n&&(t.j41(0,"div",40),t.DNE(1,Fr,21,13,"ng-container",38),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.data.attributesNumbers)}}function Er(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",51),t.nI1(1,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG(2);return s.data.attributesModels[a.type].minValue="",t.Njj(s.data.attributesModels[a.type].maxValue="")}
1),t.j41(2,"mat-icon"),t.EFF(3,"cancel"),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.BMQ("aria-label",t.i5U(1,1,"RESETITEM",t.eq3(4,gr,e.typeDisplayName)))}}function Ar(n,r){if(1&n){const e=t.RV6();t.qex(0),t.j41(1,"div",41)(2,"mat-label"),t.EFF(3),t.k0s(),t.DNE(4,Er,4,6,"button",46),t.k0s(),t.j41(5,"div")(6,"mat-form-field",47),t.bIt("click",function(){t.eBV(e);const a=t.sdS(13);return t.Njj(a.open())}),t.j41(7,"mat-label"),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.j41(10,"input",48),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].minValue,a)||(o.data.attributesModels[s.type].minValue=a),t.Njj(a)}),t.k0s(),t.nrm(11,"mat-datepicker-toggle",49)(12,"mat-datepicker",null,2),t.k0s(),t.j41(14,"span",43),t.EFF(15,"-"),t.k0s(),t.j41(16,"mat-form-field",47),t.bIt("click",function(){t.eBV(e);const a=t.sdS(23);return t.Njj(a.open())}),t.j41(17,"mat-label"),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"input",50),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].maxValue,a)||(o.data.attributesModels[s.type].maxValue=a),t.Njj(a)}),t.k0s(),t.nrm(21,"mat-datepicker-toggle",49)(22,"mat-datepicker",null,3),t.k0s()(),t.bVm()}if(2&n){let e;const i=r.$implicit,a=t.sdS(13),s=t.sdS(23),o=t.XpG(2);t.R7$(3),t.JRh(i.typeDisplayName),t.R7$(),t.Y8G("ngIf",o.data.attributesModels[i.type].minValue||o.data.attributesModels[i.type].maxValue),t.R7$(4),t.JRh(t.bMT(9,14,"FROM")),t.R7$(2),t.Y8G("matDatepicker",a),t.R50("ngModel",o.data.attributesModels[i.type].minValue),t.Y8G("name",i.type+"Min")("max",o.data.attributesModels[i.type].maxValue),t.R7$(),t.Y8G("for",a),t.R7$(7),t.JRh(t.bMT(19,16,"TO")),t.R7$(2),t.Y8G("matDatepicker",s),t.R50("ngModel",o.data.attributesModels[i.type].maxValue),t.Y8G("name",i.type+"Max")("min",null!==(e=o.data.attributesModels[i.type].minValue)&&void 0!==e?e:1),t.R7$(),t.Y8G("for",s)}}function $r(n,r){if(1&n&&(t.j41(0,"div",45),t.DNE(1,Ar,24,18,"ng-container",38),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.data.attributesDates)}}function Nr(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"mat-checkbox",53),t.mxI("ngModelChange",function(a){const s=t.eBV(e).$implicit,o=t.XpG(2);return t.DH7(o.data.attributesModels[s.type].value,a)||(o.data.attributesModels[s.type].value=a),t.Njj(a)}),t.EFF(2),t.k0s()()}if(2&n){const e=r.$implicit,i=t.XpG(2);t.R7$(),t.R50("ngModel",i.data.attributesModels[e.type].value),t.Y8G("name",e.type),t.R7$(),t.SpI(" ",e.typeDisplayName," ")}}function Gr(n,r){if(1&n&&(t.j41(0,"div",52),t.DNE(1,Nr,3,3,"div",38),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.data.attributesBools)}}let Dr=(()=>{class n{constructor(e,i,a){this.data=e,this.dialogRef=i,this.adapter=a,this.areas=[],this.marketSubscriptionsPutAttributes=[],this.adapter.setLocale("sv"),this.setValues()}formatLabel(e){return e>=1e3?Math.round(e/1e3)+"k":e}setValues(){if(this.sizeRoomsMin=this.data.marketSubscriptionsListItem?.sizeRoomsMin,this.sizeRoomsMax=this.data.marketSubscriptionsListItem?.sizeRoomsMax,this.sizeAreaMin=this.data.marketSubscriptionsListItem?.sizeAreaMin,this.sizeAreaMax=this.data.marketSubscriptionsListItem?.sizeAreaMax,this.priceMin=this.data.marketSubscriptionsListItem?.priceMin,this.priceMax=this.data.marketSubscriptionsListItem?.priceMax,this.data?.marketSubscriptionsListItem?.areas.length>0)for(const e of this.data.marketSubscriptionsListItem.areas)this.areas.push(e.id);if(this.data.marketSubscriptionsListItem?.attributes?.length>0){console.log(this.data.marketSubscriptionsListItem.attributes);for(const e of this.data.marketSubscriptionsListItem.attributes){if(e.isAlternative){const i=[];for(const a of e.alternatives)i.push(a.type);this.data.attributesModels[e.type].values=i}if(e.isBool&&(this.data.attributesModels[e.type].value="True"===e.value),e.isDate){const i=e.value.split(";"),a=i[0]?new Date(i[0]):null,s=i[1]?new Date(i[1]):null;this.data.attributesModels[e.type].minValue=a,this.data.attributesModels[e.type].maxValue=s}if(e.IsText&&(this.data.attributesModels[e.type].value=e.value),e.isNumber&&e.value){const i=e.value.split(";"),s=i[1]?+i[1]:null;this.data.attributesModels[e.type].minValue=i[0]?+i[0]:null,this.data.attributesModels[e.type].maxValue=s}}}this.sizeRoomsMin=this.sizeRoomsMin?this.sizeRoomsMin:this.data?.type?.minNumberOfRooms?+this.data.type.minNumberOfRooms:0,this.sizeRoomsMax=this.sizeRoomsMax?this.sizeRoomsMax:+this.data?.type?.maxNumberOfRooms,this.sizeAreaMin=this.sizeAreaMin?this.sizeAreaMin:this.data?.type?.minSize?+this.data.type.minSize:0,this.sizeAreaMax=this.sizeAreaMax?this.sizeAreaMax:+this.data?.type?.maxSize,this.priceMin=this.priceMin?this.priceMin:this.data?.type?.minPrice?+this.data.type.minPrice:0,this.priceMax=this.priceMax?this.priceMax:+this.data?.type?.maxPrice}
1save(){Object.keys(this.data.attributesModels).forEach(c=>{switch(this.data.attributesModels[c].type){case"isAlternative":this.data.attributesModels[c].values?.length>0&&this.marketSubscriptionsPutAttributes.push({type:c,isNumber:!1,isText:!1,isDate:!1,isBool:!1,isAlternative:!0,value:this.data.attributesModels[c].values.join(";")});break;case"isBool":!0===this.data.attributesModels[c].value&&this.marketSubscriptionsPutAttributes.push({type:c,isNumber:!1,isText:!1,isDate:!1,isBool:!0,isAlternative:!1,value:this.data.attributesModels[c].value.toString().toLowerCase()});break;case"isDate":if("object"==typeof this.data.attributesModels[c].minValue||"object"==typeof this.data.attributesModels[c].maxValue){const h=this.data.attributesModels[c].minValue?g()(this.data.attributesModels[c].minValue).format("YYYY-MM-DD"):null,_=this.data.attributesModels[c].maxValue?g()(this.data.attributesModels[c].maxValue).format("YYYY-MM-DD"):null;this.marketSubscriptionsPutAttributes.push({type:c,isNumber:!1,isText:!1,isDate:!0,isBool:!1,isAlternative:!1,value:h+";"+_})}break;case"isNumber":"number"!=typeof this.data.attributesModels[c].minValue&&"number"!=typeof this.data.attributesModels[c].maxValue||this.marketSubscriptionsPutAttributes.push({type:c,isNumber:!0,isText:!1,isDate:!1,isBool:!1,isAlternative:!1,value:(this.data.attributesModels[c].minValue?this.data.attributesModels[c].minValue:null)+";"+(this.data.attributesModels[c].maxValue?this.data.attributesModels[c].maxValue:null)});break;case"isText":this.data.attributesModels[c].value&&""!==this.data.attributesModels[c].value&&this.marketSubscriptionsPutAttributes.push({type:c,isNumber:!1,isText:!0,isDate:!1,isBool:!1,isAlternative:!1,value:this.data.attributesModels[c].value})}});const e=this.sizeRoomsMin&&+this.sizeRoomsMin!=+this.data?.type?.minNumberOfRooms?+this.sizeRoomsMin:void 0,i=this.sizeRoomsMax&&+this.sizeRoomsMax!=+this.data?.type?.maxNumberOfRooms?+this.sizeRoomsMax:void 0,a=this.sizeAreaMin&&+this.sizeAreaMin!=+this.data?.type?.minSize?+this.sizeAreaMin:void 0,s=this.sizeAreaMax&&+this.sizeAreaMax!=+this.data?.type?.maxSize?+this.sizeAreaMax:void 0,o=this.priceMin&&+this.priceMin!=+this.data?.type?.minPrice?+this.priceMin:void 0,l=this.priceMax&&+this.priceMax!=+this.data?.type?.maxPrice?+this.priceMax:void 0;this.dialogRef.close({id:this.data.marketSubscriptionsListItem?.id,sizeRoomsMin:e,sizeRoomsMax:i,sizeAreaMin:a,sizeAreaMax:s,priceMin:o,priceMax:l,areas:this.areas??void 0,marketSubscriptionsPutAttributes:this.marketSubscriptionsPutAttributes?.length>0?this.marketSubscriptionsPutAttributes:null})}close(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(R.e),t.rXU(R.m),t.rXU(ct.D))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-manage-market-subscription"]],standalone:!1,decls:22,vars:17,consts:[["form","ngForm"],["attrModel","ngModel"],["fomPicker",""],["tomPicker",""],[1,"mat-h1"],[4,"ngIf"],[1,"selects"],["class","inputs",4,"ngIf"],["class","input-ranges",4,"ngIf"],["class","dates",4,"ngIf"],["class","checkboxes",4,"ngIf"],["align","end"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Bevakningar_NyBevakning_Spara",1,"close-button",3,"click","disabled"],["mat-raised-button","",1,"close-button",3,"click"],[1,"group-labels-container"],["for","sizeRoomsMin"],["for","sizeRoomsMax"],["color","primary","ngDefaultControl","",3,"min","max"],["id","sizeRoomsMin","matSliderStartThumb","","name","sizeRoomsMin","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeRoomsMin",3,"ngModelChange","ngModel"],["id","sizeRoomsMax","matSliderEndThumb","","name","sizeRoomsMax","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeRoomsMax",3,"ngModelChange","ngModel"],["for","sizeAreaMin"],["for","sizeAreaMax"],["color","primary","ngDefaultControl","",3,"step","min","max"],["id","sizeAreaMin","matSliderStartThumb","","name","sizeAreaMin","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeAreaMin",3,"ngModelChange","ngModel"],["id","sizeAreaMax","matSliderEndThumb","","name","sizeAreaMax","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_SizeAreaMax",3,"ngModelChange","ngModel"],["for","priceMin"],["for","priceMax"],["id","priceMin","matSliderStartThumb","","name","priceMin","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PriceMin",3,"ngModelChange","ngModel"],["id","priceMax","matSliderEndThumb","","name","priceMax","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PriceMax",3,"ngModelChange","ngModel"],["multiple","","name","areas","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_Area",3,"ngModelChange","ngModel"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_AreaAlternative",3,"value",4,"ngFor","ngForOf"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_AreaAlternative",3,"value"],["ngDefaultControl","",4,"ngFor","ngForOf"],["ngDefaultControl",""],["multiple","","ngDefaultControl","","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyAlternativeType",3,"ngModelChange","ngModel","name"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyAlternativeTypeAlternative",3,"value",4,"ngFor","ngForOf"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyAlternativeTypeAlternative",3,"value"],[1,"inputs"],[4,"ngFor","ngForOf"],["matInput","","taigaAllowedCharacters","","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyTextType",3,"ngModelChange","ngModel","name"],[1,"input-ranges"],[2,"display","flex","justify-content","space-between","height","40px"],["matInput","","type","number","min","1","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyNumberMinType",3,"ngModelChange","max","ngModel","name"],[1,"hyphen"],["matInput","","type","number","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyNumberMaxType",3,"ngModelChange","min","ngModel","name"],[1,"dates"],["mat-icon-button","","color","primary",3,"click",4,"ngIf"],[3,"click"],["matInput","","readonly","true","min","1","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyDateMinType",3,"ngModelChange","matDatepicker","ngModel","name","max"],["matIconSuffix","",3,"for"],["matInput","","readonly","true","autocomplete","off","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyDateMaxType",3,"ngModelChange","matDatepicker","ngModel","name","min"],["mat-icon-button","","color","primary",3,"click"],[1,"checkboxes"],["color","primary","data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_PropertyBoolType",1,"checkbox",3,"ngModelChange","ngModel","name"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"h1",4),t.EFF(1),t.k0s(),t.j41(2,"form",null,0)(4,"div"),t.DNE(5,br,14,8,"div",5)(6,Mr,14,9,"div",5)(7,Rr,14,9,"div",5),t.j41(8,"div",6),t.DNE(9,Cr,7,5,"div",5)(10,Or,2,1,"div",5),t.k0s(),t.DNE(11,Tr,2,1,"div",7),t.k0s(),t.DNE(12,yr,2,1,"div",8)(13,$r,2,1,"div",9)(14,Gr,2,1,"div",10),t.j41(15,"div",11)(16,"button",12),t.bIt("click",function(){return t.eBV(s),t.Njj(a.save())}),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"button",13),t.bIt("click",function(){return t.eBV(s),t.Njj(a.close())}),t.EFF(20),t.nI1(21,"translate"),t.k0s()()()}if(2&i){const s=t.sdS(3);t.R7$(),t.JRh(null==a.data||null==a.data.item?null:a.data.item.displayName),t.R7$(4),t.Y8G("ngIf",null==a.data||null==a.data.settings?null:a.data.settings.numberOfRoomsMin),t.R7$(),t.Y8G("ngIf",null==a.data||null==a.data.settings?null:a.data.settings.areaMin),t.R7$(),t.Y8G("ngIf",null==a.data||null==a.data.settings?null:a.data.settings.priceMax),t.R7$(2),t.Y8G("ngIf",(null==a.data||null==a.data.settings?null:a.data.settings.areas)&&(null==a.data||null==a.data.areas||null==a.data.areas.items?null:a.data.areas.items.length)>0),t.R7$(),t.Y8G("ngIf",(null==a.data||null==a.data.attributesAlternatives?null:a.data.attributesAlternatives.length)>0),t.R7$(),t.Y8G("ngIf",(null==a.data||null==a.data.attributesTexts?null:a.data.attributesTexts.length)>0),t.R7$(),t.Y8G("ngIf",(null==a.data||null==a.data.attributesNumbers?null:a.data.attributesNumbers.length)>0),t.R7$(),t.Y8G("ngIf",(null==a.data||null==a.data.attributesDates?null:a.data.attributesDates.length)>0),t.R7$(),t.Y8G("ngIf",(null==a.data||null==a.data.attributesBools?null:a.data.attributesBools.length)>0),t.R7$(2),t.Y8G("disabled",!(null!=s&&s.valid)),t.R7$(),t.JRh(t.bMT(18,13,"SAVE")),t.R7$(3),t.JRh(t.bMT(21,15,"CANCEL"))}},dependencies:[u.Sq,u.bT,G.An,x.$z,it.M,nt.fg,S.j,S.M,S.b,S.g,V.Vh,V.bZ,V.bU,mt.g,dt.M,pt.So,p.qT,p.me,p.Q0,p.BC,p.cb,p.VZ,p.zX,p.vS,p.cV,ut.S,jt,gt,b.D9],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}mat-slider[_ngcontent-%COMP%]{width:94%}.close-button[_ngcontent-%COMP%]{margin-left:8px}.dates[_ngcontent-%COMP%]   div[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hyphen[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;margin-bottom:10px}.dates[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%], .input-ranges[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{margin-bottom:8px}fieldset[_ngcontent-%COMP%]{border:none;padding:0}legend[_ngcontent-%COMP%]{padding:0}.group-labels-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:8px}"],changeDetection:0})}}return n})();function Pr(n,r){if(1&n){const e=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.openManageMarketSubscription(a.id))}),t.EFF(1),t.k0s()}if(2&n){const e=r.$implicit,i=t.XpG();t.AVh("full-width",i.mediaQueryService.isMobile()),t.R7$(),t.SpI(" ",null==e?null:e.displayName," ")}}function wr(n,r){1&n&&(t.j41(0,"div",23),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"NUMBEROFROOMS")," "))}function Vr(n,r){if(1&n&&(t.j41(0,"ng-contaienr",24),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.SpI("min ",null==e?null:e.sizeRoomsMin," ")}}function Yr(n,r){if(1&n&&(t.j41(0,"ng-contaienr",25),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.SpI("max ",null==e?null:e.sizeRoomsMax,"")}}function Xr(n,r){if(1&n&&(t.j41(0,"ng-contaienr",28),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("min ",null==e?null:e.sizeAreaMin," ")}}function Br(n,r){if(1&n&&(t.j41(0,"ng-contaienr",29),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("max ",null==e?null:e.sizeAreaMax,"")}}function Ur(n,r){if(1&n&&(t.j41(0,"div",16)(1,"div",23),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",18),t.DNE(5,Xr,2,1,"ng-contaienr",26)(6,Br,2,1,"ng-contaienr",27),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,3,"SIZESQM")," "),t.R7$(3),t.Y8G("ngIf",null==e?null:e.sizeAreaMin),t.R7$(),t.Y8G("ngIf",null==e?null:e.sizeAreaMax)}}function Lr(n,r){if(1&n&&(t.j41(0,"ng-contaienr",32),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("min ",null==e?null:e.priceMin," ")}}function zr(n,r){if(1&n&&(t.j41(0,"ng-contaienr",33),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3).$implicit;t.R7$(),t.SpI("max ",null==e?null:e.priceMax,"")}}function Qr(n,r){if(1&n&&(t.j41(0,"div",16)(1,"div",23),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",18),t.DNE(5,Lr,2,1,"ng-contaienr",30)(6,zr,2,1,"ng-contaienr",31),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,3,"PRICE")," "),t.R7$(3),t.Y8G("ngIf",null==e?null:e.priceMin),t.R7$(),t.Y8G("ngIf",null==e?null:e.priceMax)}}function Hr(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(", ",e.parentDisplayName,"")}}function qr(n,r){if(1&n&&(t.j41(0,"div",35),t.EFF(1),t.DNE(2,Hr,2,1,"span",9),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.SpI(" ",e.displayName,""),t.R7$(),t.Y8G("ngIf",e.parentDisplayName)}}function Jr(n,r){if(1&n&&(t.j41(0,"div",16)(1,"div",23),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",18),t.DNE(5,qr,3,2,"div",34),t.k0s()()),2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.SpI(" ",t.bMT(3,2,"DISTRICT")," "),t.R7$(3),t.Y8G("ngForOf",e.areas)}}function Wr(n,r){1&n&&(t.qex(0),t.EFF(1),t.nI1(2,"translate"),t.bVm()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"YES")," "))}function Kr(n,r){1&n&&(t.qex(0),t.EFF(1),t.nI1(2,"translate"),t.bVm()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"NO")," "))}function Zr(n,r){if(1&n&&(t.j41(0,"span",41),t.DNE(1,Wr,3,3,"ng-container",9)(2,Kr,3,3,"ng-container",9),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngIf","true"===(null==e.value?null:e.value.toLowerCase())),t.R7$(),t.Y8G("ngIf","false"===(null==e.value?null:e.value.toLowerCase()))}}function to(n,r){if(1&n&&(t.j41(0,"div",42),t.EFF(1),t.k0s()),2&n){const e=r.$implicit;t.R7$(),t.SpI(" ",e.value," ")}}function eo(n,r){if(1&n&&(t.j41(0,"div",43),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(3);t.R7$(),t.SpI(" ",i.formatAttributeDateString(e.value)," ")}}function io(n,r){if(1&n&&(t.j41(0,"div",44),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(3);t.R7$(),t.SpI(" ",i.formatAttributeNumberString(e.value)," ")}}function no(n,r){if(1&n&&(t.j41(0,"div",45),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.value," ")}}function ao(n,r){if(1&n&&(t.j41(0,"div",16)(1,"div",23),t.EFF(2),t.k0s(),t.j41(3,"div",18),t.DNE(4,Zr,3,2,"span",36)(5,to,2,1,"div",37)(6,eo,2,1,"div",38)(7,io,2,1,"div",39)(8,no,2,1,"div",40),t.k0s()()),2&n){const e=r.$implicit;t.R7$(2),t.SpI(" ",e.displayName," "),t.R7$(2),t.Y8G("ngIf",e.isBool),t.R7$(),t.Y8G("ngForOf",e.alternatives),t.R7$(),t.Y8G("ngIf",e.isDate),t.R7$(),t.Y8G("ngIf",e.isNumber),t.R7$(),t.Y8G("ngIf",e.IsText)}}function so(n,r){if(1&n&&(t.j41(0,"div",15)(1,"div",16),t.DNE(2,wr,3,3,"div",17),t.j41(3,"div",18),t.DNE(4,Vr,2,1,"ng-contaienr",19)(5,Yr,2,1,"ng-contaienr",20),t.k0s()(),t.DNE(6,Ur,7,5,"div",21)(7,Qr,7,5,"div",21)(8,Jr,6,4,"div",21)(9,ao,9,6,"div",22),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.Y8G("ngIf",(null==e?null:e.sizeRoomsMin)||(null==e?null:e.sizeRoomsMax)),t.R7$(2),t.Y8G("ngIf",null==e?null:e.sizeRoomsMin),t.R7$(),t.Y8G("ngIf",null==e?null:e.sizeRoomsMax),t.R7$(),t.Y8G("ngIf",(null==e?null:e.sizeAreaMin)||(null==e?null:e.sizeAreaMax)),t.R7$(),t.Y8G("ngIf",(null==e?null:e.priceMax)||(null==e?null:e.priceMin)),t.R7$(),t.Y8G("ngIf",(null==e||null==e.areas?null:e.areas.length)>0),t.R7$(),t.Y8G("ngForOf",e.attributes)}}function ro(n,r){1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"MARKETSUBSCRIBEALL")," "))}function oo(n,r){if(1&n){const e=t.RV6();t.j41(0,"mat-card",1)(1,"mat-card-content"),t.qex(2),t.j41(3,"div",6)(4,"div",7),t.EFF(5),t.k0s()(),t.DNE(6,so,10,7,"div",8)(7,ro,3,3,"div",9),t.bVm(),t.k0s(),t.j41(8,"mat-card-actions",10)(9,"button",11),t.nI1(10,"translate"),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.openManageMarketSubscription(a.marketObjectType,a))}),t.j41(11,"mat-icon",12),t.EFF(12,"edit"),t.k0s(),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"button",13),t.nI1(16,"translate"),t.bIt("click",function(){const a=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.deleteMarketSubscriptions(a.id))}),t.j41(17,"mat-icon",14),t.EFF(18,"delete_forever"),t.k0s(),t.EFF(19),t.nI1(20,"translate"),t.k0s()()()}if(2&n){const e=r.$implicit,i=t.XpG();t.R7$(5),t.SpI(" ",i.getMarketSubscriptionDisplayName(e.marketObjectType)," "),t.R7$(),t.Y8G("ngIf",i.hasSubscriptionDetail
1s(e)),t.R7$(),t.Y8G("ngIf",!i.hasSubscriptionDetails(e)),t.R7$(2),t.BMQ("aria-label",t.bMT(10,7,"EDITMARKETSUBSCRIPTION")),t.R7$(4),t.SpI(" ",t.bMT(14,9,"EDIT")," "),t.R7$(2),t.BMQ("aria-label",t.bMT(16,11,"DELETEMARKETSUBSCRIPTION")),t.R7$(4),t.SpI(" ",t.bMT(20,13,"DELETE")," ")}}let lo=(()=>{class n{constructor(e,i,a,s,o){this.mediaQueryService=e,this.marketService=i,this.clientConfigurationService=a,this.dialog=s,this.translate=o,this.attributesModels={}}ngOnInit(){this.getMarketSubscriptions(),this.getMarketSubscriptionsMarketObjectsTypes()}getMarketSubscriptions(){this.marketService.getMarketSubscriptions().subscribe(e=>{this.marketSubscriptions=e})}deleteMarketSubscriptions(e){this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMDELETEMARKETSUBSCRIPTION"),dialogChoices:$.$.YesNo},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMDELETEMARKETSUBSCRIPTION")}).afterClosed().subscribe(a=>{"yes"===a&&this.marketService.deleteMarketSubscriptions(e).subscribe(()=>{this.getMarketSubscriptions()})})}openManageMarketSubscription(e,i){const a=this.marketSubscriptionsMarketObjectsTypes.items.find(s=>s.id===e);this.marketSubscriptionsMarketObjectsTypes.items.find(s=>s.id===a.id),this.attributesAlternatives=null,this.attributesBools=null,this.attributesDates=null,this.attributesNumbers=null,this.attributesTexts=null,this.attributesModels={},this.clientConfigurationService.getClientConfigurationFeatures().pipe((0,I.H)(s=>(0,X.p)([this.marketService.getMarketObjectsTypesItemSubscriptionsSetting(a.id),s?.areaUseGeographicRentalArea?.enabled?this.marketService.getMarketObjectsTypesAreas(a.id):this.marketService.getMarketObjectsAreas(),this.marketService.getMarketObjectsTypesItem(a.id)]))).subscribe(s=>{const o=s[0],l=s[1],c=s[2],h=s[2]?.attributes?.filter(d=>d.canHaveFilter);h?.length>0&&(this.attributesAlternatives=h.filter(d=>d.isAlternative&&d.alternatives.filter(M=>M.id)?.length>0),this.buildAttributeModels(this.attributesAlternatives,"isAlternative"),this.attributesBools=h.filter(d=>d.isBool),this.buildAttributeModels(this.attributesBools,"isBool"),this.attributesDates=h.filter(d=>d.isDate),this.buildAttributeModels(this.attributesDates,"isDate"),this.attributesNumbers=h.filter(d=>d.isNumber),this.buildAttributeModels(this.attributesNumbers,"isNumber"),this.attributesTexts=h.filter(d=>d.isText),this.buildAttributeModels(this.attributesTexts,"isText"),this.setAttributeModelsValues()),this.dialog.open(Dr,{data:{type:c,item:a,settings:o,areas:l,attributesAlternatives:this.attributesAlternatives,attributesBools:this.attributesBools,attributesDates:this.attributesDates,attributesNumbers:this.attributesNumbers,attributesTexts:this.attributesTexts,attributesModels:this.attributesModels,marketSubscriptionsListItem:i},width:"400px",autoFocus:!1,maxWidth:"95vw",ariaLabel:this.translate.instant("NEWMARKETSUBSCRIPTIONDIALOG"),maxHeight:"95vh",scrollStrategy:new y.N}).afterClosed().subscribe(d=>{if(d){const M={id:d.id,marketObjectType:a.id,priceMin:d.priceMin,priceMax:d.priceMax,sizeRoomsMin:d.sizeRoomsMin,sizeRoomsMax:d.sizeRoomsMax,sizeAreaMin:d.sizeAreaMin,sizeAreaMax:d.sizeAreaMax,areas:d.areas?.toString(),attributes:d?.marketSubscriptionsPutAttributes};this.marketService.putMarketSubscriptions(M).subscribe(()=>{this.getMarketSubscriptions()})}})})}getMarketSubscriptionDisplayName(e){return this.marketSubscriptionsMarketObjectsTypes?.items?.find(i=>i.id===e)?.displayName??this.translate.instant("ALLMARKETTYPES")}getMarketSubscriptionsMarketObjectsTypes(){this.marketService.getMarketSubscriptionsMarketObjectsTypes().subscribe(e=>{this.marketSubscriptionsMarketObjectsTypes=e})}hasSubscriptionDetails(e){let i=Object.values(e);for(let a=0;a<i.length;a++){const s=Object.keys(e)[a];if("marketObjectType"!==s&&"id"!==s&&(i[a].constructor!==Array||i[a]?.length>0))return!0}return!1}buildAttributeModels(e,i){if(e)for(const a of e)this.attributesModels[a.type]={type:i}}setAttributeModelsValues(){if(this.attributesString){const e=JSON.parse(this.attributesString);Object.keys(e).forEach(i=>{switch(this.attributesModels[i]?.type){case"isAlternative":this.attributesModels[i].values=e[i].values.split(":");break;case"isBool":case"isText":this.attributesModels[i].value=e[i].values;break;case"isDate":this.attributesModels[i].minValue="null"!==e[i].values.split(":")[0]?new Date(e[i].values.split(":")[0]):null,this.attributesModels[i].maxValue="null"!==e[i].values.split(":")[1]?new Date(e[i].values.split(":")[1]):null;break;case"isNumber":const a=e[i].values.split(":")[0],s=e[i].values.split(":")[1];this.attributesModels[i].minValue=a?+a:null,this.attributesModels[i].maxValue=s?+s:null}})}}formatAttributeDateString(e){const i=e.split(";");return`${i[0]?`${this.translate.instant("FROM").toLowerCase()} ${i[0]?.split(" ")[0]}`:""} ${i[1]?`${this.translate.instant("TO").toLowerCase()} ${i[1]?.split(" ")[0]?.replace("9999-12-31","")}`:""}`}formatAttributeNumberString(e){const i=e.split(";");return`${i[0]?`min ${i[0]?.split(",")[0]}`:""} ${i[1]?`max ${i[1]?.split(",")[0]}`:""}`}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(F),t.rXU(q.t),t.rXU(R.j),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-subscriptions"]],standalone:!1,decls:12,vars:15,consts:[["data-mom-test","MyPages_MyMarket_Subscriptions_Title",3,"text","subText"],[1,"card"],[1,"add-buttons-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Bevakningar_NyBevakning_AnnonsTyp",3,"full-width","click",4,"ngFor","ngForOf"],["class","card",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Bevakningar_NyBevakning_AnnonsTyp",3,"click"],[1,"item-header"],[1,"display-name"],["class","list",4,"ngIf"],[4,"ngIf"],["align","end"],["mat-stroked-button","","data-mom-test","MinaSidor_MittS\xf6kande_Bevakningar_\xc4ndraBevakning",1,"mat-elevation-z2",2,"margin-right","8px",3,"click"],["color","primary"],["mat-stroked-button","","data-mom-test","MinaSidor_MittS\xf6kande_Bevakningar_TaBortBevakning",1,"mat-elevation-z2",3,"click"],["color","accent"],[1,"list"],[1,"list-item"],["class","label",4,"ngIf"],[1,"value"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeRoomsMin",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeRoomsMax",4,"ngIf"],["class","list-item",4,"ngIf"],["class","list-item",4,"ngFor","ngForOf"],[1,"label"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeRoomsMin"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeRoomsMax"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeAreaMin",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeAreaMax",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeAreaMin"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_SizeAreaMax"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PriceMin",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PriceMax",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PriceMin"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PriceMax"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_Area",4,"ngFor","ngForOf"],["data-mom-test","MyPages_MyMarket_Subscriptions_NewSubscription_Area"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyBoolType",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyAlternativeType",4,"ngFor","ngForOf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyDateType",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyNumberType",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyTextType",4,"ngIf"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyBoolType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyAlternativeType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyDateType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyNumberType"],["data-mom-test","MyPages_MyMarket_Subscriptions_ExistingSubscription_PropertyTextType"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",0),t.nI1(2,"translate"),t.nI1(3,"translate"),t.j41(4,"mat-card",1)(5,"mat-card-title"),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"mat-card-content")(9,"div",2),t.DNE(10,Pr,2,3,"button",3),t.k0s()()(),t.DNE(11,oo,21,15,"mat-card",4),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,9,"MARKETSUBSCRIPTIONS"))("subText",t.bMT(3,11,"MARKETSUBSCRIPTIONSHELP")),t.R7$(5),t.SpI(" ",t.bMT(7,13,"NEWMARKETSUBSCRIPTION")," "),t.R7$(4),t.Y8G("ngForOf",null==a.marketSubscriptionsMarketObjectsTypes?null:a.marketSubscriptionsMarketObjectsTypes.items),t.R7$(),t.Y8G("ngForOf",null==a.marketSubscriptions?null:a.marketSubscriptions.items))},dependencies:[u.Sq,u.bT,G.An,x.$z,k.RN,k.YY,k.m2,k.dh,W.o,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.divider[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px}.item-header[_ngcontent-%COMP%]{margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.list-item[_ngcontent-%COMP%]{margin-bottom:16px}.label[_ngcontent-%COMP%]{font-weight:500}.full-width[_ngcontent-%COMP%]{width:100%}.add-buttons-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:10px;margin-top:10px}.card[_ngcontent-%COMP%]{margin-bottom:8px}
1.display-name[_ngcontent-%COMP%]{display:flex;align-items:center}"]})}}return n})(),co=(()=>{class n{resolve(){return(0,K.of)(!0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var mo=m(9783);function po(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INPUTREQUIRED")," "))}function uo(n,r){1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"INVALIDOFFICIALNUMBER")," "))}let _o=(()=>{class n{get f(){return this.formGroup.controls}constructor(e,i){this.dialogRef=e,this.formBuilder=i}ngOnInit(){this.formGroup=this.formBuilder.group({officialNumber:["",[p.k0.required,mo.e.officialNumber("officialNumber")]]})}onSave(e){this.dialogRef.close(e)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(R.m),t.rXU(p.ze))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-co-applicants-create-dialog"]],standalone:!1,decls:19,vars:16,consts:[["applicantIdentifier",""],[1,"mat-h1"],[3,"markdown"],[3,"formGroup"],[1,"form-field"],["matInput","","formControlName","officialNumber","autocomplete","off","data-mom-test","MinaSidor_MittS\xf6kande_Meds\xf6kande_NyMeds\xf6kandePersonnummer"],[4,"ngIf"],["align","end"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Meds\xf6kande_NyMeds\xf6kandeSkicka",3,"click","disabled"]],template:function(i,a){if(1&i){const s=t.RV6();t.j41(0,"h1",1),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.nrm(3,"taiga-markdown",2),t.nI1(4,"translate"),t.j41(5,"form",3)(6,"div")(7,"mat-form-field",4)(8,"mat-label"),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.nrm(11,"input",5,0),t.DNE(13,po,3,3,"mat-error",6)(14,uo,3,3,"mat-error",6),t.k0s()(),t.j41(15,"div",7)(16,"button",8),t.bIt("click",function(){t.eBV(s);const l=t.sdS(12);return t.Njj(a.onSave(null==l?null:l.value))}),t.EFF(17),t.nI1(18,"translate"),t.k0s()()()}2&i&&(t.R7$(),t.JRh(t.bMT(2,8,"COAPPLICANTREQUEST")),t.R7$(2),t.Y8G("markdown",t.bMT(4,10,"COAPPLICANTREQUESTHELP")),t.R7$(2),t.Y8G("formGroup",a.formGroup),t.R7$(4),t.JRh(t.bMT(10,12,"OFFICIALNUMBER")),t.R7$(4),t.Y8G("ngIf",a.f.officialNumber.invalid&&a.f.officialNumber.errors.required),t.R7$(),t.Y8G("ngIf",a.f.officialNumber.invalid&&!a.f.officialNumber.errors.required),t.R7$(2),t.Y8G("disabled",!a.formGroup.valid),t.R7$(),t.JRh(t.bMT(18,14,"SEND")))},dependencies:[u.bT,x.$z,nt.fg,S.j,S.M,S.b,p.qT,p.me,p.BC,p.cb,p.j4,p.JD,D.N,b.D9],styles:[".form-field[_ngcontent-%COMP%]{width:100%}"]})}}return n})();function ho(n,r){if(1&n&&(t.j41(0,"div",14),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Lme(" ",e.name," ",e.lastName," ")}}function go(n,r){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.viaIdentifier," ")}}function fo(n,r){1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"COAPPLICANTREQUEST")," "))}function bo(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"button",15),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return t.Njj(s.delete(a.id))}),t.j41(3,"mat-icon",16),t.EFF(4,"delete_forever"),t.k0s()()()}2&n&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,1,"DELETECOAPPLICANT")))}function ko(n,r){1&n&&(t.j41(0,"div",17),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"STATUS")," "))}function Mo(n,r){1&n&&(t.j41(0,"div",17),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"OFFICIALNUMBER")," "))}function vo(n,r){if(1&n&&(t.j41(0,"div",9)(1,"div",17),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",11),t.EFF(5),t.k0s()()),2&n){const e=t.XpG().$implicit,i=t.XpG();t.R7$(2),t.SpI(" ",t.bMT(3,2,"DATEOFBIRTH")," "),t.R7$(3),t.SpI(" ",i.formatDate(null==e?null:e.dateOfBirth)," ")}}function Ro(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",18)(1,"button",19),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return t.Njj(s._accept(a.id,!1))}),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"button",20),t.bIt("click",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG();return t.Njj(s._accept(a.id,!0))}),t.EFF(5),t.nI1(6,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.JRh(t.bMT(3,2,"DENY")),t.R7$(3),t.JRh(t.bMT(6,4,"ACCEPT")))}function Io(n,r){if(1&n&&(t.qex(0),t.j41(1,"div",1),t.nrm(2,"mat-divider"),t.k0s(),t.j41(3,"div",2),t.qex(4,3),t.DNE(5,ho,2,2,"div",4)(6,go,2,1,"div",5)(7,fo,3,3,"div",6),t.bVm(),t.DNE(8,bo,5,3,"div",7),t.k0s(),t.j41(9,"div",8)(10,"div",9),t.DNE(11,ko,3,3,"div",10),t.j41(12,"div",11),t.EFF(13),t.k0s()(),t.j41(14,"div",9),t.DNE(15,Mo,3,3,"div",10),t.j41(16,"div",11),t.EFF(17),t.k0s()(),t.DNE(18,vo,6,4,"div",12),t.k0s(),t.DNE(19,Ro,7,6,"div",13),t.bVm()),2&n){const e=r.$implicit;t.R7$(4),t.Y8G("ngSwitch",!0),t.R7$(),t.Y8G("ngSwitchCase",!!e.name||!!e.lastName),t.R7$(),t.Y8G("ngSwitchCase",!!e.viaIdentifier),t.R7$(2),t.Y8G("ngIf",!e.status.draft),t.R7$(3),t.Y8G("ngIf",null==e||null==e.status?null:e.status.displayName),t.R7$(2),t.SpI(" ",null==e||null==e.status?null:e.status.displayName," "),t.R7$(2),t.Y8G("ngIf",null==e?null:e.officialNumber),t.R7$(2),t.SpI(" ",null==e?null:e.officialNumber," "),t.R7$(),t.Y8G("ngIf",null==e?null:e.dateOfBirth),t.R7$(),t.Y8G("ngIf",e.status.draft)}}let Co=(()=>{class n{constructor(){this.acceptClicked=new t.bkB,this.deleteClicked=new t.bkB}ngOnInit(){console.log(this.marketCoApplicants)}formatDate(e){return g()(e).format("YYYY-MM-DD")}
1_accept(e,i){this.acceptClicked.emit({id:e,accept:i})}delete(e){this.deleteClicked.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-co-applicants-list"]],inputs:{marketCoApplicants:"marketCoApplicants",title:"title"},outputs:{acceptClicked:"acceptClicked",deleteClicked:"deleteClicked"},standalone:!1,decls:5,vars:2,consts:[[4,"ngFor","ngForOf"],[1,"divider"],[1,"item-header"],[3,"ngSwitch"],["class","display-name",4,"ngSwitchCase"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[1,"list"],[1,"list-item"],["class","label",4,"ngIf"],[1,"value"],["class","list-item",4,"ngIf"],["class","accept-buttons","align","end",4,"ngIf"],[1,"display-name"],["mat-icon-button","","data-mom-test","MinaSidor_MittS\xf6kande_Meds\xf6kande_TaBortMeds\xf6kande",3,"click"],["color","accent"],[1,"label"],["align","end",1,"accept-buttons"],["mat-raised-button","",3,"click"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Meds\xf6kande_NyMeds\xf6kandeAcceptera",3,"click"]],template:function(i,a){1&i&&(t.j41(0,"mat-card")(1,"mat-card-title"),t.EFF(2),t.k0s(),t.j41(3,"mat-card-content"),t.DNE(4,Io,20,10,"ng-container",0),t.k0s()()),2&i&&(t.R7$(2),t.SpI(" ",a.title," "),t.R7$(2),t.Y8G("ngForOf",null==a.marketCoApplicants?null:a.marketCoApplicants.items))},dependencies:[u.Sq,u.bT,u.ux,u.e1,u.fG,B.q,G.An,x.$z,it.M,k.RN,k.m2,k.dh,b.D9],styles:[".divider[_ngcontent-%COMP%]{margin-top:18px!important;margin-bottom:18px}.item-header[_ngcontent-%COMP%]{margin-bottom:16px;font-size:1.125rem;font-weight:500;display:flex;align-items:center;justify-content:space-between}.label[_ngcontent-%COMP%]{font-weight:500}.list-item[_ngcontent-%COMP%]{margin-bottom:16px}.accept-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:5px}"]})}}return n})();function So(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"button",4),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.openCreateDialog())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.JRh(t.bMT(3,1,"NEWCOAPPLICANT")))}function xo(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",5)(1,"taiga-market-co-applicants-list",6),t.nI1(2,"translate"),t.bIt("acceptClicked",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.accept(a))}),t.k0s()()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("title",t.bMT(2,2,"COAPPLICANTREQUEST"))("marketCoApplicants",e.marketCoApplicantsUnaccepted)}}function Oo(n,r){if(1&n){const e=t.RV6();t.j41(0,"div",7)(1,"taiga-market-co-applicants-list",8),t.nI1(2,"translate"),t.bIt("deleteClicked",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s.delete(a))}),t.k0s()()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("title",t.bMT(2,2,"MYCOAPPLICANTS"))("marketCoApplicants",e.marketCoApplicantsAccepted)}}let jo=(()=>{class n{constructor(e,i,a,s,o){this.mediaQueryService=e,this.marketService=i,this.menuService=a,this.dialog=s,this.translate=o}ngOnInit(){this.getMarketCoApplicants()}getMarketCoApplicants(){this.marketService.getMarketCoApplicants().subscribe(e=>{e&&(this.marketCoApplicantsAccepted={count:e.items?.filter(i=>!1===i.status.draft)?.length,items:e.items?.filter(i=>!1===i.status.draft)},this.marketCoApplicantsUnaccepted={count:e.items?.filter(i=>!0===i.status.draft)?.length,items:e.items?.filter(i=>!0===i.status.draft)})})}accept(e){this.marketService.patchMarketApplicantCoApplicantsItem(e.id,e.accept).subscribe(()=>{this.getMarketCoApplicants(),this.menuService.refreshMenu(1500)})}delete(e){this.dialog.open(E.w,{data:{heading:this.translate.instant("CONFIRMDELETECOAPPLICANT"),text:this.translate.instant("DELETECOAPPLICANTHELP"),dialogChoices:$.$.YesNo},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMDELETECOAPPLICANT")}).afterClosed().subscribe(a=>{"yes"===a&&this.marketService.deleteMarketApplicantCoApplicantsItem(e).subscribe(()=>{this.getMarketCoApplicants()})})}openCreateDialog(){this.dialog.open(_o,{width:"400px",autoFocus:!1,maxWidth:"95vw",scrollStrategy:new y.N,ariaLabel:this.translate.instant("COAPPLICANTREQUEST")}).afterClosed().subscribe(i=>{i&&this.sendRequest(i)})}sendRequest(e){this.marketService.putMarketApplicantCoApplicantsItem(e).subscribe(()=>{this.getMarketCoApplicants(),this.dialog.open(E.w,{data:{heading:null,text:this.translate.instant("CONFIRMCOAPPLICANTREQUEST"),dialogChoices:$.$.Custom,customButtonText:this.translate.instant("OK")},scrollStrategy:new y.N,ariaLabel:this.translate.instant("CONFIRMCOAPPLICANTREQUEST")})})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(O.M),t.rXU(F),t.rXU(et.$),t.rXU(R.j),t.rXU(b.c$))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-co-applicants"]],standalone:!1,decls:7,vars:13,consts:[[3,"text","subText"],[4,"ngIf"],["class","unaccepted-container",4,"ngIf"],["class","accepted-container",4,"ngIf"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_MittS\xf6kande_Meds\xf6kande_NyMeds\xf6kande",3,"click"],[1,"unaccepted-container"],[3,"acceptClicked","title","marketCoApplicants"],[1,"accepted-container"],["data-mom-test","MinaSidor_MittS\xf6kande_Meds\xf6kande_Mina
1Meds\xf6kandeRubrik",3,"deleteClicked","title","marketCoApplicants"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",0),t.nI1(2,"translate"),t.nI1(3,"translate"),t.DNE(4,So,4,3,"div",1)(5,xo,3,4,"div",2)(6,Oo,3,4,"div",3),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,9,"COAPPLICANTS"))("subText",t.bMT(3,11,"COAPPLICANTSHELP")),t.R7$(3),t.Y8G("ngIf",0===(null==a.marketCoApplicantsUnaccepted?null:a.marketCoApplicantsUnaccepted.count)&&0===(null==a.marketCoApplicantsAccepted?null:a.marketCoApplicantsAccepted.count)),t.R7$(),t.Y8G("ngIf",(null==a.marketCoApplicantsUnaccepted?null:a.marketCoApplicantsUnaccepted.count)>0),t.R7$(),t.Y8G("ngIf",(null==a.marketCoApplicantsAccepted?null:a.marketCoApplicantsAccepted.count)>0))},dependencies:[u.bT,x.$z,W.o,Co,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.unaccepted-container[_ngcontent-%COMP%]{margin-bottom:15px}"]})}}return n})();var st=m(6233);function To(n,r){if(1&n&&t.EFF(0),2&n){const e=t.XpG().$implicit;t.JRh(e.section.title)}}function Fo(n,r){if(1&n&&(t.j41(0,"div",16),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.heading.title)}}function yo(n,r){if(1&n&&(t.j41(0,"p"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.text.content)}}function Eo(n,r){1&n&&(t.j41(0,"span",20),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"MUSTBESPECIFIED")))}function Ao(n,r){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"div")(2,"taiga-market-generic-field",17),t.bIt("update",function(){t.eBV(e);const a=t.XpG(4);return t.Njj(a.getData())}),t.k0s(),t.DNE(3,Eo,3,3,"span",18),t.nrm(4,"mat-divider",19),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.XpG();const i=t.sdS(1),a=t.XpG(2);t.R7$(2),t.Y8G("fields",a.getField(e.input.field))("values",a.marketApplicantValue.values[e.input.field]),t.R7$(),t.Y8G("ngIf",!i.completed&&i.interacted&&(null==e.input||null==e.input.options?null:e.input.options.required)),t.R7$(),t.AVh("divider-warn",!i.completed&&i.interacted&&(null==e.input||null==e.input.options?null:e.input.options.required))}}function $o(n,r){1&n&&(t.qex(0,13),t.DNE(1,Fo,2,1,"div",14)(2,yo,2,1,"p",15)(3,Ao,5,5,"div",15),t.bVm()),2&n&&(t.Y8G("ngSwitch",r.$implicit.type),t.R7$(),t.Y8G("ngSwitchCase","heading"),t.R7$(),t.Y8G("ngSwitchCase","text"),t.R7$(),t.Y8G("ngSwitchCase","input"))}function No(n,r){1&n&&(t.j41(0,"button",21),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"BACK")))}function Go(n,r){1&n&&(t.j41(0,"button",22)(1,"div"),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&n&&(t.R7$(2),t.JRh(t.bMT(3,1,"NEXT")))}function Do(n,r){if(1&n){const e=t.RV6();t.j41(0,"taiga-loading-button",23),t.nI1(1,"translate"),t.bIt("clicked",function(){t.eBV(e);const a=t.XpG().$implicit,s=t.XpG(2);return t.Njj(s.postMarketApplicationsItemPost(a))}),t.k0s()}if(2&n){const e=t.XpG(3);t.Y8G("disabled",e.disableButton)("spin",e.disableButton)("text",t.bMT(1,3,"FINISHED"))}}function Po(n,r){if(1&n&&(t.j41(0,"mat-step",7,1),t.DNE(2,To,1,1,"ng-template",8)(3,$o,4,4,"ng-container",9)(4,No,3,3,"button",10)(5,Go,4,3,"button",11)(6,Do,2,5,"taiga-loading-button",12),t.k0s()),2&n){const e=r.$implicit,i=r.index,a=t.XpG(2);t.Y8G("completed",a.checkCompleted(e)),t.R7$(3),t.Y8G("ngForOf",null==e.section?null:e.section.elements),t.R7$(),t.Y8G("ngIf",0!==i),t.R7$(),t.Y8G("ngIf",(null==a.marketApplicationsItem||null==a.marketApplicationsItem.application||null==a.marketApplicationsItem.application.presentation||null==a.marketApplicationsItem.application.presentation.data||null==a.marketApplicationsItem.application.presentation.data.form||null==a.marketApplicationsItem.application.presentation.data.form.elements?null:a.marketApplicationsItem.application.presentation.data.form.elements.length)-1!==i),t.R7$(),t.Y8G("ngIf",(null==a.marketApplicationsItem||null==a.marketApplicationsItem.application||null==a.marketApplicationsItem.application.presentation||null==a.marketApplicationsItem.application.presentation.data||null==a.marketApplicationsItem.application.presentation.data.form||null==a.marketApplicationsItem.application.presentation.data.form.elements?null:a.marketApplicationsItem.application.presentation.data.form.elements.length)-1===i)}}function wo(n,r){if(1&n&&(t.j41(0,"div",4)(1,"mat-stepper",5,0),t.DNE(3,Po,7,5,"mat-step",6),t.k0s()()),2&n){const e=t.XpG();t.R7$(),t.Y8G("linear",!0),t.R7$(2),t.Y8G("ngForOf",null==e.marketApplicationsItem||null==e.marketApplicationsItem.application||null==e.marketApplicationsItem.application.presentation||null==e.marketApplicationsItem.application.presentation.data||null==e.marketApplicationsItem.application.presentation.data.form?null:e.marketApplicationsItem.application.presentation.data.form.elements)}}const Xo=[{path:"applications",component:Nt,canActivate:[Z.q]},{path:"subscriptions",component:lo,canActivate:[Z.q],resolve:{data:co},title:"MARKETSUBSCRIPTIONS"},{path:"applicant/co-applicants",component:jo,canActivate:[Z.q],title:"COAPPLICANTS"},{path:"applications/:queue",component:Nt,canActivate:[Z.q],title:"HANDLE-IN-COMPONENT"},{path:"applications/:queue/:id",component:(()=>{class n{constructor(e,i,a,s,o,l){this.route=e,this.marketService=i,this.mediaQueryService=a,this.router=s,this.menuService=o,this.loadingService=l,this.marketApplicationsLink=`${N.t.MARKETAPPLICATIONS}`}ngAfterViewInit(){this.addTabRoles()}ngOnInit(){this.route.data.subscribe(e=>{this.marketApplicationsItem=e.data}),this.getData(),this.route.paramMap.subscribe(e=>{this.queueType=e.get("queue")})}getData(){this.marketService.getMarketApplicantProfileOptions().subscribe(e=>{this.marketApplicantField=e}),this.marketService.getMarketApplicantProfile().subscribe(e=>{this.marketApplicantValue=e})}getField(e){return this.marketApplicantField.fields.find(i=>i.id===e)}postMarketApplicationsItemPost(e){if(this.checkCompleted(e)){let i={generics:{"-":{marketApplicant:{values:{}}}}};for(let s of this.marketApplicationsItem?.application?.presentation?.data.form.elements)for(let o of s.section.elements)
1o?.input?.field&&(i.generics["-"].marketApplicant.values={...i.generics["-"].marketApplicant.values,[o.input.field]:{confirm:!0}});let a=w.Q.generateUniqueId();this.loadingService.open(a),this.disableButton=!0,this.marketService.patchMarketApplicantProfile(i).pipe((0,I.H)(()=>this.marketService.postMarketApplicationsItemPost(this.marketApplicationsItem.application.marketObject.id,this.marketApplicationsItem.application.id,{type:"done",reason:void 0},this.marketApplicationsItem.application.etag)),(0,U.W)(s=>{throw this.loadingService.close(a),this.disableButton=!1,s})).subscribe(()=>{setTimeout(()=>{this.loadingService.close(a),this.menuService.refreshMenu(),this.router.navigateByUrl(`${this.marketApplicationsLink}/${this.queueType}`)},2e3)})}}checkCompleted(e){const i=e.section?.elements?.filter(a=>a.input?.options?.required);for(let a of i)switch(this.getField(a.input.field).generic.type){case"marketIncome":return this.marketApplicantValue.values[a.input.field].generic.marketIncome.sources?.length>0;case"marketAccommodation":return Object?.keys(this.marketApplicantValue.values[a.input.field].generic.marketAccommodation?.values??{})?.length>0;case"marketHousehold":return Object?.keys(this.marketApplicantValue.values[a.input.field].generic.marketHousehold??{})?.length>0}return!0}addTabRoles(){const e=document.getElementsByClassName("mat-vertical-content-container");for(let i of Array.from(e))i.setAttribute("role","tab")}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(j.nX),t.rXU(F),t.rXU(O.M),t.rXU(j.Ix),t.rXU(et.$),t.rXU(Et.U))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["taiga-market-application"]],standalone:!1,decls:4,vars:8,consts:[["stepper",""],["step",""],["data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_Rubrik",3,"text"],["class","stepper",4,"ngIf"],[1,"stepper"],["orientation","vertical","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_Steg",3,"linear"],[3,"completed",4,"ngFor","ngForOf"],[3,"completed"],["matStepLabel",""],[3,"ngSwitch",4,"ngFor","ngForOf"],["class","step-button","color","primary","mat-raised-button","","matStepperPrevious","","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_Backa",4,"ngIf"],["class","step-button","color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_N\xe4sta",4,"ngIf"],["class","step-button","color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_Klar",3,"disabled","spin","text","clicked",4,"ngIf"],[3,"ngSwitch"],["class","mat-body-strong",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"mat-body-strong"],["cssClass","mat-elevation-z0 padding-left-right-0",3,"update","fields","values"],["class","warn",4,"ngIf"],[1,"divider"],[1,"warn"],["color","primary","mat-raised-button","","matStepperPrevious","","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_Backa",1,"step-button"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_N\xe4sta",1,"step-button"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_MittS\xf6kande_S\xf6kandeprofil_Klar",1,"step-button",3,"clicked","disabled","spin","text"]],template:function(i,a){1&i&&(t.j41(0,"div"),t.nrm(1,"taiga-medium-header",2),t.nI1(2,"translate"),t.DNE(3,wo,4,2,"div",3),t.k0s()),2&i&&(t.AVh("is-mobile",a.mediaQueryService.isMobile())("is-desktop",!a.mediaQueryService.isMobile()),t.R7$(),t.Y8G("text",t.bMT(2,6,"APPLICANTPROFILE")),t.R7$(2),t.Y8G("ngIf",a.marketApplicantField&&a.marketApplicantValue))},dependencies:[u.Sq,u.bT,u.ux,u.e1,B.q,x.$z,st.V5,st.Ti,st.M6,st.F7,st.FR,W.o,vt.A,wt,b.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.step-button[_ngcontent-%COMP%]{margin-top:10px;margin-right:10px}.divider[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px}.stepper[_ngcontent-%COMP%]{margin-top:10px}"]})}}return n})(),canActivate:[Z.q],resolve:{data:(()=>{class n{constructor(e,i,a,s){this.marketService=e,this.errorService=i,this.userMessageService=a,this.router=s}resolve(e){const i=e.paramMap.get("id");return this.marketService.getMarketApplicationsItem(i,!1).pipe((0,U.W)(a=>{const s=this.errorService.parseError(a);return this.userMessageService.errorWithHeader(s.message,"",s.displayErrorReportNumber?s.errorReportNumber:""),this.router.navigateByUrl("/"),(0,K.of)(null)}))}static{this.\u0275fac=function(i){return new(i||n)(t.KVO(F),t.KVO(ot.I),t.KVO(z.z),t.
1KVO(j.Ix))}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()}},{path:"applicant/profile",component:pr,canActivate:[Z.q,ur.u],resolve:{data:_r},title:"APPLICANTPROFILE"},{path:":objectType",component:Ri,title:"HANDLE-IN-COMPONENT"},{path:":objectType/:id",component:yn,resolve:{data:En},title:"HANDLE-IN-COMPONENT"},{path:"**",component:yt.Q}];let Bo=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({imports:[Y.iI.forChild(Xo),Y.iI]})}}return n})();var Uo=m(5974);let Lo=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({imports:[u.MD,Bo,Uo.G,le,bt.Ou]})}}return n})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.